Skip to main content
Glama
Linked-API
by Linked-API

execute_custom_workflow

Run custom workflows to automate LinkedIn tasks like lead searching, messaging, and profile analysis through AI assistants.

Instructions

Execute a custom workflow definition

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
definitionYes

Implementation Reference

  • The ExecuteCustomWorkflowTool class defines the tool handler, including name, operation name for LinkedAPI, Zod schema for validation, and the MCP tool definition via getTool().
    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 input validation: accepts any object under 'definition' key.
    protected override readonly schema = z.object({
      definition: z.any(),
    });
  • The ExecuteCustomWorkflowTool is instantiated and registered in the LinkedApiTools class constructor, added to the array of available tools used by the MCP server.
      // 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),
    ];
  • Base class OperationTool provides the core execute logic by mapping the tool's operationName to a LinkedAPI operation and executing it with progress handling.
    export abstract class OperationTool<TParams, TResult> extends LinkedApiTool<TParams, TResult> {
      public abstract readonly operationName: TOperationName;
    
      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,
        });
      }
    }
  • The LinkedApiMCPServer exposes all registered tools (including execute_custom_workflow) via getTools(), which calls each tool's getTool() to provide MCP tool definitions.
    public getTools(): Tool[] {
      return this.tools.tools.map((tool) => tool.getTool());
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden but fails to disclose behavioral traits. It doesn't indicate if execution is read-only or destructive, requires authentication, has side effects (e.g., data changes), rate limits, or expected outcomes. This is inadequate for a tool that likely performs actions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste—it directly states the tool's action. It's appropriately sized and front-loaded, making it easy to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (likely involves executing workflows), lack of annotations, no output schema, and 0% schema coverage, the description is incomplete. It doesn't cover behavior, parameters, or results, failing to provide enough context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage for the single parameter 'definition', and the tool description adds no meaning beyond the schema. It doesn't explain what a 'definition' should contain (e.g., workflow steps, configuration), its format, or examples, leaving the parameter undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Execute a custom workflow definition' states a verb ('Execute') and resource ('custom workflow definition'), but it's vague about what execution entails (e.g., runs a process, triggers automation) and doesn't differentiate from siblings like 'get_workflow_result'. It avoids tautology by not restating the name, but lacks specificity for a tool with behavioral implications.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing a defined workflow), exclusions, or how it relates to siblings like 'get_workflow_result' for retrieving results. This leaves the agent without context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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