Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

delete_firewall

Remove a firewall from Hetzner Cloud infrastructure by specifying its ID to permanently delete the security rule set.

Instructions

Delete a firewall.

Permanently deletes a firewall identified by its ID.

Example:
- Delete firewall: {"firewall_id": 12345}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the delete_firewall tool. It retrieves the firewall by ID using the Hetzner client and calls the delete method.
    @mcp.tool()
    def delete_firewall(params: FirewallIdParam) -> Dict[str, Any]:
        """
        Delete a firewall.
        
        Permanently deletes a firewall identified by its ID.
        
        Example:
        - Delete firewall: {"firewall_id": 12345}
        """
        try:
            firewall = client.firewalls.get_by_id(params.firewall_id)
            if not firewall:
                return {"error": f"Firewall with ID {params.firewall_id} not found"}
                
            success = client.firewalls.delete(firewall)
            
            return {"success": success}
        except Exception as e:
            return {"error": f"Failed to delete firewall: {str(e)}"}
  • Pydantic BaseModel schema defining the input parameter 'firewall_id' required by the delete_firewall tool.
    class FirewallIdParam(BaseModel):
        firewall_id: int = Field(..., description="The ID of the firewall")
Behavior2/5

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

With no annotations provided, the description carries full burden. It discloses the destructive nature ('permanently deletes') which is critical, but lacks other behavioral traits: no mention of authentication requirements, error conditions (e.g., if firewall is in use), rate limits, or what the output schema returns. The example shows parameter format but doesn't explain behavioral outcomes.

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?

The description is extremely concise with three short sentences and an example. Every sentence adds value: first states action, second clarifies permanence and identifier, third provides concrete usage. No wasted words, and it's front-loaded with the core purpose.

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

Completeness2/5

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

Given high complexity (destructive operation), no annotations, and 0% schema coverage, the description is incomplete. It mentions permanence but misses critical context: prerequisites, side effects, error handling, and output details (though output schema exists, the description doesn't reference it). For a deletion tool with siblings like 'remove_firewall_from_resources', more guidance is needed.

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 description coverage is 0%, so the description must compensate. It adds that the firewall is 'identified by its ID' and provides an example with 'firewall_id', giving basic semantic context. However, it doesn't explain ID format constraints, validation rules, or where to obtain the ID, leaving gaps. With 1 parameter, baseline would be 4 if fully covered, but partial coverage justifies 3.

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 verb 'delete' and resource 'firewall', making the purpose unambiguous. It distinguishes from siblings like 'remove_firewall_from_resources' by specifying permanent deletion rather than detachment. However, it doesn't explicitly contrast with 'delete_server' or other delete operations, keeping it at 4 rather than 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'remove_firewall_from_resources' or 'update_firewall'. It mentions the firewall must be identified by ID but doesn't specify prerequisites (e.g., whether the firewall must be detached first) or warn about irreversible consequences beyond stating 'permanently deletes'.

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/dkruyt/mcp-hetzner'

If you have feedback or need assistance with the MCP directory API, please join our Discord server