Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_list_vpcs

List all Virtual Private Clouds (VPCs) in a specified region, with optional pagination using limit and start parameters.

Instructions

List all VPCs in the region

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
startNo
regionNo

Implementation Reference

  • Tool registration via server.tool() call. Registers 'vpc_list_vpcs' with the MCP server, defining the schema and handler inline.
    server.tool("vpc_list_vpcs", "List all VPCs in the region", {
      limit: z.number().optional(), start: z.string().optional(), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(vpcUrl(p.region||r, "/vpcs"), {limit:p.limit,start:p.start})));
  • Input schema using zod: optional 'limit' (number), 'start' (string), and 'region' (string) parameters.
    limit: z.number().optional(), start: z.string().optional(), region: z.string().optional(),
  • Handler function: wrapped in safeTool(), makes a GET request to VPC API endpoint '/vpcs' with optional limit/start query params, using the provided or default region.
    }, async (p) => safeTool(() => client.get(vpcUrl(p.region||r, "/vpcs"), {limit:p.limit,start:p.start})));
  • vpcUrl helper builds the full VPC API URL with region, path, version, and generation parameters.
    export function vpcUrl(region: string, path: string, version: string = "2024-11-19"): string {
      const base = `https://${region}.iaas.cloud.ibm.com/v1${path}`;
      const sep = base.includes("?") ? "&" : "?";
      return `${base}${sep}version=${version}&generation=2`;
    }
  • safeTool helper wraps async handlers to catch errors and return proper MCP success/error response format.
    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);
      }
    }
Behavior2/5

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

No annotations are provided, and the description only states 'List all VPCs in the region'. It omits details such as pagination behavior, authentication needs, rate limits, or whether the list is comprehensive or filtered.

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?

A single sentence that is efficient and directly states the tool's purpose, with no extraneous information.

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?

No output schema, no annotations, and no parameter descriptions. The description fails to explain how to use the tool effectively (e.g., pagination via limit/start, region filtering).

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?

Schema description coverage is 0%. The description does not explain the three parameters (limit, start, region). It adds no meaning beyond their names.

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 'List all VPCs in the region', providing a specific verb (list) and resource (VPCs) with scope (region), which distinguishes it from sibling tools like vpc_create_vpc or vpc_get_vpc.

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., vpc_list_subnets, vpc_list_instances). The description does not mention prerequisites or when not to use it.

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