Skip to main content
Glama

assessQuality

Analyze image quality by processing stored image files to evaluate visual characteristics and technical parameters.

Instructions

图片处理-图片质量评估

Input Schema

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

Implementation Reference

  • MCP tool handler that calls the assessQuality service method on CIAIInstance and formats the result into MCP content structure with error flag.
    async ({ objectKey }) => {
      const res = await CIAIInstance.assessQuality(objectKey);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(res.data, null, 2),
          },
        ],
        isError: !res.isSuccess,
      };
    },
  • Zod input schema defining the 'objectKey' parameter for the assessQuality tool.
    {
      objectKey: z.string().describe('图片在存储桶里的路径'),
    },
  • src/server.ts:339-357 (registration)
    Registration of the 'assessQuality' tool using server.tool, specifying name, description, input schema, and handler function.
    server.tool(
      'assessQuality',
      '图片处理-图片质量评估',
      {
        objectKey: z.string().describe('图片在存储桶里的路径'),
      },
      async ({ objectKey }) => {
        const res = await CIAIInstance.assessQuality(objectKey);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(res.data, null, 2),
            },
          ],
          isError: !res.isSuccess,
        };
      },
    );
  • Core helper function in CIAIService class that performs the Tencent Cloud COS image quality assessment via CI process request.
    async assessQuality(objectKey: string) {
      try {
        const result = await this.cos.request({
          Bucket: this.bucket,
          Region: this.region,
          Method: 'GET',
          Key: objectKey,
          Query: {
            'ci-process': 'AssessQuality',
          },
        });
    
        return {
          isSuccess: true,
          message: '图片处理成功',
          data: result,
        };
      } catch (error) {
        return {
          isSuccess: false,
          message: '图片处理失败',
          data: error,
        };
      }
    }
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 the tool assesses image quality but fails to disclose behavioral traits like whether it's read-only, what the output format is (e.g., scores, reports), latency, or error handling. This leaves significant gaps for an agent to understand how to invoke it effectively.

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, efficient phrase '图片处理-图片质量评估' that is front-loaded and wastes no words. However, it could be more structured by separating purpose from context, but it earns high marks for brevity.

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. It lacks details on what the assessment returns (e.g., quality scores, metrics), how results are interpreted, or any error conditions. For a tool with one parameter but unknown output behavior, this leaves the agent with insufficient context.

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 one parameter 'objectKey' clearly described as '图片在存储桶里的路径' (path of the image in the storage bucket). The description adds no additional meaning beyond the schema, but since coverage is high, the baseline score of 3 is appropriate as the schema adequately documents the parameter.

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 '图片处理-图片质量评估' translates to 'Image processing - image quality assessment', which provides a general purpose (assessing image quality) but lacks specificity about what exactly is evaluated (e.g., sharpness, noise, artifacts) and how it differs from sibling tools like 'imageInfo' or 'aiSuperResolution'. It's vague but not tautological.

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 such as 'imageInfo' (which might provide basic metadata) or 'aiSuperResolution' (which enhances quality). The description implies usage for quality assessment but offers no context on prerequisites, limitations, or comparisons to siblings.

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