gaudio_get_job
Retrieve job status and results for audio processing. Input job ID and model to view waiting, running, success, or failed status.
Instructions
Check job status and get results. Status: 'waiting' (queued), 'running' (processing), 'success' (done, downloadUrl included), 'failed' (error). Download URLs expire after 48 hours.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | Job ID from gaudio_create_job or gaudio_separate_audio | |
| model | Yes | Model name used to create the job |
Implementation Reference
- src/tools/get-job.ts:6-48 (handler)Main handler for 'gaudio_get_job' tool. Registers the tool on the MCP server, validates inputs with Zod schema (jobId, model), looks up model info, calls client.getJob() to check status, and returns a formatted response with jobId, model, status, and optionally downloadUrl (success) or errorMessage (failed).
export function registerGetJob(server: McpServer, client: GaudioClient) { server.tool( "gaudio_get_job", "Check job status and get results. Status: 'waiting' (queued), 'running' (processing), 'success' (done, downloadUrl included), 'failed' (error). Download URLs expire after 48 hours.", { jobId: z.string().describe("Job ID from gaudio_create_job or gaudio_separate_audio"), model: z.string().describe("Model name used to create the job"), }, async ({ jobId, model }) => { const modelInfo = getModel(model); if (!modelInfo) { return { content: [{ type: "text" as const, text: `Unknown model: ${model}` }], isError: true, }; } const res = await client.getJob(model, jobId); const data = res.resultData ?? {}; const result: Record<string, unknown> = { jobId, model, status: data.status, }; if (data.status === "success") { result.downloadUrl = data.downloadUrl; result.expireAt = data.expireAt; } else if (data.status === "failed") { result.errorMessage = data.errorMessage; } return { content: [ { type: "text" as const, text: JSON.stringify(result, null, 2), }, ], }; }, ); - src/tools/get-job.ts:10-13 (schema)Zod input schema for 'gaudio_get_job': requires jobId (string) and model (string) parameters.
{ jobId: z.string().describe("Job ID from gaudio_create_job or gaudio_separate_audio"), model: z.string().describe("Model name used to create the job"), }, - src/index.ts:30-30 (registration)Registration call: registerGetJob(server, client) invoked in the main entry point to register the tool on the MCP server.
registerGetJob(server, client); - src/api/client.ts:171-178 (helper)API client helper: getJob() sends a GET request to /{model}/jobs/{jobId} and returns the raw API response.
async getJob(model: string, jobId: string): Promise<ApiResponse> { return this.request("GET", `/${model}/jobs/${jobId}`); } async getKeyInfo(): Promise<ApiResponse> { return this.request("GET", "/key/info"); } } - src/models/registry.ts:120-122 (helper)getModel() helper used by the handler to validate that the model name exists in the registry.
export function getModel(name: string): ModelInfo | undefined { return MODEL_REGISTRY.find((m) => m.name === name); }