Skip to main content
Glama

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
NameRequiredDescriptionDefault
presentation_idYes
timeout_secondsNo
poll_interval_secondsNo
max_poll_interval_secondsNo

Implementation Reference

  • 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);
        }
      }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ToseaAI/mcp-ToseaAI'

If you have feedback or need assistance with the MCP directory API, please join our Discord server