execute_job
Run automated workflows by providing populated input values according to the job schema. This tool executes jobs within the Opus automation platform after initiation.
Instructions
Execute a job with populated input values. Use jobPayloadSchema from get_workflow_details to structure inputs correctly
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobExecutionId | Yes | The job execution ID from initiate_job response | |
| jobPayloadSchemaInstance | Yes | Job payload with all inputs populated according to workflow schema |
Implementation Reference
- src/index.ts:304-319 (handler)The main handler function for the 'execute_job' tool. It extracts jobExecutionId and jobPayloadSchemaInstance from arguments, makes a POST request to '/job/execute', and returns the response as text content.private async executeJob(args: any) { const { jobExecutionId, jobPayloadSchemaInstance } = args; const response = await this.axiosInstance.post("/job/execute", { jobExecutionId, jobPayloadSchemaInstance, }); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/index.ts:179-194 (schema)Input schema definition for the 'execute_job' tool, specifying the required parameters: jobExecutionId (string) and jobPayloadSchemaInstance (object).inputSchema: { type: "object", properties: { jobExecutionId: { type: "string", description: "The job execution ID from initiate_job response", }, jobPayloadSchemaInstance: { type: "object", description: "Job payload with all inputs populated according to workflow schema", }, }, required: ["jobExecutionId", "jobPayloadSchemaInstance"], },
- src/index.ts:175-195 (registration)The 'execute_job' tool registration in the getTools() method, which provides the tool list to MCP clients including name, description, and input schema.{ name: "execute_job", description: "Execute a job with populated input values. Use jobPayloadSchema from get_workflow_details to structure inputs correctly", inputSchema: { type: "object", properties: { jobExecutionId: { type: "string", description: "The job execution ID from initiate_job response", }, jobPayloadSchemaInstance: { type: "object", description: "Job payload with all inputs populated according to workflow schema", }, }, required: ["jobExecutionId", "jobPayloadSchemaInstance"], }, },
- src/index.ts:86-87 (registration)Switch case in the CallToolRequestSchema handler that registers and dispatches 'execute_job' calls to the executeJob method.case "execute_job": return await this.executeJob(args);