cos_get_bucket_config
Retrieve bucket configuration and metadata from IBM Cloud Object Storage using bucket name and instance CRN.
Instructions
Get bucket configuration and metadata
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket_name | Yes | ||
| instance_crn | Yes |
Implementation Reference
- src/tools/cos/index.ts:43-45 (handler)Handler function for cos_get_bucket_config tool - makes a GET request to the COS configuration API endpoint with the bucket name and instance CRN.
}, async (p) => safeTool(() => client.request(`${cfgBase}/b/${p.bucket_name}`, {headers:{"ibm-service-instance-id":p.instance_crn}}) )); - src/tools/cos/index.ts:42-42 (schema)Input schema for cos_get_bucket_config - requires bucket_name and instance_crn parameters.
bucket_name: z.string(), instance_crn: z.string(), - src/tools/cos/index.ts:41-45 (registration)Registration of cos_get_bucket_config tool using the MCP server.tool() method, with description, input schema, and handler.
server.tool("cos_get_bucket_config", "Get bucket configuration and metadata", { bucket_name: z.string(), instance_crn: z.string(), }, async (p) => safeTool(() => client.request(`${cfgBase}/b/${p.bucket_name}`, {headers:{"ibm-service-instance-id":p.instance_crn}}) )); - src/server.ts:59-60 (registration)Registration of all COS tools (including cos_get_bucket_config) from server.ts.
registerCOSTools(server, client, config); console.error(` ✓ Cloud Object Storage (12 tools)`); - src/tools/cos/index.ts:8-8 (helper)cfgBase is set to IBM_ENDPOINTS.COS_CONFIG which resolves to 'https://config.cloud-object-storage.cloud.ibm.com/v1', the base URL used in the cos_get_bucket_config handler.
const cfgBase = IBM_ENDPOINTS.COS_CONFIG;