Skip to main content
Glama
dkruyt

Hetzner Cloud MCP Server

by dkruyt

list_server_types

Retrieve available server configurations to select appropriate resources for deploying applications or managing infrastructure on Hetzner Cloud.

Instructions

List available server types.

Returns information about all available server configurations.

Example:
- List server types: list_server_types()

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for the list_server_types tool. It fetches all server types using the Hetzner Cloud client, formats the data including prices per location, and returns a structured list or an error.
    @mcp.tool()
    def list_server_types() -> Dict[str, Any]:
        """
        List available server types.
        
        Returns information about all available server configurations.
        
        Example:
        - List server types: list_server_types()
        """
        try:
            server_types = client.server_types.get_all()
            result = []
            
            for st in server_types:
                server_type_info = {
                    "id": st.id,
                    "name": st.name,
                    "description": st.description,
                    "cores": st.cores,
                    "memory_gb": st.memory,
                    "disk_gb": st.disk,
                    "storage_type": st.storage_type,
                    "cpu_type": st.cpu_type,
                    "prices": []
                }
                
                if hasattr(st, 'prices') and st.prices:
                    price_list = []
                    for price in st.prices:
                        price_data = {}
                        if hasattr(price, 'price_hourly'):
                            price_data["price_hourly"] = price.price_hourly
                        if hasattr(price, 'price_monthly'):
                            price_data["price_monthly"] = price.price_monthly
                        # Safely add location if available
                        try:
                            if hasattr(price, 'location') and price.location and hasattr(price.location, 'name'):
                                price_data["location"] = price.location.name
                        except:
                            price_data["location"] = None
                            
                        price_list.append(price_data)
                    server_type_info["prices"] = price_list
                    
                result.append(server_type_info)
                
            return {
                "server_types": result
            }
        except Exception as e:
            return {"error": f"Failed to list server types: {str(e)}"}
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While it mentions the tool returns 'information about all available server configurations,' it doesn't specify what information is included, whether there's pagination, rate limits, authentication requirements, or any other behavioral characteristics. The example is helpful but doesn't compensate for the lack of behavioral details.

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?

The description is appropriately concise with three short sentences that each serve a purpose: stating the action, describing the return value, and providing an example. It's front-loaded with the core purpose and could potentially be slightly more efficient by combining the first two sentences.

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 that this is a read-only listing tool with no parameters and an output schema exists, the description is adequate but minimal. It covers the basic purpose and return value but lacks important context about when to use it versus sibling tools and what specific information is returned. The existence of an output schema reduces the burden, but more behavioral context would be helpful.

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 tool has 0 parameters with 100% schema description coverage, so the schema already fully documents the parameter situation. The description appropriately doesn't waste space discussing non-existent parameters. The baseline for this situation is 4 since there are no parameters to explain.

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 tool's purpose with a specific verb ('List') and resource ('available server types'), making it immediately understandable. However, it doesn't differentiate from sibling tools like 'list_servers' or 'list_images' which might cause confusion about what distinguishes server types from servers themselves.

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. With sibling tools like 'list_servers' and 'list_images' that might provide overlapping or related information, there's no indication of when this specific tool is appropriate versus those other listing tools.

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