Skip to main content
Glama

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
NameRequiredDescriptionDefault
definitionYes

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(), });
  • Instantiates and registers the ExecuteCustomWorkflowTool instance within the LinkedApiTools collection.
    new ExecuteCustomWorkflowTool(progressCallback),
  • Instantiates LinkedApiTools (which includes execute_custom_workflow) in the MCP server.
    this.tools = new LinkedApiTools(progressCallback);
  • 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, }); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Linked-API/linkedapi-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server