Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

delete_volume

Permanently delete a Hetzner Cloud volume by its ID to remove storage resources and manage cloud infrastructure.

Instructions

Delete a volume.

Permanently deletes a volume identified by its ID.

Example:
- Delete volume: {"volume_id": 12345}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the 'delete_volume' tool. It takes a VolumeIdParam, retrieves the volume using the Hetzner client, and deletes it if found.
    def delete_volume(params: VolumeIdParam) -> Dict[str, Any]:
        """
        Delete a volume.
        
        Permanently deletes a volume identified by its ID.
        
        Example:
        - Delete volume: {"volume_id": 12345}
        """
        try:
            volume = client.volumes.get_by_id(params.volume_id)
            if not volume:
                return {"error": f"Volume with ID {params.volume_id} not found"}
                
            success = client.volumes.delete(volume)
            
            return {"success": success}
        except Exception as e:
            return {"error": f"Failed to delete volume: {str(e)}"}
  • Pydantic schema/model defining the input parameter 'volume_id' required by the delete_volume tool and other volume-related tools.
    class VolumeIdParam(BaseModel):
        volume_id: int = Field(..., description="The ID of the volume")
  • The @mcp.tool() decorator registers the delete_volume function as an MCP tool.
    def delete_volume(params: VolumeIdParam) -> Dict[str, Any]:
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the deletion is 'permanent', which is crucial context, but lacks other important details like authentication requirements, rate limits, error conditions, or what happens to associated data. The example helps but doesn't cover behavioral traits comprehensively.

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 only three sentences, all essential. It's front-loaded with the core action, followed by critical behavioral detail ('permanently'), and ends with a helpful example. Zero wasted words.

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?

For a destructive mutation tool with no annotations, 0% schema coverage, and an output schema (which helps but doesn't replace description), the description is incomplete. It misses critical context like permissions needed, irreversible consequences, error handling, and differentiation from sibling tools, making it inadequate for safe agent use.

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 schema provides no parameter descriptions. The description adds minimal semantics by mentioning 'volume identified by its ID' and showing an example with 'volume_id', but doesn't explain ID format, validation rules, or where to find the ID. This partially compensates but leaves gaps.

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 ('Delete') and resource ('a volume'), making the purpose immediately understandable. It distinguishes from siblings like 'detach_volume' by specifying permanent deletion, though it doesn't explicitly contrast with all alternatives like 'resize_volume' or 'get_volume'.

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. It doesn't mention prerequisites (e.g., volume must be detached), consequences of deletion, or when to choose other tools like 'detach_volume' or 'resize_volume' instead.

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