Skip to main content
Glama

imageInfo

Extract metadata and technical details from images stored in cloud storage to analyze file properties and dimensions.

Instructions

图片处理-获取图片信息

Input Schema

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

Implementation Reference

  • The core handler function in CIPicService that performs the COS 'imageInfo' request to retrieve 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 tool registration for 'imageInfo', defining name, description, input schema, and handler wrapper that calls the service method.
    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,
        };
      },
    );
  • Input schema validation using Zod for the 'objectKey' parameter.
    {
      objectKey: z.string().describe('图片在存储桶里的路径'),
    },
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 states '获取图片信息' (get image information), implying a read-only operation, but doesn't specify what information is returned (e.g., metadata, dimensions), whether it requires authentication, rate limits, or error conditions. The description is too minimal to adequately inform the agent about behavioral traits beyond the basic action.

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 a single phrase '图片处理-获取图片信息', which is concise and front-loaded with the core action. However, it's overly terse and lacks necessary details, bordering on under-specification rather than optimal brevity. It earns a 4 for efficiency but loses points for not providing enough context in its minimal form.

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 (a tool to retrieve image information), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'image information' entails, the return format, or any behavioral nuances. The agent is left guessing about the output and usage context, making this inadequate for effective tool selection and 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?

The input schema has 100% description coverage, with 'objectKey' clearly documented as '图片在存储桶里的路径' (path of the image in the storage bucket). The description adds no additional parameter semantics beyond this. According to the rules, with high schema coverage (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 the verb '获取' (get) and resource '图片信息' (image information), but doesn't clarify what information is retrieved (e.g., metadata, dimensions, format) or how it differs from sibling tools like 'getObject' or 'assessQuality'. The purpose is vague rather than clearly distinguished.

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 no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an objectKey), exclusions, or comparisons to siblings like 'getObject' (which might retrieve raw image data) or 'assessQuality' (which might evaluate image quality). Without any usage context, the agent must infer based on the name alone.

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