Skip to main content
Glama

getCosConfig

Retrieve Tencent Cloud COS configuration settings for cloud storage operations and media processing capabilities within the XMZ MCP Server.

Instructions

获取COS配置, 腾讯云配置

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Inline handler function for the 'getCosConfig' tool. It masks sensitive secrets in the config and returns the configuration as a JSON string in the response format.
    server.tool('getCosConfig', '获取COS配置, 腾讯云配置', {}, async () => {
      if (config.cosConfig) {
        config.cosConfig.SecretId = maskSecret(config.cosConfig.SecretId);
        config.cosConfig.SecretKey = maskSecret(config.cosConfig.SecretKey);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(config, null, 2),
          },
        ],
      };
    });
  • src/server.ts:68-82 (registration)
    Registration of the 'getCosConfig' tool using server.tool(), with an empty schema {} and inline handler.
    server.tool('getCosConfig', '获取COS配置, 腾讯云配置', {}, async () => {
      if (config.cosConfig) {
        config.cosConfig.SecretId = maskSecret(config.cosConfig.SecretId);
        config.cosConfig.SecretKey = maskSecret(config.cosConfig.SecretKey);
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(config, null, 2),
          },
        ],
      };
    });
  • Helper function used by the getCosConfig handler to mask sensitive secrets like SecretId and SecretKey.
    export function maskSecret(secret: string): string {
      secret = String(secret);
      if (secret.length <= 4) return '****';
      return `${secret.substring(0, 4)}****${secret.slice(-4)}`;
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 of behavioral disclosure. It only states the action ('获取' - get/retrieve), implying a read-only operation, but doesn't disclose other traits like authentication requirements, rate limits, error conditions, or what the output contains (e.g., JSON structure). This is a significant gap for a tool with no 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with just two phrases ('获取COS配置, 腾讯云配置'), which efficiently states the purpose without unnecessary words. It's front-loaded with the key action. However, it could be slightly more structured by clarifying the scope (e.g., 'Retrieves the current COS configuration from Tencent Cloud'), but it's still highly efficient.

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 has no parameters (simplifying input) but no output schema and no annotations, the description is incomplete. It doesn't explain what the configuration includes (e.g., storage classes, regions), the format of the return value, or any behavioral context like error handling. For a configuration retrieval tool, this leaves the agent with insufficient information to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100% (as there are no parameters to describe). The description doesn't need to add parameter semantics, so it meets the baseline. No additional value is required or provided, making this adequate for a parameterless tool.

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 states the tool '获取COS配置, 腾讯云配置' (Get COS configuration, Tencent Cloud configuration), which clearly indicates it retrieves configuration information. However, it's somewhat vague about what specific configuration is retrieved (e.g., storage settings, access policies, region info) and doesn't explicitly differentiate from sibling tools like 'getBucket' or 'getObject', which also retrieve COS-related information.

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., authentication needs), context for usage (e.g., before uploading objects), or comparisons to sibling tools like 'getBucket' (which might retrieve bucket-level info) or 'getObject' (which retrieves specific objects). Without this, the agent lacks clear direction.

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