Skip to main content
Glama
156554395

Tencent Cloud COS MCP Server

by 156554395

delete_object

Remove objects from Tencent Cloud Object Storage using the object key to manage cloud storage and free up space.

Instructions

删除COS中的对象

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_keyYes要删除的对象键名

Implementation Reference

  • Core implementation of the delete_object tool logic, performing the actual deletion using the Tencent COS SDK.
    async deleteObject(key) { this._checkConfig(); try { const params = { Bucket: this.config.Bucket, Region: this.config.Region, Key: key }; await this.cos.deleteObject(params); return { success: true, key }; } catch (error) { throw new Error(`删除文件失败: ${error.message}`); } }
  • Input schema and tool metadata definition for delete_object.
    delete_object: { name: 'delete_object', description: '删除COS中的对象', inputSchema: { type: 'object', properties: { object_key: { type: 'string', description: '要删除的对象键名' } }, required: ['object_key'] } },
  • MCP CallToolRequestSchema handler dispatch for delete_object tool.
    case 'delete_object': const deleteResult = await cosService.deleteObject(args.object_key); return { content: [ { type: 'text', text: JSON.stringify({ success: true, data: deleteResult }, null, 2) } ] };
  • index.js:393-395 (registration)
    Registration of all tools (including delete_object) via ListToolsRequestSchema handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: Object.values(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/156554395/tx-cos-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server