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
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The ID of the workflow to execute | |
| title | Yes | Title for the job | |
| description | Yes | Description for the job |
Implementation Reference
- src/index.ts:260-276 (handler)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"], }, },
- src/index.ts:134-151 (schema)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"], },
- src/index.ts:82-83 (handler)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);