Skip to main content
Glama

check-generation-status

Monitor the progress of video generation tasks on Vidu MCP Server by providing the task ID. Ensure timely status updates for seamless workflow management.

Instructions

Check the status of a video generation task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYesTask ID returned by the image-to-video tool

Implementation Reference

  • Handler function for the 'check-generation-status' tool that performs an API call to check the task status, handles success/failure/in-progress states, extracts video URLs and credits, and returns formatted markdown text responses.
      async ({ task_id }) => {
        try {
          const statusResponse = await fetch(`${VIDU_API_BASE_URL}/ent/v2/tasks/${task_id}/creations`, {
            method: "GET",
            headers: {
              "Content-Type": "application/json",
              "Authorization": `Token ${VIDU_API_KEY}`
            }
          });
    
          if (!statusResponse.ok) {
            const errorData = await statusResponse.text();
            return {
              isError: true,
              content: [
                {
                  type: "text",
                  text: `Error checking generation status: ${errorData}`
                }
              ]
            };
          }
    
          const statusData = await statusResponse.json() as StatusResponse;
          
          if (statusData.state === "success") {
            if (statusData.creations && statusData.creations.length > 0) {
              const videoUrl = statusData.creations[0].url;
              const coverUrl = statusData.creations[0].cover_url;
              const credits = statusData.credits;
              
              return {
                content: [
                  {
                    type: "text",
                    text: `
    Generation task complete!
    
    Task ID: ${task_id}
    Status: ${statusData.state}
    Credits used: ${credits || 'N/A'}
    Video URL: ${videoUrl}
    Cover Image URL: ${coverUrl}
    
    Note: These URLs are valid for one hour.
    `
                  }
                ]
              };
            } else {
              return {
                content: [
                  {
                    type: "text",
                    text: `
    Generation task complete but no download URLs available.
    
    Task ID: ${task_id}
    Status: ${statusData.state}
    `
                  }
                ]
              };
            }
          } else if (statusData.state === "failed") {
            return {
              isError: true,
              content: [
                {
                  type: "text",
                  text: `Generation task failed with error code: ${statusData.err_code || "Unknown error"}`
                }
              ]
            };
          } else {
            return {
              content: [
                {
                  type: "text",
                  text: `
    Generation task is still in progress.
    
    Task ID: ${task_id}
    Current Status: ${statusData.state}
    
    You can check again later using the same task ID.
    `
                }
              ]
            };
          }
        } catch (error: any) {
          console.error("Error in check-generation-status tool:", error);
          return {
            isError: true,
            content: [
              {
                type: "text",
                text: `An unexpected error occurred: ${error.message}`
              }
            ]
          };
        }
      }
  • Zod input schema defining the required 'task_id' parameter for the tool.
    {
      task_id: z.string().describe("Task ID returned by the image-to-video tool")
    },
  • index.ts:288-290 (registration)
    Registration of the 'check-generation-status' tool on the MCP server, including name, description, schema, and inline handler.
    server.tool(
      "check-generation-status",
      "Check the status of a video generation task",
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool checks status but doesn't disclose behavioral traits like whether it's read-only, safe to call repeatedly, rate-limited, or what the response format might be (e.g., pending, completed, failed). This leaves significant gaps for an agent to understand how to interact with it effectively.

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 a single, clear sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the complexity of a status-checking tool with no annotations and no output schema, the description is incomplete. It doesn't explain what statuses might be returned, error handling, or usage patterns (e.g., polling intervals), which are crucial for an agent to use this tool correctly in a workflow.

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 description coverage is 100%, with the parameter 'task_id' fully described as 'Task ID returned by the image-to-video tool.' The description adds no additional parameter semantics beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

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

Purpose4/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 as checking the status of a video generation task, which is a specific verb (check) and resource (video generation task). However, it doesn't explicitly distinguish this from sibling tools like 'image-to-video' or 'upload-image' beyond the implied relationship through the task_id parameter description.

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

Usage Guidelines3/5

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

The description implies usage context by referencing 'video generation task,' and the parameter description mentions 'task_id returned by the image-to-video tool,' suggesting when to use it (after initiating a generation). However, it lacks explicit guidance on when not to use it or alternatives, such as whether it's for polling or one-time checks.

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

Related 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/el-el-san/vidu-mcp-server'

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