getCosConfig
Retrieve COS configuration settings for Tencent Cloud Object Storage via the MCP server, enabling direct access to storage and processing services without coding.
Instructions
获取COS配置, 腾讯云配置
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:68-82 (handler)Inline handler function for the 'getCosConfig' tool. It masks the SecretId and SecretKey in the config if cosConfig exists, then returns the entire config as a JSON string in a text content block.
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 empty schema ({}), description '获取COS配置, 腾讯云配置', 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), }, ], }; });