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

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action is 'delete,' which implies a destructive mutation, but fails to add crucial context such as whether deletion is permanent, if it requires specific permissions, what happens on success/failure, or any rate limits. This is a significant gap for a mutation tool with zero annotation coverage.

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 a single, efficient sentence ('删除COS中的对象') that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, 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 tool's complexity (a destructive mutation with no annotations and no output schema), the description is incomplete. It lacks critical information such as behavioral traits (e.g., permanence, error handling), usage context, and output expectations. While the parameter is well-covered by the schema, the overall description fails to compensate for the absence of annotations and output schema.

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 the parameter 'object_key' clearly documented as '要删除的对象键名' (the key name of the object to delete). The description adds no additional meaning beyond this, as it doesn't elaborate on format, constraints, or examples. Given the high schema coverage, a baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description '删除COS中的对象' clearly states the action (delete) and resource (object in COS), making the purpose immediately understandable. However, it doesn't explicitly differentiate this destructive operation from its sibling tools (get_signed_url, list_objects, upload_file, upload_multiple), which are all read or create operations, so it misses the opportunity for explicit sibling differentiation.

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 existing object to delete), exclusions (e.g., not for deleting buckets or other resources), or comparisons with siblings (e.g., use list_objects first to verify existence). This leaves the agent with minimal context for appropriate invocation.

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/156554395/tx-cos-mcp'

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