Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_create_subnet

Create a subnet in an IBM Cloud VPC by providing a name, VPC ID, and zone, with optional CIDR block or IP address count.

Instructions

Create a subnet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
vpc_idYes
zoneYese.g. us-south-1
ipv4_cidr_blockNo
total_ipv4_address_countNo
resource_group_idNo
regionNo

Implementation Reference

  • Registration of the 'vpc_create_subnet' tool on the MCP server via server.tool(), with Zod schema for inputs (name, vpc_id, zone, ipv4_cidr_block, total_ipv4_address_count, resource_group_id, region) and handler that POSTs to /subnets
    server.tool("vpc_create_subnet", "Create a subnet", {
      name: z.string(), vpc_id: z.string(), zone: z.string().describe("e.g. us-south-1"),
      ipv4_cidr_block: z.string().optional(), total_ipv4_address_count: z.number().optional(),
      resource_group_id: z.string().optional(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w();
      return client.post(vpcUrl(p.region||r, "/subnets"), {name:p.name,vpc:{id:p.vpc_id},zone:{name:p.zone},ipv4_cidr_block:p.ipv4_cidr_block,total_ipv4_address_count:p.total_ipv4_address_count,resource_group:p.resource_group_id?{id:p.resource_group_id}:undefined});
    }));
  • Handler function for 'vpc_create_subnet': calls assertWriteAllowed via w(), then POSTs to the /subnets endpoint with the provided subnet parameters (name, vpc.id, zone.name, ipv4_cidr_block, total_ipv4_address_count, resource_group)
    }, async (p) => safeTool(async () => { w();
      return client.post(vpcUrl(p.region||r, "/subnets"), {name:p.name,vpc:{id:p.vpc_id},zone:{name:p.zone},ipv4_cidr_block:p.ipv4_cidr_block,total_ipv4_address_count:p.total_ipv4_address_count,resource_group:p.resource_group_id?{id:p.resource_group_id}:undefined});
    }));
  • Zod schema for 'vpc_create_subnet' input parameters: name (string), vpc_id (string), zone (string), ipv4_cidr_block (optional string), total_ipv4_address_count (optional number), resource_group_id (optional string), region (optional string)
    name: z.string(), vpc_id: z.string(), zone: z.string().describe("e.g. us-south-1"),
    ipv4_cidr_block: z.string().optional(), total_ipv4_address_count: z.number().optional(),
    resource_group_id: z.string().optional(), region: z.string().optional(),
Behavior1/5

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

With no annotations, the description must carry the full burden of behavioral disclosure, but it provides none—no mention of side effects, constraints, or outcomes.

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?

The description is extremely concise but at the expense of completeness; it is under-specified and fails to provide useful 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 7 parameters, no output schema, and no annotations, the description is woefully inadequate. It does not explain the subnet creation process, requirements, 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 only 14% (zone description). The description does not explain any parameters, leaving 6 parameters (including required ones like 'name' and 'vpc_id') undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a subnet' clearly states the verb and resource, distinguishing it from sibling tools like vpc_create_vpc. However, it is extremely minimal and adds no additional context beyond the tool name.

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 is provided on when to use this tool versus alternatives, nor any prerequisites such as requiring an existing VPC.

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