Skip to main content
Glama
Tencent

Tencent Cloud COS MCP Server

Official
by Tencent

describeMediaJob

Retrieve details of a media intelligent cover task by specifying the job ID using the MCP server, enabling query and management of task results on Tencent Cloud COS without coding.

Instructions

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

Input Schema

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

Implementation Reference

  • Core implementation of describeMediaJob: sends GET request to Tencent Cloud COS CI API endpoint to retrieve the status and details of the specified media job.
    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,
        };
      }
    }
  • Input schema for describeMediaJob tool: requires jobId as a string.
    {
      jobId: z
        .string()
        .describe('要查询的任务ID,可通过提交智能封面任务的响应中获取。'),
    },
  • src/server.ts:467-487 (registration)
    MCP server.tool registration for 'describeMediaJob', including description, input schema, and thin handler that delegates to CIMediaService.describeMediaJob and formats response.
    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,
        };
      },
    );
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states it queries results but doesn't disclose behavioral traits like whether it's read-only (implied but not stated), potential errors (e.g., invalid job IDs), rate limits, authentication needs, or what the output contains (e.g., status, cover image URL). For a query tool with zero annotation coverage, this leaves significant gaps in understanding how it behaves.

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 in Chinese that directly states the purpose without unnecessary words. It's appropriately sized and front-loaded, with every part contributing to understanding the tool's function.

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 no annotations and no output schema, the description is incomplete for a tool that queries job results. It doesn't explain what the return values include (e.g., success/failure, cover image details, error messages), which is critical for an agent to use it correctly. The schema covers the input well, but overall context is lacking for effective tool invocation.

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 'jobId' fully documented in the schema as '要查询的任务ID,可通过提交智能封面任务的响应中获取' (task ID to query, obtainable from submitting smart cover tasks). The description adds no additional meaning beyond this, as it essentially repeats the same information. Baseline is 3 when 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 verb ('查询' - query) and resource ('媒体智能封面任务结果' - media smart cover job results) with a specific identifier ('根据 jobid' - based on job ID). It distinguishes from siblings like 'createMediaSmartCoverJob' (which creates jobs) and 'describeDocProcessJob' (which queries document jobs). However, it doesn't explicitly mention it's for retrieving results rather than status, which could be slightly more specific.

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 mentioning job IDs come from '提交智能封面任务的响应中获取' (obtained from submitting smart cover tasks), suggesting it should be used after job creation. However, it doesn't explicitly state when to use this vs. alternatives like checking job status through other means or when not to use it (e.g., for non-media jobs). No explicit alternatives are named.

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/Tencent/cos-mcp'

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