get_workflow_result
Retrieve the result of a specific workflow by its ID using the Linked API MCP server. Automates LinkedIn tasks like lead searches, profile analysis, and message sending through AI assistants.
Instructions
Get workflow result by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes |
Implementation Reference
- src/tools/get-workflow-result.ts:20-38 (handler)The overridden `execute` method in `GetWorkflowResultTool` class that implements the core tool logic: finds the operation by name and calls `executeWithProgress` with the workflowId and optional progressToken.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 for input validation of `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 definition, including name, detailed description, and JSON schema for inputs.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:62-62 (registration)Instantiation of `GetWorkflowResultTool` in the `LinkedApiTools` class constructor, adding it to the collection of available tools.new GetWorkflowResultTool(progressCallback),
- src/linked-api-tools.ts:9-9 (registration)Import statement for `GetWorkflowResultTool` used in the tools registration.import { GetWorkflowResultTool } from './tools/get-workflow-result.js';