Skip to main content
Glama

execute_player_command

Execute a command for a specific player by providing their identifier and the command. Optionally redirect to a downstream server if the player is not on the proxy.

Instructions

Executes a command for a given player

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
identifierYesThe name or unique id of the player
commandYesThe command to execute (without prefixing slash)
redirectToServerNoRedirect downstream if not found on proxy

Implementation Reference

  • Input schema definition for 'execute_player_command' tool — expects identifier, command, and optional redirectToServer
    types.Tool(
        name="execute_player_command",
        description="Executes a command for a given player",
        inputSchema={
            "type": "object",
            "properties": {
                "identifier": {"type": "string", "description": "The name or unique id of the player"},
                "command": {"type": "string", "description": "The command to execute (without prefixing slash)"},
                "redirectToServer": {"type": "boolean", "description": "Redirect downstream if not found on proxy"}
            },
            "required": ["identifier", "command"],
        },
    ),
  • Handler logic for 'execute_player_command' — extracts identifier, command, and redirectToServer param, then POSTs to CloudNet player/online/{identifier}/command endpoint
    elif name == "execute_player_command":
        identifier = arguments.get("identifier")
        cmd = arguments.get("command")
        params = {}
        if "redirectToServer" in arguments:
            params["redirectToServer"] = str(arguments["redirectToServer"]).lower()
        data = await client.request("POST", f"player/online/{identifier}/command", params=params, json={"command": cmd})
        return [types.TextContent(type="text", text=str(data))]
  • Tool registration via @app.list_tools() decorator — returns all tool definitions including 'execute_player_command'
    @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": {},
                },
            ),
            types.Tool(
                name="get_node_info",
                description="Get detailed information about a specific node",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "node_id": {"type": "string", "description": "The ID of the node"}
                    },
                    "required": ["node_id"],
                },
            ),
            types.Tool(
                name="get_services",
                description="List all smart services",
                inputSchema={
                    "type": "object",
                    "properties": {},
                },
            ),
            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"},
                    },
                },
            ),
            types.Tool(
                name="get_player_info",
                description="Get a player by their unique id or name",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "identifier": {"type": "string", "description": "The name or unique id of the player"}
                    },
                    "required": ["identifier"],
                },
            ),
            types.Tool(
                name="kick_player",
                description="Kicks a given player from the entire network",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "identifier": {"type": "string", "description": "The name or unique id of the player"},
                        "message": {"type": "string", "description": "The kick message/reason"}
                    },
                    "required": ["identifier", "message"],
                },
            ),
            types.Tool(
                name="send_player_message",
                description="Sends a chat message to a given player",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "identifier": {"type": "string", "description": "The name or unique id of the player"},
                        "message": {"type": "string", "description": "The chat message to send"}
                    },
                    "required": ["identifier", "message"],
                },
            ),
            types.Tool(
                name="execute_player_command",
                description="Executes a command for a given player",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "identifier": {"type": "string", "description": "The name or unique id of the player"},
                        "command": {"type": "string", "description": "The command to execute (without prefixing slash)"},
                        "redirectToServer": {"type": "boolean", "description": "Redirect downstream if not found on proxy"}
                    },
                    "required": ["identifier", "command"],
                },
            ),
            types.Tool(
                name="execute_service_command",
                description="Executes the specified command on a service console",
                inputSchema={
                    "type": "object",
                    "properties": {
                        "identifier": {"type": "string", "description": "The name or unique id of the service"},
                        "command": {"type": "string", "description": "The command to execute on the service"}
                    },
                    "required": ["identifier", "command"],
                },
            ),
        ]
Behavior2/5

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

The description is very brief and does not disclose behavioral traits such as permissions required, side effects, or whether the command execution is synchronized. No annotations are provided to compensate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (one sentence) but lacks important details. It is efficient but not sufficiently informative for an agent to fully understand usage.

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

Completeness2/5

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

Given no output schema and no annotations, the description should provide more context about the behavior and return value. It is insufficient for a complete understanding of the tool.

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?

The input schema covers 100% of the parameters with descriptions. The tool description adds no additional meaning beyond what the schema already provides, so baseline 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 states the tool's action (execute a command) and target (a given player). It is a specific verb-resource pair, but does not distinguish from the sibling tool 'execute_service_command' which executes commands on a service.

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 is provided on when to use this tool versus alternatives like kick_player or send_player_message. The description lacks any context for the agent to choose this tool over others.

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