Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_create_vpc

Create a new Virtual Private Cloud (VPC) in IBM Cloud with specified name, region, resource group, and address prefix management mode.

Instructions

Create a new VPC

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
address_prefix_managementNo
resource_group_idNo
regionNo

Implementation Reference

  • The handler function for vpc_create_vpc: calls client.post() to create a VPC via the IBM Cloud API, using the constructed VPC URL. Also calls assertWriteAllowed (w()) to enforce read-only mode.
    server.tool("vpc_create_vpc", "Create a new VPC", {
      name: z.string(), address_prefix_management: z.enum(["auto","manual"]).optional(),
      resource_group_id: z.string().optional(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w();
      return client.post(vpcUrl(p.region||r, "/vpcs"), {name:p.name,address_prefix_management:p.address_prefix_management||"auto",resource_group:p.resource_group_id?{id:p.resource_group_id}:undefined});
    }));
  • Input schema for vpc_create_vpc defined with Zod: name (string), address_prefix_management (optional 'auto'|'manual'), resource_group_id (optional string), region (optional string).
    server.tool("vpc_create_vpc", "Create a new VPC", {
      name: z.string(), address_prefix_management: z.enum(["auto","manual"]).optional(),
      resource_group_id: z.string().optional(), region: z.string().optional(),
  • src/server.ts:53-54 (registration)
    Registration call: registerVPCTools(server, client, config) invoked during server setup to register all VPC tools including vpc_create_vpc.
    registerVPCTools(server, client, config);
    console.error(`  ✓ VPC Infrastructure (35 tools)`);
  • vpcUrl helper function: builds the full IBM Cloud VPC API URL with region, path, version, and generation=2 query parameter.
    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`;
    }
  • assertWriteAllowed helper: throws WriteNotAllowedError if write operations are not permitted (read-only mode).
    export function assertWriteAllowed(allowWrite: boolean): void {
      if (!allowWrite) {
        throw new WriteNotAllowedError();
      }
Behavior1/5

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

No annotations, and description gives no behavioral details such as idempotency, dependencies, or side effects.

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

Conciseness2/5

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

Overly terse at 4 words, lacking front-loaded detail; conciseness does not compensate for missing 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?

Given 4 parameters and no output schema, the description provides almost no context about usage, effects, or return values.

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 coverage is 0% and description adds no explanation for any of the 4 parameters, leaving the agent without meaning.

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?

Description 'Create a new VPC' clearly states verb and resource, and distinguishes from sibling VPC tools like vpc_create_subnet or vpc_list_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 versus alternatives, no prerequisites or context provided.

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