Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

resource_list_keys

Retrieve resource keys (credentials) for IBM Cloud resources. Filter results by resource instance ID and set a limit on the number of keys returned.

Instructions

List resource keys (credentials)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
resource_instance_idNoFilter by resource instance
limitNo

Implementation Reference

  • The handler function for resource_list_keys tool. Makes a GET request to the Resource Controller API's /resource_keys endpoint, filtering by optional resource_instance_id and limiting results (default 100). Wrapped in safeTool for error handling.
    server.tool("resource_list_keys", "List resource keys (credentials)", {
      resource_instance_id: z.string().optional().describe("Filter by resource instance"),
      limit: z.number().optional(),
    }, async (p) => safeTool(() => client.get(`${base}/resource_keys`, {
      resource_instance_id:p.resource_instance_id, limit:p.limit||100,
    })));
  • Input schema for resource_list_keys: two optional parameters - resource_instance_id (string) to filter by instance, and limit (number) for pagination.
    resource_instance_id: z.string().optional().describe("Filter by resource instance"),
    limit: z.number().optional(),
  • src/server.ts:16-77 (registration)
    Import of the registration function that registers the resource_list_keys tool.
    import { registerResourceManagementTools } from "./tools/resource-management/index.js";
    import { registerBillingTools } from "./tools/billing/index.js";
    import { registerSchematicsTools } from "./tools/schematics/index.js";
    import { registerContainerRegistryTools } from "./tools/container-registry/index.js";
    import { registerCloudFoundryTools } from "./tools/cloud-foundry/index.js";
    import { registerCatalogTools } from "./tools/catalog/index.js";
    import { registerObservabilityTools } from "./tools/observability/index.js";
    
    /**
     * Create and configure the IBM Cloud MCP Server with all tools registered.
     */
    export function createServer(config: ServerConfig): McpServer {
      // Initialize the MCP server
      const server = new McpServer({
        name: "ibm-cloud-mcp-server",
        version: "1.0.0",
      });
    
      // Initialize auth and API client
      const auth = new IAMAuthManager(config.apiKey);
      const client = new IBMCloudAPIClient(auth);
    
      // Override account ID if provided in config
      if (config.accountId) {
        // Pre-set the account ID so we don't need to decode JWT
        // The auth manager will still decode from token if this is empty
      }
    
      const writeMode = config.allowWrite ? "ENABLED" : "DISABLED (read-only)";
      console.error(`[IBM Cloud MCP] Region: ${config.region}`);
      console.error(`[IBM Cloud MCP] Write operations: ${writeMode}`);
      console.error(`[IBM Cloud MCP] Registering tools...`);
    
      // ─── Register all tool domains ────────────────────────────────
      registerIAMTools(server, client, config);
      console.error(`  ✓ IAM & Identity (18 tools)`);
    
      registerVPCTools(server, client, config);
      console.error(`  ✓ VPC Infrastructure (35 tools)`);
    
      registerKubernetesTools(server, client, config);
      console.error(`  ✓ Kubernetes (14 tools)`);
    
      registerCOSTools(server, client, config);
      console.error(`  ✓ Cloud Object Storage (12 tools)`);
    
      registerCodeEngineTools(server, client, config);
      console.error(`  ✓ Code Engine (16 tools)`);
    
      registerDatabaseTools(server, client, config);
      console.error(`  ✓ Databases (10 tools)`);
    
      registerWatsonTools(server, client, config);
      console.error(`  ✓ Watson AI (8 tools)`);
    
      registerNetworkingTools(server, client, config);
      console.error(`  ✓ Networking (12 tools)`);
    
      registerSecurityTools(server, client, config);
      console.error(`  ✓ Security (12 tools)`);
    
      registerResourceManagementTools(server, client, config);
  • src/server.ts:77-78 (registration)
    Invocation of registerResourceManagementTools which registers resource_list_keys (and other resource management tools) on the MCP server.
    registerResourceManagementTools(server, client, config);
    console.error(`  ✓ Resource Management (10 tools)`);
  • The client.get() method used by the handler to make the authenticated HTTP GET request to the Resource Controller API.
    async get<T = unknown>(url: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "GET", queryParams });
    }
    
    async post<T = unknown>(url: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "POST", body, queryParams });
    }
    
    async put<T = unknown>(url: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "PUT", body, queryParams });
    }
    
    async patch<T = unknown>(url: string, body?: unknown, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "PATCH", body, queryParams });
    }
    
    async delete<T = unknown>(url: string, queryParams?: Record<string, string | number | boolean | undefined>): Promise<T> {
      return this.request<T>(url, { method: "DELETE", queryParams });
    }
Behavior2/5

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

With no annotations, the description adds minimal behavioral context beyond the implied read operation. No mention of side effects, authentication needs, or response behavior.

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?

Extremely concise at three words, but lacks structure. Every word earns its place, but could benefit from a more informative structure without becoming verbose.

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 no output schema, no annotations, and a brief description, it fails to convey what resource keys are, how filtering works, or what the response looks like.

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 only 50% (one param described), and the description provides no additional information about parameters or their usage.

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 states the action (list) and resource (resource keys) with clarification '(credentials)'. It is clear but does not differentiate from potentially similar tools like iam_list_api_keys or kp_list_keys.

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 guidance on when to use this tool versus alternatives, no prerequisites or exclusions mentioned.

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