get_workflow_result
Retrieve results from background workflows in Linked API MCP server. Use this tool to monitor ongoing operations while maintaining client responsiveness.
Instructions
CONTINUE LISTENING TO BACKGROUND WORKFLOW - THIS IS NORMAL OPERATION! Background workflows are OPTIMAL BEHAVIOR for Linked API operations and keep the MCP client responsive. When a workflow runs in the background, this tool should be used with the provided workflowId and operationName parameters to continue listening for updates. The workflow continues processing in the background while you wait. This is the STANDARD way Linked API works - background processing provides optimal user experience!
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID provided in the background workflow status message | |
| operationName | Yes | Optional function name for proper type restoration (provided in background workflow status if available) |
Implementation Reference
- src/tools/get-workflow-result.ts:20-38 (handler)The execute method of GetWorkflowResultTool that handles the tool invocation by retrieving the operation and executing it with progress tracking.public override async execute({ linkedapi, args: { workflowId, operationName }, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: IGetWorkflowResultParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<unknown>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === operationName, )!; return await executeWithProgress(this.progressCallback, operation, workflowTimeout, { workflowId, progressToken, }); }
- Zod schema defining the input parameters for validation: workflowId (string) and operationName (enum from OPERATION_NAME).protected readonly schema = z.object({ workflowId: z.string(), operationName: z.enum(Object.values(OPERATION_NAME)), });
- The getTool method returns the MCP Tool object including name, description, and inputSchema for the get_workflow_result tool.public override getTool(): Tool { return { name: this.name, description: 'CONTINUE LISTENING TO BACKGROUND WORKFLOW - THIS IS NORMAL OPERATION! Background workflows are OPTIMAL BEHAVIOR for Linked API operations and keep the MCP client responsive. When a workflow runs in the background, this tool should be used with the provided workflowId and operationName parameters to continue listening for updates. The workflow continues processing in the background while you wait. This is the STANDARD way Linked API works - background processing provides optimal user experience!', inputSchema: { type: 'object', properties: { workflowId: { type: 'string', description: 'The workflow ID provided in the background workflow status message', }, operationName: { type: 'string', description: 'Optional function name for proper type restoration (provided in background workflow status if available)', }, }, required: ['workflowId', 'operationName'], }, }; }
- src/linked-api-tools.ts:35-66 (registration)The LinkedApiTools constructor registers GetWorkflowResultTool by instantiating it and adding to the tools array, which is later exposed via the MCP server.this.tools = [ // Standard tools new SendMessageTool(progressCallback), new GetConversationTool(progressCallback), new CheckConnectionStatusTool(progressCallback), new RetrieveConnectionsTool(progressCallback), new SendConnectionRequestTool(progressCallback), new WithdrawConnectionRequestTool(progressCallback), new RetrievePendingRequestsTool(progressCallback), new RemoveConnectionTool(progressCallback), new SearchCompaniesTool(progressCallback), new SearchPeopleTool(progressCallback), new FetchCompanyTool(progressCallback), new FetchPersonTool(progressCallback), new FetchPostTool(progressCallback), new ReactToPostTool(progressCallback), new CommentOnPostTool(progressCallback), new CreatePostTool(progressCallback), new RetrieveSSITool(progressCallback), new RetrievePerformanceTool(progressCallback), // Sales Navigator tools new NvSendMessageTool(progressCallback), new NvGetConversationTool(progressCallback), new NvSearchCompaniesTool(progressCallback), new NvSearchPeopleTool(progressCallback), new NvFetchCompanyTool(progressCallback), new NvFetchPersonTool(progressCallback), // Other tools new ExecuteCustomWorkflowTool(progressCallback), new GetWorkflowResultTool(progressCallback), new GetApiUsageTool(progressCallback), ];
- src/linked-api-server.ts:22-24 (registration)The LinkedApiMCPServer exposes all tools, including get_workflow_result, via getTools() for MCP registration.public getTools(): Tool[] { return this.tools.tools.map((tool) => tool.getTool()); }