Skip to main content
Glama
ahmedselimmansor-ctrl

IBM Cloud MCP Server

vpc_create_security_group

Create a security group for an IBM Cloud VPC to define network access rules and control traffic.

Instructions

Create a security group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
vpc_idYes
regionNo

Implementation Reference

  • Registration of the 'vpc_create_security_group' tool on the MCP server via server.tool() with zod schema for inputs (name, vpc_id, region) and handler that calls client.post to the IBM Cloud VPC API.
    server.tool("vpc_create_security_group", "Create a security group", {
      name: z.string(), vpc_id: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w(); return client.post(vpcUrl(p.region||r, "/security_groups"), {name:p.name,vpc:{id:p.vpc_id}}); }));
  • The handler function that executes the tool logic: validates write access via assertWriteAllowed(), then POSTs to /security_groups with name and vpc.id as the request body.
    server.tool("vpc_create_security_group", "Create a security group", {
      name: z.string(), vpc_id: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w(); return client.post(vpcUrl(p.region||r, "/security_groups"), {name:p.name,vpc:{id:p.vpc_id}}); }));
  • Input schema defined using zod: name (z.string()), vpc_id (z.string()), and optional region (z.string().optional()). No explicit output schema - returns raw API response wrapped via safeTool.
    server.tool("vpc_create_security_group", "Create a security group", {
      name: z.string(), vpc_id: z.string(), region: z.string().optional(),
    }, async (p) => safeTool(async () => { w(); return client.post(vpcUrl(p.region||r, "/security_groups"), {name:p.name,vpc:{id:p.vpc_id}}); }));
  • The registerVPCTools function that sets up all VPC tools. Contains imports for safeTool, assertWriteAllowed, and vpcUrl utilities used by the handler.
    export function registerVPCTools(server: McpServer, client: IBMCloudAPIClient, config: ServerConfig) {
      const r = config.region;
      const w = () => assertWriteAllowed(config.allowWrite);
Behavior2/5

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

With no annotations, the description carries the full burden of disclosing behavior. It only states the action (create) without clarifying destructive effects, authentication requirements, rate limits, or what happens if the security group already exists. For a mutation tool, this is insufficient.

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 (4 words), but conciseness should not come at the expense of usefulness. It lacks essential detail and is under-specified, making it less effective for agent decision-making.

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 tool's complexity (creation with 3 parameters, no annotations, no output schema), the description is woefully incomplete. It fails to cover return values, error conditions, prerequisites, or behavioral nuances, leaving the agent underinformed.

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 the description adds no parameter information. It does not explain the purpose of 'name', 'vpc_id', or 'region', nor their expected formats or constraints. The agent must rely entirely on the schema, which lacks descriptions.

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 (create) and the resource (security group). It is distinct from sibling tools like vpc_delete_security_group or vpc_add_sg_rule, but lacks any qualifying context that would further differentiate it, such as scope or prerequisites.

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. There is no mention of prerequisites (e.g., VPC must exist), no indication of valid parameter combinations, and no distinction from other creation tools like vpc_create_vpc or vpc_create_subnet.

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