cortex_get_job_report
Retrieve the complete report for a completed analysis job by providing the job ID.
Instructions
Get the full report of a completed analysis job
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | The job ID to get the report for |
Implementation Reference
- src/tools/jobs.ts:40-68 (handler)Handler function for the 'cortex_get_job_report' tool. Calls client.getJobReport(jobId) and returns the report as JSON. Handles errors with isError flag.
server.tool( "cortex_get_job_report", "Get the full report of a completed analysis job", { jobId: z.string().describe("The job ID to get the report for"), }, async ({ jobId }) => { try { const report = await client.getJobReport(jobId); return { content: [ { type: "text" as const, text: JSON.stringify(report, null, 2), }, ], }; } catch (error) { return { content: [ { type: "text" as const, text: `Error getting job report: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }, - src/tools/jobs.ts:43-44 (schema)Input schema for the 'cortex_get_job_report' tool - requires a single 'jobId' string parameter.
{ jobId: z.string().describe("The job ID to get the report for"), - src/tools/jobs.ts:5-8 (registration)The registerJobTools function that registers the tool on the McpServer. Called from src/index.ts line 35.
export function registerJobTools( server: McpServer, client: CortexClient, ): void { - src/index.ts:34-36 (registration)Registration call in main entry point - registerJobTools(server, client) is invoked to register all job tools.
registerAnalyzerTools(server, client); registerJobTools(server, client); registerResponderTools(server, client); - src/client.ts:287-291 (helper)The client.getJobReport method called by the handler. Makes a GET request to /api/job/{jobId}/report.
async getJobReport(jobId: string): Promise<JobReport> { return this.request<JobReport>( `/job/${encodeURIComponent(jobId)}/report`, ); }