Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

ks_get_cluster_config

Retrieve the kubeconfig for an IBM Cloud Kubernetes cluster. Use this tool to obtain configuration credentials for cluster access.

Instructions

Get cluster kubeconfig

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterYes

Implementation Reference

  • Registration of the 'ks_get_cluster_config' tool via server.tool(), defining its schema (cluster: z.string()) and handler.
    server.tool("ks_get_cluster_config", "Get cluster kubeconfig", {
      cluster: z.string(),
    }, async (p) => safeTool(() => client.get(`${base}/v2/getKubeconfig`, {cluster:p.cluster})));
  • Input schema for the tool: requires a single 'cluster' string parameter (validated with zod).
    cluster: z.string(),
  • The handler function calls client.get() to fetch kubeconfig from IBM Cloud Kubernetes API endpoint v2/getKubeconfig with the cluster parameter, wrapped in safeTool() for error handling.
    }, async (p) => safeTool(() => client.get(`${base}/v2/getKubeconfig`, {cluster:p.cluster})));
  • The safeTool() helper wraps the handler, catching errors and returning proper MCP success/error content blocks.
    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 KUBERNETES endpoint constant ('https://containers.cloud.ibm.com/global') used as the base URL for the API call.
    KUBERNETES: "https://containers.cloud.ibm.com/global",
Behavior1/5

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

No annotations exist, so the description carries full burden. It fails to disclose behavioral traits such as authentication requirements, that it returns a sensitive kubeconfig file, or any side effects. The agent cannot infer safety or operational impact.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

At four words, the description is under-specified, not concise. It lacks necessary detail for safe use, making it inadequate even for a minimal viable description.

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

Completeness1/5

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

With no output schema and no annotation coverage, the description must compensate but does not. It fails to explain what 'kubeconfig' means (e.g., file content, URL), leaving the agent unable to handle the response correctly.

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?

With 0% schema description coverage and one required parameter 'cluster', the description adds minimal meaning beyond 'cluster' being the cluster identifier. It does not specify the expected format (e.g., name vs ID) or constraints, leaving ambiguity.

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 kubeconfig' clearly states the verb (Get) and resource (cluster kubeconfig), distinguishing it from siblings like ks_get_cluster (which gets cluster details) and ks_get_cluster_versions (which gets version info).

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 mention when to use this tool versus alternatives, such as ks_get_cluster for general cluster info, nor does it specify prerequisites like cluster existence or access permissions.

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