Skip to main content
Glama
156554395

Tencent Cloud COS MCP Server

by 156554395

get_signed_url

Generate temporary signed URLs for Tencent Cloud COS objects to provide secure, time-limited access to cloud storage files without exposing permanent credentials.

Instructions

获取COS对象的临时签名URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expire_timeNoURL有效期(秒),默认3600秒
object_keyYesCOS中的对象键名

Implementation Reference

  • Defines the input schema, name, and description for the 'get_signed_url' tool, used for MCP tool listing.
    get_signed_url: {
      name: 'get_signed_url',
      description: '获取COS对象的临时签名URL',
      inputSchema: {
        type: 'object',
        properties: {
          object_key: {
            type: 'string',
            description: 'COS中的对象键名'
          },
          expire_time: {
            type: 'number',
            description: 'URL有效期(秒),默认3600秒'
          }
        },
        required: ['object_key']
      }
    },
  • MCP CallToolRequestSchema handler case for 'get_signed_url': extracts arguments, calls cosService.getSignedUrl, formats and returns response.
    case 'get_signed_url':
      const urlResult = await cosService.getSignedUrl(args.object_key, args.expire_time);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({ success: true, data: urlResult }, null, 2)
          }
        ]
      };
  • Core implementation of getSignedUrl: validates config, generates signed URL using Tencent COS SDK's getObjectUrl with Sign: true.
    async getSignedUrl(key, expireTime = 3600) {
      this._checkConfig();
      
      try {
        const params = {
          Bucket: this.config.Bucket,
          Region: this.config.Region,
          Key: key,
          Sign: true,
          Expires: expireTime
        };
    
        const url = await this.cos.getObjectUrl(params);
        return { success: true, url };
      } catch (error) {
        throw new Error(`获取签名URL失败: ${error.message}`);
      }
    }
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 mentions 'temporary signed URL' which implies time-limited access, but doesn't specify authentication requirements, rate limits, or what happens upon expiration. For a tool that likely involves security-sensitive operations, this is insufficient.

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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with every word contributing to understanding.

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 for a tool that generates temporary signed URLs. It doesn't explain what the signed URL can be used for, security implications, or return format, leaving significant gaps in understanding the tool's behavior and output.

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%, so the schema already documents both parameters ('object_key' and 'expire_time') adequately. The description doesn't add any additional parameter semantics beyond what the schema provides, maintaining the baseline score of 3.

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 clearly states the action ('获取' meaning 'get/obtain') and resource ('COS对象的临时签名URL' meaning 'temporary signed URL for COS object'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'list_objects' or 'upload_file', which would require a 5.

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. There are no explicit when/when-not instructions or references to sibling tools like 'delete_object' or 'upload_file' for comparison, leaving usage context unclear.

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