Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

cos_get_object

Download an object from an IBM Cloud Object Storage bucket by providing the bucket name and object key.

Instructions

Download/get an object from a bucket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_nameYes
object_keyYes
regionNo

Implementation Reference

  • Handler for cos_get_object tool: performs a GET request to download an object from a COS bucket. Accepts bucket_name, object_key, and optional region. Uses safeTool wrapper for error handling.
    server.tool("cos_get_object", "Download/get an object from a bucket", {
      bucket_name: z.string(), object_key: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(() =>
      client.get(`${s3(p.region||r)}/${p.bucket_name}/${encodeURIComponent(p.object_key)}`)
    ));
  • Input schema for cos_get_object: validates bucket_name (string), object_key (string), and optional region (string).
      bucket_name: z.string(), object_key: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(() =>
  • Registration of cos_get_object tool via MCP server.tool() with the name 'cos_get_object'.
    server.tool("cos_get_object", "Download/get an object from a bucket", {
      bucket_name: z.string(), object_key: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(() =>
      client.get(`${s3(p.region||r)}/${p.bucket_name}/${encodeURIComponent(p.object_key)}`)
    ));
  • The registerCOSTools function is called from src/server.ts to register all COS tools including cos_get_object.
    export function registerCOSTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) {
  • The client.get() helper method called by the handler. Delegates to this.request() with HTTP GET method.
    async get<T = unknown>(url: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "GET", queryParams });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose behavior but only states the action. It does not mention that this read operation is safe, requires authentication, or what happens on errors (e.g., object not found).

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 concise sentence that front-loads the core action without any wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of many sibling tools, the description adequately distinguishes the tool's purpose. However, it lacks details on output (no output schema) and prerequisites, leaving gaps for an agent.

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

Parameters2/5

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

Schema description coverage is 0%, and the description adds no meaning beyond parameter names (e.g., 'region' is unexplained). It does not compensate for the lack of parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('download/get') and resource ('object from a bucket'), clearly distinguishing it from siblings like cos_list_objects or cos_get_object_metadata.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly suggests usage for retrieving object content but provides no explicit guidance on when to use this tool versus alternatives such as cos_get_object_metadata or cos_list_objects, nor when not to use it.

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/ahmedselimmansor-ctrl/IBM_cloud_MCP_SERVER'

If you have feedback or need assistance with the MCP directory API, please join our Discord server