Skip to main content
Glama

get_asr_task

Read-only

Poll the status of an automatic speech recognition task and retrieve the transcript with timestamps when processing completes. Returns status values: queued, downloading, transcribing, finalizing, done, or failed.

Instructions

Poll the status of an ASR task created by transcribe_video. Returns one of queued, downloading, transcribing, finalizing, done, or failed. When status is done, includes the full transcript with timestamps. Recommended polling interval: 3-5 seconds. Free — does not consume credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID returned by transcribe_video.

Implementation Reference

  • Schema definition for the 'get_asr_task' tool. Declares the tool name, description, annotations (using ANN.ASR_POLL), and inputSchema with a required 'task_id' string parameter. This tells the MCP client what parameters the tool accepts.
    {
      name: "get_asr_task",
      description:
        "Poll the status of an ASR task created by transcribe_video. Returns one of `queued`, `downloading`, `transcribing`, `finalizing`, `done`, or `failed`. When status is `done`, includes the full transcript with timestamps. Recommended polling interval: 3-5 seconds. Free — does not consume credits.",
      annotations: { title: "Get ASR Task Status", ...ANN.ASR_POLL },
      inputSchema: {
        type: "object",
        properties: {
          task_id: {
            type: "string",
            description: "Task ID returned by transcribe_video.",
            minLength: 1,
          },
        },
        required: ["task_id"],
      },
    },
  • src/index.js:443-448 (registration)
    Registration of all tools (including get_asr_task) in the MCP server via the TOOLS array. The ListToolsRequestSchema handler returns the TOOLS array containing the get_asr_task schema definition.
    const server = new Server(
      { name: "subdownload", version: "1.0.0" },
      { capabilities: { tools: {} } }
    );
    
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: TOOLS }));
  • Handler for tool calls. The CallToolRequestSchema handler forwards any tool call (including 'get_asr_task') to the upstream SubDownload API via callUpstream, passing the tool name and arguments as-is. There is no local implementation — this is a proxy that delegates to https://api.subdownload.com/mcp.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      try {
        return await callUpstream(
          request.params.name,
          request.params.arguments || {}
        );
      } catch (err) {
        return {
          content: [{ type: "text", text: err.message || String(err) }],
          isError: true,
        };
      }
    });
  • The callUpstream helper function that executes the actual logic. It sends a JSON-RPC tools/call request with the tool name and arguments to the upstream SubDownload MCP endpoint, authenticating with the Bearer token from SUBDOWNLOAD_API_KEY.
    async function callUpstream(name, args) {
      if (!API_KEY) {
        throw new Error(
          "SUBDOWNLOAD_API_KEY env var is not set. Get one at https://subdownload.com/account, then run with -e SUBDOWNLOAD_API_KEY=<your-key>."
        );
      }
      const res = await fetch(UPSTREAM_URL, {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
          Accept: "application/json, text/event-stream",
          Authorization: `Bearer ${API_KEY}`,
        },
        body: JSON.stringify({
          jsonrpc: "2.0",
          id: Date.now(),
          method: "tools/call",
          params: { name, arguments: args },
        }),
      });
      const text = await res.text();
      let body;
      try {
        body = JSON.parse(text);
      } catch {
        throw new Error(
          `Upstream returned non-JSON response (HTTP ${res.status}): ${text.slice(0, 200)}`
        );
      }
      if (body.error) {
        throw new Error(body.error.message || JSON.stringify(body.error));
      }
      return body.result;
    }
  • Annotation hints (ANN.ASR_POLL) used by get_asr_task. Marks the tool as readOnlyHint=true (safe to call), idempotentHint=false (status changes over time), and openWorldHint=false (hits own backend only).
    // ASR poll — hits our backend only, status changes over time
    ASR_POLL: {
      readOnlyHint: true,
      destructiveHint: false,
      idempotentHint: false,
      openWorldHint: false,
    },
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate readOnlyHint=true and destructiveHint=false. The description adds value by listing all possible status values ('queued', 'downloading', 'transcribing', 'finalizing', 'done', 'failed'), explaining that a full transcript with timestamps is included when status is 'done', and recommending a polling interval. It does not mention rate limits or idempotency, but overall it provides good behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences: first states purpose, second lists statuses, third gives polling interval and cost. No fluff, front-loaded with the key action. Each sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple polling tool with one parameter and no output schema, the description covers status outcomes, behavior when done, and polling interval. It lacks error handling details (e.g., what happens with invalid task_id), but overall it is sufficiently complete for an AI agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with the single parameter 'task_id' described as 'Task ID returned by transcribe_video.' The description does not add additional meaning beyond what the schema already provides. Baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Poll the status of an ASR task created by transcribe_video.' It specifies the verb (poll), resource (ASR task), and links to the creating tool. This differentiates it from siblings like fetch_transcript (which retrieves final transcripts) and transcribe_video (which creates tasks).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: it is for polling status, recommends a polling interval of 3-5 seconds, and notes it is free (no credit consumption). It implicitly indicates when to use (after transcribe_video) but does not explicitly state when not to use or cite alternatives. The cost disclosure is an added benefit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/SubDownload/subdownload-mcp'

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