Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

power_on

Start a powered-off Hetzner Cloud server by providing its server ID to resume operations and services.

Instructions

Power on a server.

Powers on a server that is currently powered off.

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the 'power_on' tool. It retrieves the server by ID and calls the Hetzner Cloud API's power_on method via the hcloud client, returning the action details.
    @mcp.tool()
    def power_on(params: ServerIdParam) -> Dict[str, Any]:
        """
        Power on a server.
        
        Powers on a server that is currently powered off.
        
        Example:
        - Power on 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_on(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 on server: {str(e)}"}
  • Pydantic BaseModel defining the input schema for the power_on tool, requiring a server_id integer.
    class ServerIdParam(BaseModel):
        server_id: int = Field(..., description="The ID of the server")
  • The @mcp.tool() decorator registers the power_on function as an MCP tool.
    @mcp.tool()
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 action ('Power on') and prerequisite ('currently powered off'), but lacks details on permissions required, side effects (e.g., boot time, cost implications), error conditions, or response format. This is inadequate for a mutation tool with zero annotation coverage.

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 front-loaded with the core action, followed by a clarifying sentence and a concise example. Every sentence earns its place without redundancy, making it efficient and well-structured for quick understanding.

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

Completeness3/5

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

Given the tool's complexity (simple mutation), 0% schema coverage, and the presence of an output schema (which handles return values), the description is minimally adequate. It covers the basic action and parameter example but lacks behavioral details like permissions or error handling, making it incomplete for safe invocation.

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 description includes an example showing the parameter usage ('server_id': 12345), which adds practical meaning beyond the schema's minimal description ('The ID of the server'). With 0% schema description coverage and only 1 parameter, this example sufficiently compensates, though it doesn't explain parameter constraints or validation.

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 ('Power on') and resource ('a server'), making the purpose specific and understandable. It distinguishes from sibling 'power_off' by specifying opposite state change. However, it doesn't explicitly differentiate from 'reboot' or other power-related tools, preventing a perfect score.

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 minimal guidance by mentioning 'a server that is currently powered off,' which implies a prerequisite state but doesn't explicitly state when to use this tool versus alternatives like 'reboot' or 'create_server.' No explicit alternatives or exclusions are provided, leaving usage context incomplete.

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