Skip to main content
Glama

Create network security group

create_network_security_group
Idempotent

Create a named allow-rule set to control ingress and egress traffic for a project or specific network. Define exact IPv4 rules, scope the group, and keep updates and clones rule-exact.

Instructions

Create a named allow-rule set. When capabilities advertise egress_policy, rules_only preserves exactly the supplied rules and allow adds unrestricted IPv4 egress. Omit egress_policy for legacy behavior: the backend adds egress-any only if no egress rule was supplied. Updates and clones preserve exact rules. Optional network_id scopes the group to that network; otherwise it belongs to the project. IPv6 rules are unavailable. Requires explicit networking:read for reads or networking:manage for changes; full/read defaults do not grant networking. The backend enforces ownership, feature availability and service 2FA locks. Read current capabilities and owned resource state first; obtain approval for the exact change. An accepted operation is pending, not proof of connectivity. Poll the returned operation/resource on its in_progress flag, waiting next_check_seconds between reads: while in_progress is true its reason_code is what is awaited (reason_kind waiting, e.g. a queued or pending reason, or a control plane that has not answered yet), never an error; only in_progress false with reason_kind failure is a failure. Preserve reason_code. On transport uncertainty inspect state and reuse only the original key and unchanged request; never automatically retry.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project_id": "<project_id>",
      "name": "<name>",
      "rules": "<rules>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "create_network_security_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
rulesYes
network_idNoExact lowercase UUID returned by an owned networking resource
project_idYesExact lowercase UUID returned by an owned networking resource
egress_policyNo
idempotencyKeyYesIdempotency-Key for this exact change; preserve it and the unchanged body on uncertain recovery

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.3.21
    • addedInput schema / properties / egress_policy
      Added value: +{
      +  "enum": [
      +    "allow",
      +    "rules_only"
      +  ],
      +  "type": "string"
      +}
  2. First observedv2.3.16

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations (readOnly false, idempotent true, non-destructive), it discloses the egress_policy branching and the legacy default, the IPv6 limitation, the networking:read/manage auth scope, backend ownership and 2FA enforcement, and the full async lifecycle. The polling contract—in_progress true is never an error, retain reason_code, only failure with in_progress false is a failure—is exactly the operational context annotations cannot convey.

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 purpose is front-loaded, but the remainder is one dense unbroken paragraph that interleaves egress semantics, authorization, and async polling, making it hard to scan. Nearly every sentence is substantive, so the issue is structure rather than padding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a mutating, async, permission-gated tool with no output schema, and the description fills every such gap: authorization scope, pending-vs-failure semantics, where to poll, wait behavior, and recovery on transport uncertainty. An agent has enough to invoke it and interpret results without guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%, so the description has to carry weight and largely does: egress_policy's two values are explained semantically (rules_only = exactly supplied rules, allow = unrestricted IPv4 egress), network_id's scoping effect is defined, and idempotencyKey's preservation/reuse rule is spelled out. The rules array element fields are left almost entirely to the schema.

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 opening sentence gives a concrete verb and resource ("Create a named allow-rule set") and the surrounding text clarifies that the set is scoped by network_id or project. It implicitly separates this from update/clone by noting "Updates and clones preserve exact rules," but it never states outright how this create differs from clone_network_security_group in intent.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear preconditions: read capabilities and owned resource state first, and obtain approval for the exact change. It also states the required permissions (networking:manage) and the egress_policy decision point. What it lacks is an explicit "use clone/update instead when..." comparison against the sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools