Skip to content

Commit ddcc369

Browse files
committed
fix params
1 parent 3ec7a51 commit ddcc369

4 files changed

Lines changed: 21 additions & 4 deletions

File tree

apps/sim/lib/copilot/generated/tool-catalog-v1.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1737,7 +1737,16 @@ export const ListWorkspaceMcpServers: ToolCatalogEntry = {
17371737
name: 'list_workspace_mcp_servers',
17381738
route: 'sim',
17391739
mode: 'async',
1740-
parameters: { type: 'object', properties: {} },
1740+
parameters: {
1741+
type: 'object',
1742+
properties: {
1743+
workspaceId: {
1744+
type: 'string',
1745+
description:
1746+
'Workspace ID. Required when no current workspace context is available, such as headless MCP calls.',
1747+
},
1748+
},
1749+
},
17411750
}
17421751

17431752
export const ManageCredential: ToolCatalogEntry = {

apps/sim/lib/copilot/generated/tool-schemas-v1.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,13 @@ export const TOOL_RUNTIME_SCHEMAS: Record<string, ToolRuntimeSchemaEntry> = {
15351535
['list_workspace_mcp_servers']: {
15361536
parameters: {
15371537
type: 'object',
1538-
properties: {},
1538+
properties: {
1539+
workspaceId: {
1540+
type: 'string',
1541+
description:
1542+
'Workspace ID. Required when no current workspace context is available, such as headless MCP calls.',
1543+
},
1544+
},
15391545
},
15401546
resultSchema: undefined,
15411547
},

apps/sim/lib/copilot/tools/handlers/deployment/manage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export async function executeListWorkspaceMcpServers(
120120
context: ExecutionContext
121121
): Promise<ToolCallResult> {
122122
try {
123-
let workspaceId = context.workspaceId
123+
let workspaceId = params.workspaceId || context.workspaceId
124124
const workflowId = context.workflowId
125125

126126
if (!workspaceId && workflowId) {

apps/sim/lib/copilot/tools/handlers/param-types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,9 @@ export interface CheckDeploymentStatusParams {
155155
workflowId?: string
156156
}
157157

158-
export type ListWorkspaceMcpServersParams = Record<string, never>
158+
export interface ListWorkspaceMcpServersParams {
159+
workspaceId?: string
160+
}
159161

160162
export interface CreateWorkspaceMcpServerParams {
161163
workspaceId?: string

0 commit comments

Comments
 (0)