Skip to main content
Glama

Add a firewall rule

add_firewall_rule

Open a port or a range on every machine in this environment, from anywhere or only from the addresses you list. Only workspace owners and admins can change the firewall. Applies to running machines within about a minute. Prefer listing your own addresses over anywhere for anything that is not meant to be public. A web app served over HTTPS through create_instance_link needs no firewall rule.

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": {
      "ports": "<ports>",
      "sources": "<sources>"
    },
    "name": "add_firewall_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
portsYesA port like "8080" or a range like "8000-8100"
sourcesYesWho may connect: ["anywhere"], or IP addresses and CIDR ranges, IPv4 or IPv6 (e.g. ["203.0.113.7", "198.51.100.0/24"]). A single address means just that address.
protocolNotcp (default) or udp
workspaceNoWorkspace ID (optional: defaults to the authenticated workspace)
descriptionNoWhat the rule is for, up to 100 characters
environmentNoEnvironment name (optional: defaults to the environment this session acts in)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / env
      Removed value: -{
      -  "description": "Environment name (optional — defaults to main)",
      -  "type": "string"
      -}
    • addedInput schema / properties / environment
      Added value: +{
      +  "description": "Environment name (optional: defaults to the environment this session acts in)",
      +  "type": "string"
      +}
    • changedInput schema / properties / workspace / description
      Previous value: -"Workspace ID (optional — defaults to authenticated workspace)"New value: +"Workspace ID (optional: defaults to the authenticated workspace)"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With annotations already covering readOnly/destructive/openWorld/idempotent, the description adds genuinely new operational facts: authorization scope ('Only workspace owners and admins'), timing ('Applies to running machines within about a minute'), and a security posture recommendation. It doesn't say whether adding a duplicate rule errors or merges, which is the main remaining gap for a non-idempotent mutation.

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

Conciseness5/5

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

Four sentences, each carrying distinct information: what it does, who may do it, when it takes effect, and a safety caveat plus an exclusion. The action statement is front-loaded with no filler.

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

Completeness4/5

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

For a 6-parameter mutation with no output schema, the description covers permissions, propagation delay, and scope, which is what an agent needs before calling. It stops short of describing what the call returns (e.g., the created rule ID) and duplicate-rule behavior, minor gaps given the full-schema coverage.

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

Parameters3/5

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

Schema coverage is 100% and each property is already documented, so the baseline applies. The description only loosely reinforces 'sources' (from anywhere vs listed addresses) and 'ports' via 'port or a range', adding little beyond what the schema states.

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 opening sentence gives a specific verb and resource ('Open a port or a range') plus its blast radius ('on every machine in this environment'), which cleanly separates it from update_firewall_rule, remove_firewall_rule and list_firewall_rules. An agent can identify the operation without reading the schema.

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

Usage Guidelines5/5

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

Explicit when-not guidance is present ('A web app served over HTTPS through create_instance_link needs no firewall rule') plus an explicit preference rule ('Prefer listing your own addresses over anywhere for anything that is not meant to be public'). This steers both whether to call and how to choose the sources argument.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.