Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

catalog_get_service

Retrieve detailed information about a specific IBM Cloud catalog service using its unique service ID.

Instructions

Get details of a specific catalog service by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
service_idYesCatalog service ID

Implementation Reference

  • The handler for 'catalog_get_service' tool. It performs a GET request to the Global Catalog API base URL with the service_id appended, returning details of the specified catalog service.
    server.tool("catalog_get_service", "Get details of a specific catalog service by ID", {
      service_id: z.string().describe("Catalog service ID"),
    }, async (p) => safeTool(() => client.get(`${base}/${p.service_id}`)));
  • The schema for 'catalog_get_service' defines a single required input parameter: 'service_id' (string, describing the catalog service ID). No output schema is explicitly defined; the response is the raw JSON from the API wrapped by safeTool.
    server.tool("catalog_get_service", "Get details of a specific catalog service by ID", {
      service_id: z.string().describe("Catalog service ID"),
    }, async (p) => safeTool(() => client.get(`${base}/${p.service_id}`)));
  • The 'registerCatalogTools' function registers three catalog tools on the MCP server, including 'catalog_get_service'. It is called from src/server.ts (line 92) during server initialization.
    export function registerCatalogTools(server: McpServer, client: IBMCloudAPIClient, _config: ServerConfig) {
      const base = IBM_ENDPOINTS.GLOBAL_CATALOG;
    
      server.tool("catalog_search_services", "Search the IBM Cloud global catalog for services and offerings", {
        query: z.string().describe("Search query (e.g. 'kubernetes', 'database')"),
        limit: z.number().optional(),
      }, async (p) => safeTool(() => client.get(base, {q:p.query,limit:p.limit||50,complete:true})));
    
      server.tool("catalog_get_service", "Get details of a specific catalog service by ID", {
        service_id: z.string().describe("Catalog service ID"),
      }, async (p) => safeTool(() => client.get(`${base}/${p.service_id}`)));
    
      server.tool("catalog_list_plans", "List pricing plans for a catalog service", {
        service_id: z.string().describe("Catalog service ID"),
      }, async (p) => safeTool(() => client.get(`${base}/${p.service_id}/children`, {kind:"plan"})));
    }
  • The 'safeTool' helper wraps async handler functions to catch errors and return standardized MCP success/error content blocks. It is used as a wrapper around the API call in the handler.
    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 'get' method of IBMCloudAPIClient performs an authenticated GET request to the given URL. It is called by the handler to fetch catalog service details from the Global Catalog 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?

No annotations are provided, so the description must disclose behavioral traits. It only states the action, without mentioning whether it's read-only, idempotent, or what errors may occur. The minimal description adds little beyond the input schema.

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 sentence, 11 words, with no redundancy. It is front-loaded and efficient.

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 simplicity (one parameter, no output schema), the description is functional but does not explain what the 'details' include (e.g., full object vs. summary). For a get tool, it is minimally adequate but lacks completeness.

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 description coverage is 100% (one parameter with a description). The schema already describes 'service_id' as 'Catalog service ID'. The description's mention of 'by ID' adds no new meaning beyond what the schema provides. Baseline 3 applies.

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 clearly states the action ('Get details'), the resource ('catalog service'), and the identifier ('by ID'). It distinguishes from siblings like 'catalog_search_services' and 'catalog_list_plans'.

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 implies usage for retrieving details of a service by ID, but does not explicitly mention when to use it versus alternatives (e.g., catalog_search_services for searching, catalog_list_plans for listing plans). No exclusions or prerequisites are given.

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