execute_custom_workflow
Run a custom workflow on the Linked API MCP server to automate LinkedIn tasks, such as lead searches, profile analysis, and messaging, through connected AI assistants.
Instructions
Execute a custom workflow definition
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| definition | Yes |
Implementation Reference
- Defines the ExecuteCustomWorkflowTool class, which is the primary handler for the 'execute_custom_workflow' tool. It extends OperationTool, sets the tool name, maps to the customWorkflow operation, defines input schema, and provides the MCP tool definition.export class ExecuteCustomWorkflowTool extends OperationTool< TWorkflowDefinition, TWorkflowCompletion > { public override readonly name = 'execute_custom_workflow'; public override readonly operationName = OPERATION_NAME.customWorkflow; protected override readonly schema = z.object({ definition: z.any(), }); public override getTool(): Tool { return { name: this.name, description: 'Execute a custom workflow definition', inputSchema: { type: 'object', properties: { definition: { type: 'object' } }, required: ['definition'], }, }; } }
- Zod schema for validating the tool input, requiring a 'definition' object.protected override readonly schema = z.object({ definition: z.any(), });
- src/linked-api-tools.ts:61-61 (registration)Instantiates and registers the ExecuteCustomWorkflowTool instance within the LinkedApiTools collection.new ExecuteCustomWorkflowTool(progressCallback),
- src/linked-api-server.ts:19-19 (registration)Instantiates LinkedApiTools (which includes execute_custom_workflow) in the MCP server.this.tools = new LinkedApiTools(progressCallback);
- src/utils/linked-api-tool.ts:39-57 (helper)The execute method in OperationTool (base class) that performs the actual API operation call for execute_custom_workflow and all similar tools.public override execute({ linkedapi, args, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: TParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<TResult>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === this.operationName, )! as Operation<TParams, TResult>; return executeWithProgress(this.progressCallback, operation, workflowTimeout, { params: args, progressToken, }); }