Skip to main content
Glama
Tencent

Tencent Cloud COS MCP Server

Official
by Tencent

imageInfo

Extract metadata and details from images stored in Tencent Cloud Object Storage (COS) using the specified file path for efficient image management and processing.

Instructions

图片处理-获取图片信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
objectKeyYes图片在存储桶里的路径

Implementation Reference

  • Core handler function that executes the imageInfo tool logic using the COS SDK to fetch image information.
    async imageInfo(objectKey: string) {
      try {
        const result = await this.cos.request({
          Bucket: this.bucket,
          Region: this.region,
          Method: 'GET',
          Key: objectKey,
          Action: 'imageInfo',
          RawBody: false,
        });
        return {
          isSuccess: true,
          message: '获取图片信息成功',
          data: result,
        };
      } catch (error) {
        return {
          isSuccess: false,
          message: '获取图片信息失败',
          data: error,
        };
      }
    }
  • src/server.ts:319-337 (registration)
    MCP server tool registration for 'imageInfo', including input schema (objectKey: z.string()) and wrapper that calls the service handler.
    server.tool(
      'imageInfo',
      '图片处理-获取图片信息',
      {
        objectKey: z.string().describe('图片在存储桶里的路径'),
      },
      async ({ objectKey }) => {
        const res = await CIPicInstance.imageInfo(objectKey);
        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 the full burden. It states 'get image information' but doesn't disclose behavioral traits such as whether this is a read-only operation, requires specific permissions, has rate limits, or what the output format might be. The description is minimal and lacks essential context for safe and effective use.

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

Conciseness4/5

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

The description is very concise ('图片处理-获取图片信息'), consisting of a single phrase. It's front-loaded but potentially under-specified. While efficient, it might benefit from slightly more detail to improve clarity without becoming verbose.

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 tool has no annotations, no output schema, and a minimal description, the description is incomplete. It doesn't explain what 'image information' entails, how results are returned, or any behavioral aspects. For a tool with 1 parameter and no structured context, more detail is needed to guide effective use.

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 input schema has 1 parameter with 100% description coverage ('图片在存储桶里的路径' - path of the image in the storage bucket). The description adds no additional meaning beyond the schema, as it doesn't elaborate on parameter usage or constraints. With high schema coverage, the baseline score of 3 is appropriate.

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

Purpose3/5

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

The description '图片处理-获取图片信息' (Image processing - get image information) states a general purpose but lacks specificity. It mentions 'get image information' but doesn't specify what information (e.g., metadata, dimensions, format) or distinguish it from sibling tools like 'getObject' or 'assessQuality'. The purpose is clear but vague.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context, or exclusions, and there's no comparison to sibling tools like 'getObject' (which might retrieve raw image data) or 'assessQuality' (which might analyze image quality). Usage is implied but not explicit.

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