Skip to main content
Glama
hcloud-mcp
by Xodus-CO

create_firewall

Creates a Hetzner Cloud firewall with inbound and outbound rules, optional ports and labels, and applies it to servers or a label selector.

Instructions

Create a new firewall. Rules: direction 'in'|'out', protocol 'tcp'|'udp'|'icmp'|'esp'|'gre'; use source_ips for in, destination_ips for out (CIDRs, e.g. 0.0.0.0/0); port optional for tcp/udp. Optionally apply_to servers or label_selector at creation.

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": {
      "name": "<name>"
    },
    "name": "create_firewall"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
rulesNo
labelsNo
apply_toNoApply firewall to these servers or label_selector after creation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • addedInput schema / properties / apply_to
      Added value: +{
      +  "description": "Apply firewall to these servers or label_selector after creation",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "label_selector": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "selector": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "selector"
      +        ],
      +        "type": "object"
      +      },
      +      "server": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": {
      +        "enum": [
      +          "server",
      +          "label_selector"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedInput schema / properties / rules / items
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "description": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "destination_ips": {
      +      "description": "CIDRs for direction=out; host bits must be zero",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "direction": {
      +      "enum": [
      +        "in",
      +        "out"
      +      ],
      +      "type": "string"
      +    },
      +    "port": {
      +      "type": "string"
      +    },
      +    "protocol": {
      +      "enum": [
      +        "tcp",
      +        "udp",
      +        "icmp",
      +        "esp",
      +        "gre"
      +      ],
      +      "type": "string"
      +    },
      +    "source_ips": {
      +      "description": "CIDRs for direction=in; host bits must be zero (10.0.1.0/24, not 10.0.1.42/24; single host 192.0.2.2/32)",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "direction",
      +    "protocol"
      +  ],
      +  "type": "object"
      +}
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare this is a non-read-only, non-idempotent, non-destructive open-world mutation, so the safety profile is covered. The description adds genuine domain behavior (source_ips applies to inbound, destination_ips to outbound, port only meaningful for tcp/udp), but stays silent on whether a firewall can be created with zero rules (the schema makes 'rules' optional) and on duplicate-name or failure behavior.

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

Conciseness4/5

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

Dense and front-loaded: the action comes first, then rule semantics, then creation-time attachment, in a single efficient block with no filler. The telegraphic semicolon style is slightly terse but still parseable.

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 4-parameter tool with a nested rules array and no output schema, the description covers the hardest part (rule construction) well and mentions apply_to. Remaining gaps are the 'labels' map and what the call returns, which are minor relative to the guidance provided.

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?

With only 25% schema coverage, the description carries real weight: it restates the direction and protocol enums, explains the source_ips/destination_ips split by direction, gives a CIDR example (0.0.0.0/0), and clarifies port is optional and tcp/udp-only. It does not explain 'name' or the 'labels' map, which remain undocumented in both schema and description.

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 opens with a specific verb+resource ('Create a new firewall') and immediately scopes what a firewall consists of (rules, optional apply_to). It implicitly contrasts creation-time apply_to with the sibling apply_firewall_to_resources, but never names that sibling, so differentiation is only partial.

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

Usage Guidelines3/5

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

'Optionally apply_to servers or label_selector at creation' hints that attachment can also be done later via another tool, but the alternative is never named and there is no when-not guidance. An agent must infer that set_firewall_rules and apply_firewall_to_resources are the post-creation paths.

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