transcribe_cancel_job
Cancel an ongoing asynchronous transcription job by providing its job ID.
Instructions
Cancel an async transcription job (best-effort).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_id | Yes |
Implementation Reference
- src/index.ts:1031-1043 (handler)Handler function for the transcribe_cancel_job tool. Calls transcribeJobManager.cancelJob() and returns the result as JSON.
private async handleTranscribeCancelJob(args: { job_id: string; }): Promise<{ content: Array<{ type: string; text: string }> }> { const ok = this.transcribeJobManager.cancelJob(args.job_id); return { content: [ { type: "text", text: JSON.stringify({ ok }, null, 2), }, ], }; } - src/index.ts:380-388 (schema)Tool registration with inputSchema: requires a single 'job_id' string property.
name: "transcribe_cancel_job", description: "Cancel an async transcription job (best-effort).", inputSchema: { $schema: "https://json-schema.org/draft/2020-12/schema", type: "object", properties: { job_id: { type: "string" } }, required: ["job_id"], additionalProperties: false, }, - src/index.ts:350-357 (registration)ListToolsRequestSchema handler that registers the transcribe_cancel_job tool in the tools array.
$schema: "https://json-schema.org/draft/2020-12/schema", type: "object", properties: { upload_id: { type: "string" }, skip_compression: { type: "boolean" }, engine: { type: "string", enum: ["openai", "local", "auto"] }, language: { type: "string" }, as_text: { type: "boolean" }, - src/index.ts:484-487 (registration)CallToolRequestSchema case statement dispatching 'transcribe_cancel_job' to handleTranscribeCancelJob.
case "transcribe_cancel_job": return await this.handleTranscribeCancelJob( args as { job_id: string }, ); - The cancelJob() method in TranscribeJobManager. Sets the job's 'cancelled' flag to true (best-effort cancellation).
cancelJob(id: string): { ok: boolean } { const job = this.jobs.get(id); if (!job) return { ok: false }; job.cancelled = true; return { ok: true }; }