tosea_wait_for_job
Monitor presentation job status until completion or failure, returning final results for automated presentation workflows.
Instructions
Poll a presentation job until completed or failed and return the final job payload.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| presentation_id | Yes | ||
| timeout_seconds | No | ||
| poll_interval_seconds | No | ||
| max_poll_interval_seconds | No |
Implementation Reference
- src/tools.ts:360-386 (handler)The tool 'tosea_wait_for_job' is defined and implemented in src/tools.ts using the MCP server tool registration. It validates parameters and calls 'client.waitForJob' to perform the actual polling logic.
server.tool( "tosea_wait_for_job", "Poll a presentation job until completed or failed and return the final job payload.", { presentation_id: z.string().uuid(), timeout_seconds: z.number().int().min(5).max(3600).default(900), poll_interval_seconds: z.number().int().min(1).max(60).default(2), max_poll_interval_seconds: z.number().int().min(1).max(120).default(10) }, async ({ presentation_id, timeout_seconds, poll_interval_seconds, max_poll_interval_seconds }) => { try { return asToolResult( await client.waitForJob(presentation_id, { timeoutMs: timeout_seconds * 1000, pollIntervalMs: poll_interval_seconds * 1000, maxPollIntervalMs: max_poll_interval_seconds * 1000 }) ); } catch (error) { throw wrapToolError(error); } }