Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

watson_list_spaces

List your Watson deployment spaces in any IBM Cloud region to organize and manage your AI deployments.

Instructions

List Watson deployment spaces

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNo

Implementation Reference

  • The handler for the watson_list_spaces tool. It makes a GET request to the Watson ML API at /v2/spaces (with optional region override) and returns the list of deployment spaces, wrapped in safeTool error handling.
    server.tool("watson_list_spaces", "List Watson deployment spaces", {
      region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/v2/spaces`, {version:ver})));
  • The tool is registered via server.tool() call within registerWatsonTools(). This function is invoked from src/server.ts line 68.
    server.tool("watson_list_spaces", "List Watson deployment spaces", {
      region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(`${ml(p.region||r)}/v2/spaces`, {version:ver})));
  • Input schema for watson_list_spaces: accepts an optional 'region' string parameter. No output schema is explicitly defined; the raw API response is returned.
    region: z.string().optional(),
  • The WATSON_ML endpoint helper constructs the base URL (e.g., https://us-south.ml.cloud.ibm.com) used by the handler to form the /v2/spaces request.
    WATSON_ML: (region: string) =>
      `https://${region}.ml.cloud.ibm.com`,
  • The safeTool helper wraps the handler's async function, catching errors and returning properly formatted MCP success/error 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);
      }
    }
Behavior1/5

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

No annotations provided; description only says 'list'. Fails to disclose read-only nature, pagination, limits, or any behavioral traits beyond the obvious.

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 (4 words) with no fluff. Front-loaded verb. However, it is so brief that it sacrifices informativeness for brevity.

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 is a simple list with one optional param and no output schema, the description should at least mention the region parameter and expected result format, but it does not.

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

Parameters1/5

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

Input schema has one parameter 'region' with 0% description coverage. Description does not mention 'region' at all, providing no additional meaning over the schema.

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?

Description clearly states the verb 'List' and resource 'Watson deployment spaces', distinguishing it from sibling tools like watson_list_deployments and watson_list_models. However, it misses contextual nuance like regional filtering implied by the input schema.

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 (e.g., watson_list_deployments). No mention of prerequisites or contraindications.

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