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, }; }, );

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