Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_get_vpc

Retrieve details of a Virtual Private Cloud (VPC) by providing its ID. Optionally specify the region to scope the query.

Instructions

Get VPC details

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vpc_idYesVPC ID
regionNo

Implementation Reference

  • The handler for vpc_get_vpc tool. It registers an MCP tool that takes vpc_id (required) and region (optional, defaults to configured region) parameters, and makes a GET request to the VPC API endpoint /vpcs/{vpc_id} using the IBMCloudAPIClient, wrapped in safeTool for error handling.
    server.tool("vpc_get_vpc", "Get VPC details", {
      vpc_id: z.string().describe("VPC ID"), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(vpcUrl(p.region||r, `/vpcs/${p.vpc_id}`))));
  • The input schema for vpc_get_vpc. Uses Zod validation: vpc_id is a required string, region is optional string (falls back to configured region).
      vpc_id: z.string().describe("VPC ID"), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(vpcUrl(p.region||r, `/vpcs/${p.vpc_id}`))));
  • Registration of the vpc_get_vpc tool via server.tool() - the standard MCP server registration pattern. This is within the registerVPCTools function which is called from src/server.ts line 53.
    server.tool("vpc_get_vpc", "Get VPC details", {
      vpc_id: z.string().describe("VPC ID"), region: z.string().optional(),
    }, async (p) => safeTool(() => client.get(vpcUrl(p.region||r, `/vpcs/${p.vpc_id}`))));
  • src/server.ts:53-54 (registration)
    The top-level registration call from createServer() that invokes registerVPCTools, which in turn registers all VPC tools including vpc_get_vpc.
    registerVPCTools(server, client, config);
    console.error(`  ✓ VPC Infrastructure (35 tools)`);
  • The vpcUrl helper function that builds the full VPC API URL including region, path, API version, and generation parameter. Used by vpc_get_vpc to construct https://{region}.iaas.cloud.ibm.com/v1/vpcs/{vpc_id}?version=2024-11-19&generation=2
    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`;
    }
Behavior1/5

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

No annotations provided; the description only says 'Get VPC details' with no disclosure of permissions, failure modes, or other behavioral traits.

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?

One concise sentence, front-loaded, no unnecessary words.

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?

Despite low complexity (2 params, no output schema), the description omits return format and behavioral details, leaving the agent under-informed.

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 50% (only vpc_id has description). The description adds no parameter meaning beyond the schema, and region is left without explanation.

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 action (Get) and resource (VPC details), but it does not differentiate from sibling tools like vpc_list_vpcs, which also deals with VPCs.

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 vs. alternatives, no exclusions or prerequisites 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