Skip to main content
Glama

aiSuperResolution

Enhance image resolution using AI processing to improve clarity and detail from stored files.

Instructions

图片处理-超分辨率

Input Schema

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

Implementation Reference

  • The aiSuperResolution method in CIAIService that executes the AI super resolution image processing using Tencent Cloud COS 'ci-process=AISuperResolution' API.
    async aiSuperResolution(objectKey: string) {
      try {
        const result = await new Promise((resolve, reject) => {
          const outPutFileid = generateOutPutFileId(objectKey);
          this.cos.request(
            {
              Bucket: this.bucket, // 存储桶,必须字段
              Region: this.region, // 存储桶所在地域,必须字段 如 ap-beijing
              Key: objectKey, // 对象文件名,例如:folder/document.jpg。
              Method: 'POST', // 固定值
              Action: 'image_process', // 固定值
              Headers: {
                'Pic-Operations': JSON.stringify({
                  rules: [
                    {
                      fileid: `${outPutFileid}`,
                      rule: 'ci-process=AISuperResolution',
                    },
                  ],
                }),
              },
            },
            function (error, data) {
              if (error) {
                // 处理请求失败
                reject(error);
              } else {
                // 处理请求成功
                resolve(data);
              }
            },
          );
        });
    
        return {
          isSuccess: true,
          message: '图片超分成功',
          data: result,
        };
      } catch (error) {
        return {
          isSuccess: false,
          message: '图片超分失败',
          data: error,
        };
      }
    }
  • src/server.ts:359-377 (registration)
    Registration of the 'aiSuperResolution' tool in the MCP server using server.tool(), including input schema for objectKey and the wrapper handler that calls CIAIInstance.aiSuperResolution.
    server.tool(
      'aiSuperResolution',
      '图片处理-超分辨率',
      {
        objectKey: z.string().describe('图片在存储桶里的路径'),
      },
      async ({ objectKey }) => {
        const res = await CIAIInstance.aiSuperResolution(objectKey);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(res.data, null, 2),
            },
          ],
          isError: !res.isSuccess,
        };
      },
    );
  • Zod input schema definition for the aiSuperResolution tool: requires objectKey as string describing the image path in the bucket.
      objectKey: z.string().describe('图片在存储桶里的路径'),
    },
  • Creation of CIAIInstance used by the aiSuperResolution tool handler.
    const CIAIInstance = new CIAIService(bucket, region, cos);
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 mentions 'image processing' and 'super resolution' but doesn't disclose behavioral traits such as whether it modifies the original image, requires authentication, has rate limits, or what the output entails (e.g., enhanced image file). This leaves significant gaps for a tool that likely performs computational transformations.

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 extremely concise with just two words ('图片处理-超分辨率'), which is front-loaded and wastes no space. It efficiently conveys the core function without unnecessary elaboration, making it easy to parse quickly.

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 of image processing and the lack of annotations and output schema, the description is incomplete. It doesn't explain what super resolution does operationally, what the output is (e.g., a new image URL, modified file), or any constraints. For a tool with no structured behavioral data, this minimal description fails to provide sufficient context for 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 description adds no parameter semantics beyond what the input schema provides. The schema has 100% coverage with one parameter 'objectKey' clearly described as '图片在存储桶里的路径' (path of the image in the storage bucket). Since schema coverage is high, the baseline is 3, and the description doesn't compensate with additional details like format requirements or examples.

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 - super resolution', which states the general purpose (verb+resource) but is vague. It doesn't specify what super resolution does (e.g., upscaling images, enhancing details) or distinguish it from sibling image tools like aiPicMatting or waterMarkFont. The purpose is understandable but lacks specificity.

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. The description doesn't mention prerequisites (e.g., input image format), exclusions, or compare it to siblings like assessQuality or imageInfo. Usage is implied only by the name, with no explicit context for selection.

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