Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

cf_list_services

List Cloud Foundry service instances in a specified space by providing the space GUID.

Instructions

List Cloud Foundry service instances

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_guidNo

Implementation Reference

  • Registration of the cf_list_services tool via server.tool(), defining its name, description, input schema (optional space_guid), and handler.
    server.tool("cf_list_services", "List Cloud Foundry service instances", {
      space_guid: z.string().optional(),
    }, async (p) => safeTool(() => client.get(`${base}/v3/service_instances`, {space_guids:p.space_guid})));
  • The tool handler: makes an authenticated GET request to the Cloud Foundry API's /v3/service_instances endpoint, passing optional space_guids query parameter.
    }, async (p) => safeTool(() => client.get(`${base}/v3/service_instances`, {space_guids:p.space_guid})));
  • Input schema defined using Zod: optional space_guid string parameter to filter service instances by space.
    space_guid: z.string().optional(),
  • safeTool helper wraps the handler to catch errors and return formatted MCP text content 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 client.get() method used by the handler to perform the authenticated HTTP GET request to the Cloud Foundry 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, and the description lacks any behavioral details such as whether listing is read-only, pagination behavior, or permission requirements.

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

Conciseness3/5

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

The description is a single sentence without unnecessary words. It is concise but could benefit from additional context 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 simple input schema, the description is incomplete. It does not describe the return format, whether results are filtered, or any other details necessary for correct usage.

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?

The input schema has one optional parameter (space_guid) with 0% description coverage. The description does not explain the parameter's purpose or effect on the listing, leaving ambiguity for an AI agent.

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 clearly states the tool lists Cloud Foundry service instances. It is specific and uses a verb+resource structure. However, it does not differentiate from sibling tools like cf_list_apps or cf_list_routes beyond the resource type.

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 like catalog_list_instances or resource_list_instances. There is no mention of prerequisites or limitations.

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