Skip to main content
Glama

get_online_players

Retrieve a list of online players with options to limit results, skip entries, and sort by name. Query the CloudNet server to filter player data based on your criteria.

Instructions

Get a list of online players based on the query parameters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoThe maximum amount of players to respond with
skipNoThe amount of players to skip
sortNoSort players by name

Implementation Reference

  • Tool registration: defines 'get_online_players' with input schema including optional limit, skip, and sort parameters.
    types.Tool(
        name="get_online_players",
        description="Get a list of online players based on the query parameters",
        inputSchema={
            "type": "object",
            "properties": {
                "limit": {"type": "integer", "description": "The maximum amount of players to respond with"},
                "skip": {"type": "integer", "description": "The amount of players to skip"},
                "sort": {"type": "string", "enum": ["asc", "desc"], "description": "Sort players by name"},
            },
        },
    ),
  • Handler implementation: extracts limit/skip/sort params from arguments, calls GET /player/online via the API client, and returns results as text.
    @app.call_tool()
    async def call_tool(
        name: str, arguments: dict[str, Any] | None
    ) -> list[types.TextContent | types.ImageContent | types.EmbeddedResource]:
        if arguments is None:
            arguments = {}
    
        if name == "get_nodes":
            data = await client.request("GET", "node")
            return [types.TextContent(type="text", text=str(data))]
        elif name == "get_node_info":
            node_id = arguments.get("node_id")
            if not node_id:
                raise ValueError("node_id is required")
            data = await client.request("GET", f"node/{node_id}")
            return [types.TextContent(type="text", text=str(data))]
        elif name == "get_services":
            data = await client.request("GET", "service")
            return [types.TextContent(type="text", text=str(data))]
        elif name == "get_online_players":
            params = {}
            for key in ["limit", "skip", "sort"]:
                if key in arguments:
                    params[key] = arguments[key]
            data = await client.request("GET", "player/online", params=params)
            return [types.TextContent(type="text", text=str(data))]
Behavior2/5

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

No annotations provided, and the description does not disclose behavioral traits such as authentication requirements, rate limits, or behavior when no players are online. It is simply a read operation, but lacks any additional context.

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 sentence with no extraneous information. It is front-loaded and to the point.

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?

The tool is simple and has no output schema, but the description could be improved by noting that it returns a list of player objects or mentioning pagination behavior. It is adequate but not thorough.

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 coverage is 100% with descriptions for all three parameters (limit, skip, sort). The description adds no additional meaning beyond what is already in the schema, so baseline score of 3 is appropriate.

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 identifies the action (get) and resource (online players), and implies filtering via query parameters. It distinguishes from siblings like get_player_info which returns a single player, but could be more specific about the scope.

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?

No guidance on when to use this tool vs alternatives such as get_players (nonexistent) or other player-related tools. No exclusion criteria or context provided.

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