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

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "properties": {}, "type": "object" }

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

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