From 43a32a627f3dec17df63c4cebd7c0c7d7c1cedbb Mon Sep 17 00:00:00 2001 From: Siddharth Ganesan Date: Thu, 5 Feb 2026 19:59:00 -0800 Subject: [PATCH] Fix mcp --- apps/sim/lib/copilot/orchestrator/subagent.ts | 2 +- apps/sim/lib/copilot/tools/mcp/definitions.ts | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apps/sim/lib/copilot/orchestrator/subagent.ts b/apps/sim/lib/copilot/orchestrator/subagent.ts index cccf7a70b..d997fcbb9 100644 --- a/apps/sim/lib/copilot/orchestrator/subagent.ts +++ b/apps/sim/lib/copilot/orchestrator/subagent.ts @@ -59,7 +59,7 @@ export async function orchestrateSubagentStream( 'Content-Type': 'application/json', ...(env.COPILOT_API_KEY ? { 'x-api-key': env.COPILOT_API_KEY } : {}), }, - body: JSON.stringify({ ...requestPayload, stream: true }), + body: JSON.stringify({ ...requestPayload, userId, stream: true }), }, context, execContext, diff --git a/apps/sim/lib/copilot/tools/mcp/definitions.ts b/apps/sim/lib/copilot/tools/mcp/definitions.ts index 4ce44089b..6ef285729 100644 --- a/apps/sim/lib/copilot/tools/mcp/definitions.ts +++ b/apps/sim/lib/copilot/tools/mcp/definitions.ts @@ -63,20 +63,17 @@ export const DIRECT_TOOL_DEFS: DirectToolDef[] = [ }, { name: 'get_workflow', - toolId: 'get_workflow_from_name', - description: 'Get a workflow by name or ID. Returns the full workflow definition.', + toolId: 'get_user_workflow', + description: 'Get a workflow by ID. Returns the full workflow definition.', inputSchema: { type: 'object', properties: { - name: { - type: 'string', - description: 'Workflow name to search for.', - }, workflowId: { type: 'string', - description: 'Workflow ID to retrieve directly.', + description: 'Workflow ID to retrieve.', }, }, + required: ['workflowId'], }, }, {