Skip to main content
Glama
avclabs

@avclabs.ai/enhance-mcp

Official
by avclabs

get_task_status

Retrieve the current state and progress of a video enhancement task using its task ID.

Instructions

查询视频增强任务状态

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes任务ID

Implementation Reference

  • Input schema for get_task_status tool: accepts a single required 'task_id' string parameter.
    const GetTaskStatusSchema = z.object({
      task_id: z.string().describe('任务ID'),
    });
  • src/server.ts:133-161 (registration)
    Registration of the 'get_task_status' tool on the MCP server with schema and handler callback.
    // get_task_status tool
    this.server.tool(
      'get_task_status',
      '查询视频增强任务状态',
      GetTaskStatusSchema.shape,
      async (args) => {
        try {
          const result = await this.getTaskStatus(args.task_id);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify(result, null, 2),
              },
            ],
          };
        } catch (error) {
          const errorMessage = error instanceof Error ? error.message : String(error);
          return {
            content: [
              {
                type: 'text',
                text: JSON.stringify({ success: false, error: errorMessage }, null, 2),
              },
            ],
          };
        }
      }
    );
  • Core handler for get_task_status. Sends GET request to API endpoint /api/v3/contents/generations/tasks/{taskId} and returns structured response with status, progress, video_url, and timestamps.
    private async getTaskStatus(taskId: string): Promise<any> {
      const response = await this.client.get(`/api/v3/contents/generations/tasks/${taskId}`);
      const data = response.data;
    
      if (data.code !== 0 && data.code !== 200) {
        return { success: false, error: data.message };
      }
    
      const result = data.data;
      return {
        success: true,
        task_id: result.task_id,
        status: result.status,
        progress: result.progress || 0,
        video_url: result.video_url,
        debug_video_url_length: result.video_url?.length,
        debug_video_url_full: result.video_url,
        error_message: result.error_message,
        created_at: result.created_at,
        updated_at: result.updated_at,
      };
    }
Behavior2/5

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

No annotations provided, and the description only states the purpose without disclosing any behavioral traits such as polling requirements, rate limits, or expected response behavior.

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?

Single sentence with no wasted words; efficient and to the point.

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 status query with one parameter, the description is mostly complete but could benefit from mentioning possible return statuses or output format since no output schema is provided.

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%, and the description adds no additional meaning beyond what is already in the input schema, so baseline 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 verb 'query' and the resource 'video enhancement task status', distinguishing from sibling tools 'create_task' and 'enhance_video_sync' which have different actions.

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?

No explicit guidance on when to use this tool versus alternatives, but the context of sibling tools implies it is for checking status after creation or enhancement.

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/avclabs/enhance-mcp'

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