Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

ks_get_cluster

Retrieve details of a specific Kubernetes cluster by providing the cluster ID or name.

Instructions

Get cluster details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterYesCluster ID or name

Implementation Reference

  • Registration of the 'ks_get_cluster' tool via server.tool(), with schema definition (cluster param as Zod string) and inline handler that calls client.get to the Kubernetes API endpoint '/v2/getCluster'.
    server.tool("ks_get_cluster", "Get cluster details", {
      cluster: z.string().describe("Cluster ID or name"),
    }, async (p) => safeTool(() => client.get(`${base}/v2/getCluster`, {cluster: p.cluster})));
  • The handler function for 'ks_get_cluster'. It takes {cluster} input, invokes the IBMCloudAPIClient GET request to the Kubernetes API base URL with path '/v2/getCluster' and the cluster query parameter. The response is wrapped via safeTool which formats success/error content for MCP.
    server.tool("ks_get_cluster", "Get cluster details", {
      cluster: z.string().describe("Cluster ID or name"),
    }, async (p) => safeTool(() => client.get(`${base}/v2/getCluster`, {cluster: p.cluster})));
  • Input schema for 'ks_get_cluster': a single required 'cluster' parameter (string) described as 'Cluster ID or name', validated via Zod.
    server.tool("ks_get_cluster", "Get cluster details", {
      cluster: z.string().describe("Cluster ID or name"),
    }, async (p) => safeTool(() => client.get(`${base}/v2/getCluster`, {cluster: p.cluster})));
  • The safeTool utility wraps the handler call, catching errors and returning either successContent or errorContent formatted MCP responses.
    export async function safeTool<T>(fn: () => Promise<T>): Promise<ReturnType<typeof successContent> | ReturnType<typeof errorContent>> {
      try {
        const result = await fn();
        return successContent(result);
      } catch (error) {
        return errorContent(error);
      }
    }
  • The IBMCloudAPIClient.get() convenience method, which is the actual HTTP mechanism invoked by the tool handler to call the Kubernetes API.
    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 carries full burden for behavioral traits. It only states 'Get cluster details', implying a read operation, but omits details on error handling, permissions required, rate limits, or response behavior (e.g., whether partial data is returned).

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 extremely concise at four words, with no extraneous content. It front-loads the purpose, though it could be slightly expanded to add context without harming conciseness.

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's simplicity (1 parameter, no output schema, no annotations), the description is inadequate. It does not specify the return format, the scope of 'details', or any constraints. The agent lacks sufficient context to confidently use the tool.

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

Parameters3/5

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

Schema coverage is 100% for the single parameter 'cluster', and its schema description ('Cluster ID or name') already provides clear semantics. The description adds no further meaning beyond what the schema states, so baseline score of 3 is appropriate.

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

Purpose4/5

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

The description 'Get cluster details' clearly states the verb 'Get' and resource 'cluster details', distinguishing it from siblings like ks_list_clusters (listing) and ks_get_cluster_config (config-specific). It is specific enough for immediate purpose recognition.

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?

No usage guidelines are provided. The description does not indicate when to use this tool versus alternatives like ks_get_cluster_config or ks_list_clusters, nor does it mention prerequisites or context for invocation.

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