Skip to main content
Glama

initiate_job

Start workflow execution by creating a new job with specified workflow ID, title, and description. Returns job execution ID for tracking and further operations.

Instructions

Initiate a new job for a workflow. Returns jobExecutionId required for subsequent operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe ID of the workflow to execute
titleYesTitle for the job
descriptionYesDescription for the job

Implementation Reference

  • The core handler function for the 'initiate_job' tool. It destructures workflowId, title, and description from input args, sends a POST request to the '/job/initiate' endpoint using the configured axios instance, and returns the API response as formatted JSON text content.
    private async initiateJob(args: any) { const { workflowId, title, description } = args; const response = await this.axiosInstance.post("/job/initiate", { workflowId, title, description, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
  • src/index.ts:130-152 (registration)
    Tool registration in the getTools() method, which is returned by the listTools handler. Defines the name, description, and inputSchema for 'initiate_job'.
    { name: "initiate_job", description: "Initiate a new job for a workflow. Returns jobExecutionId required for subsequent operations", inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The ID of the workflow to execute", }, title: { type: "string", description: "Title for the job", }, description: { type: "string", description: "Description for the job", }, }, required: ["workflowId", "title", "description"], }, },
  • Input schema for the 'initiate_job' tool, specifying required properties: workflowId (string), title (string), description (string).
    inputSchema: { type: "object", properties: { workflowId: { type: "string", description: "The ID of the workflow to execute", }, title: { type: "string", description: "Title for the job", }, description: { type: "string", description: "Description for the job", }, }, required: ["workflowId", "title", "description"], },
  • Dispatch case in the callTool request handler switch statement that routes 'initiate_job' calls to the initiateJob method.
    case "initiate_job": return await this.initiateJob(args);

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/Moenamatics/Opus-MCP'

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