Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

power_off

Immediately power off a Hetzner Cloud server by cutting power, useful for emergency shutdowns or hardware resets. Note: This action may cause data loss.

Instructions

Power off a server.

Powers off a server. Note: This is equivalent to pulling the power plug and may cause data loss.
Consider using a graceful shutdown if possible.

Example:
- Power off server: {"server_id": 12345}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for the 'power_off' tool. Retrieves the server by ID and calls client.servers.power_off(server) to power off the Hetzner Cloud server, returning success and action details.
    def power_off(params: ServerIdParam) -> Dict[str, Any]:
        """
        Power off a server.
        
        Powers off a server. Note: This is equivalent to pulling the power plug and may cause data loss.
        Consider using a graceful shutdown if possible.
        
        Example:
        - Power off server: {"server_id": 12345}
        """
        try:
            server = client.servers.get_by_id(params.server_id)
            if not server:
                return {"error": f"Server with ID {params.server_id} not found"}
                
            action = client.servers.power_off(server)
            
            # Don't wait for the action to complete - the method doesn't exist
            return {
                "success": True,
                "action": {
                    "id": action.id,
                    "status": action.status,
                    "command": action.command,
                    "progress": action.progress,
                    "error": action.error,
                    "started": action.started.isoformat() if action.started else None,
                    "finished": action.finished.isoformat() if action.finished else None,
                } if action else None,
            }
        except Exception as e:
            return {"error": f"Failed to power off server: {str(e)}"}
  • Pydantic model defining the input schema for the power_off tool, requiring a server_id integer.
    class ServerIdParam(BaseModel):
        server_id: int = Field(..., description="The ID of the server")
Behavior5/5

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

With no annotations provided, the description carries full responsibility for behavioral disclosure. It excellently explains the destructive nature ('equivalent to pulling the power plug'), warns about data loss, and provides a concrete example of usage. This gives the agent crucial context about the tool's impact that isn't captured elsewhere.

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 perfectly structured: a clear purpose statement, important behavioral warnings, usage guidance, and a concrete example. Every sentence earns its place, with no redundancy or wasted words. The information is front-loaded with the most critical details first.

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?

For a destructive operation with no annotations and an output schema present, this description provides excellent completeness. It covers purpose, behavioral risks, usage considerations, and parameter demonstration. The existence of an output schema means return values don't need explanation in the description, making this fully adequate.

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?

The schema has 0% description coverage, but the description compensates well by providing a clear example showing the server_id parameter in context. While it doesn't explain parameter constraints or validation rules, the example demonstrates the expected structure and data type (integer ID), adding significant value beyond the bare 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 description clearly states the action ('power off') and resource ('a server'), making the purpose immediately understandable. It distinguishes from sibling 'reboot' by specifying a complete shutdown rather than restart, though it doesn't explicitly contrast with 'power_on' beyond the obvious inverse relationship.

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?

The description provides clear contextual guidance about when to use this tool ('Consider using a graceful shutdown if possible') and warns about potential data loss, which helps the agent understand this is a forceful option. However, it doesn't explicitly name alternative tools like 'reboot' or mention prerequisites such as server state requirements.

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