Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_delete_vpc

Delete a VPC by providing its ID. Optionally specify the region to target.

Instructions

Delete a VPC

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vpc_idYes
regionNo

Implementation Reference

  • Tool 'vpc_delete_vpc' is registered on the MCP server with schema (vpc_id: string, region?: string) and a handler that performs an authenticated DELETE request to the VPC API endpoint.
    server.tool("vpc_delete_vpc", "Delete a VPC", {
      vpc_id: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w(); await client.delete(vpcUrl(p.region||r, `/vpcs/${p.vpc_id}`)); return {message:`VPC ${p.vpc_id} deleted`}; }));
  • The inline handler function for vpc_delete_vpc: asserts write permissions, calls client.delete to the VPC API endpoint, and returns a success message.
    server.tool("vpc_delete_vpc", "Delete a VPC", {
      vpc_id: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w(); await client.delete(vpcUrl(p.region||r, `/vpcs/${p.vpc_id}`)); return {message:`VPC ${p.vpc_id} deleted`}; }));
  • The input schema for vpc_delete_vpc defines two parameters: vpc_id (required string) and region (optional string).
    server.tool("vpc_delete_vpc", "Delete a VPC", {
      vpc_id: z.string(), region: z.string().optional(),
  • assertWriteAllowed helper checks the allowWrite config flag; w() call in the handler ensures write operations are permitted.
    export function assertWriteAllowed(allowWrite: boolean): void {
      if (!allowWrite) {
        throw new WriteNotAllowedError();
      }
    }
    
    /**
     * Build a VPC API URL with the required version 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`;
    }
  • vpcUrl helper builds the VPC API URL with region, path, version parameter, and 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, and the description does not disclose any behavioral traits such as side effects (e.g., cascading deletion of subnets), failure conditions, or permission requirements. The agent has no insight into what happens beyond deletion.

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

Conciseness3/5

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

The description is a single short sentence, which is concise but arguably too minimal. It front-loads the core purpose but omits critical details that could be included without losing conciseness.

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 the destructive nature of the tool, the lack of side-effect information, return value description, or integration with sibling tools (e.g., prerequisites like no resources in VPC) makes this description incomplete for safe and correct agent usage.

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?

With 0% schema description coverage and a laconic description, no additional meaning is provided for the vpc_id and region parameters beyond their names. The description does not explain how region affects the operation or what valid values are.

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 'Delete a VPC' clearly states the action (delete) and resource (VPC), distinguishing it from sibling tools like vpc_create_vpc and 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 like vpc_delete_subnet or vpc_delete_volume. 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