Skip to main content
Glama

describeMediaJob

Retrieve results for media intelligent cover generation tasks by providing a job ID from Tencent Cloud COS media processing operations.

Instructions

根据 jobid 查询指定的媒体智能封面任务结果

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYes要查询的任务ID,可通过提交智能封面任务的响应中获取。

Implementation Reference

  • The core handler function that performs the actual API call to query the media job status using the COS client.
    async describeMediaJob(jobId: string) {
      try {
        let host = this.bucket + '.ci.' + this.region + '.myqcloud.com';
        let url = 'https://' + host + '/doc_jobs/' + jobId;
        const result = await new Promise((resolve, reject) => {
          this.cos.request(
            {
              Bucket: this.bucket, // Bucket 格式:test-1250000000
              Region: this.region,
              Method: 'GET',
              Key: 'doc_jobs/' + jobId,
              Url: url,
            },
            function (error, data) {
              if (error) {
                // 处理请求失败
                reject(error);
              } else {
                // 处理请求成功
                resolve(data);
                //获取返回的jobid, 去调查询任务接口, 返回具体信息
              }
            },
          );
        });
    
        return {
          isSuccess: true,
          message: '智能封面任务查询成功',
          data: result,
        };
      } catch (error) {
        return {
          isSuccess: false,
          message: '智能封面任务查询失败',
          data: error,
        };
      }
    }
  • src/server.ts:467-487 (registration)
    MCP tool registration, including input schema (Zod) and thin wrapper handler that delegates to the service implementation.
    server.tool(
      'describeMediaJob',
      '根据 jobid 查询指定的媒体智能封面任务结果',
      {
        jobId: z
          .string()
          .describe('要查询的任务ID,可通过提交智能封面任务的响应中获取。'),
      },
      async ({ jobId }) => {
        const res = await CIMediaInstance.describeMediaJob(jobId);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(res.data, null, 2),
            },
          ],
          isError: !res.isSuccess,
        };
      },
    );
  • Input schema definition using Zod for the jobId parameter.
    {
      jobId: z
        .string()
        .describe('要查询的任务ID,可通过提交智能封面任务的响应中获取。'),
    },
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 of behavioral disclosure. It describes a query operation ('查询'), implying it's likely read-only, but doesn't confirm this or mention other traits like rate limits, authentication needs, or error handling. For a tool with zero annotation coverage, this is insufficient to fully inform the agent about behavioral expectations.

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, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy for an AI agent to parse quickly. Every part of the sentence contributes to understanding the tool's function.

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

Completeness3/5

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

Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is adequate but has gaps. It explains the basic purpose and parameter source, but lacks details on behavioral traits, usage context, and output format. Without annotations or an output schema, the description should do more to compensate, but it meets a minimum viable standard.

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?

The description adds minimal semantic context: it implies the tool uses a jobId to query results, but the input schema already provides 100% coverage with a clear description for the jobId parameter. Since schema_description_coverage is high, the baseline is 3, and the description doesn't significantly enhance understanding beyond what the schema states.

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: '根据 jobid 查询指定的媒体智能封面任务结果' (Query specified media smart cover job results based on jobid). It specifies the verb (query/describe) and resource (media smart cover job results), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'createMediaSmartCoverJob' or 'describeDocProcessJob', which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides minimal usage guidance: it mentions that jobId can be obtained from the response of submitting a smart cover task. However, it doesn't specify when to use this tool versus alternatives (e.g., when to query results vs. create a job), nor does it provide context on prerequisites or exclusions. This lack of explicit guidance limits its helpfulness for an AI agent.

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/xiaomizhoubaobei/MCP'

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