get_job_results
Retrieve results from completed job executions in the Opus workflow automation platform using the job execution ID.
Instructions
Get the results of a completed job execution. Only works when job status is COMPLETED
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobExecutionId | Yes | The job execution ID to retrieve results for |
Implementation Reference
- src/index.ts:337-351 (handler)The handler function that implements the 'get_job_results' tool logic: extracts jobExecutionId, fetches results from the API endpoint `/job/${jobExecutionId}/results`, and returns formatted JSON response.private async getJobResults(args: any) { const { jobExecutionId } = args; const response = await this.axiosInstance.get( `/job/${jobExecutionId}/results` ); return { content: [ { type: "text", text: JSON.stringify(response.data, null, 2), }, ], }; }
- src/index.ts:215-224 (schema)Input schema defining the required 'jobExecutionId' parameter for the tool.inputSchema: { type: "object", properties: { jobExecutionId: { type: "string", description: "The job execution ID to retrieve results for", }, }, required: ["jobExecutionId"], },
- src/index.ts:211-225 (registration)Registration of the 'get_job_results' tool in the tools list returned by getTools(), including name, description, and input schema.{ name: "get_job_results", description: "Get the results of a completed job execution. Only works when job status is COMPLETED", inputSchema: { type: "object", properties: { jobExecutionId: { type: "string", description: "The job execution ID to retrieve results for", }, }, required: ["jobExecutionId"], }, },
- src/index.ts:90-91 (registration)Dispatch case in the CallToolRequestSchema handler that calls the getJobResults method when the tool name matches.case "get_job_results": return await this.getJobResults(args);