Skip to main content
Glama

get_nodes

Retrieve a list of all nodes in the CloudNet cluster to monitor cluster health and node status.

Instructions

List all nodes in the CloudNet cluster

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'get_nodes' tool with its name, description, and empty inputSchema (no parameters) in the list_tools handler.
    @app.list_tools()
    async def list_tools() -> list[types.Tool]:
        return [
            types.Tool(
                name="get_nodes",
                description="List all nodes in the CloudNet cluster",
                inputSchema={
                    "type": "object",
                    "properties": {},
                },
            ),
  • Handler for 'get_nodes': makes a GET request to 'node' endpoint on the CloudNet API and returns the result as text.
    if name == "get_nodes":
        data = await client.request("GET", "node")
        return [types.TextContent(type="text", text=str(data))]
  • CloudNetClient class: an async HTTP client helper with auto-authentication, used by all tool handlers including get_nodes.
    class CloudNetClient:
        def __init__(self, base_url: str, user: str, password: str):
            self.base_url = base_url.rstrip("/")
            self.user = user
            self.password = password
            self.token = None
            self.client = httpx.AsyncClient()
    
        async def _authenticate(self):
            resp = await self.client.post(
                f"{self.base_url}/auth",
                auth=(self.user, self.password)
            )
            resp.raise_for_status()
            data = resp.json()
            self.token = data.get("token")
            self.client.headers.update({"Authorization": f"Bearer {self.token}"})
    
        async def request(self, method: str, endpoint: str, **kwargs):
            if not self.token:
                await self._authenticate()
            
            path = endpoint.lstrip("/")
            url = f"{self.base_url}/{path}"
            
            try:
                resp = await self.client.request(method, url, **kwargs)
                if resp.status_code == 401:
                    # Token might be expired, re-authenticate and retry
                    await self._authenticate()
                    resp = await self.client.request(method, url, **kwargs)
                resp.raise_for_status()
                if resp.status_code == 204:
                    return {"status": "success"}
                return resp.json()
            except httpx.HTTPError as e:
                return {"error": str(e)}
    
        async def close(self):
            await self.client.aclose()
Behavior2/5

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

With no annotations, the description carries full burden for behavioral disclosure. It implies a read-only list operation but omits any details about authentication, rate limits, or error conditions. The simplicity partially excuses this, but more context would be beneficial.

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 a single, concise sentence that is front-loaded with the purpose. Every word adds value, and there is no wasted text.

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 simplicity (no parameters, no output schema), the description is minimally adequate. It states the purpose but does not hint at the return format or any limitations, which would be helpful for an agent.

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 zero parameters and the schema description coverage is 100%. The description adds no parameter-level detail (none needed), and the baseline for 0 parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all nodes in the CloudNet cluster, using a specific verb ('List') and resource ('nodes'). This distinguishes it from siblings like get_node_info which likely retrieves a single node.

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 get_node_info, nor does it mention any prerequisites or contexts. It only states the basic function.

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/Ergo042/cloudnet-mcp'

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