Class ServerCommandToolSpec

java.lang.Object
eu.mrapik.minecraftservermcp.builtin.command.ServerCommandToolSpec

public final class ServerCommandToolSpec extends Object
MCP tool that runs a command as the server console, subject to CommandPolicy for the caller's token.

Only whether Bukkit.dispatchCommand(org.bukkit.command.CommandSender, java.lang.String) reported success is returned in the tool result; command output is not available to this tool (the real console sender must be used on Paper).

  • Field Details

  • Method Details

    • definition

      public static McpToolDefinition definition(BuiltinToolContext ctx, io.modelcontextprotocol.json.McpJsonMapper mapper)
      Builds the server_command tool definition for registration on the MCP server.
      Parameters:
      ctx - shared built-in context (scheduler, paths, settings)
      mapper - JSON mapper used to parse INPUT_SCHEMA for the MCP tool descriptor
      Returns:
      a complete McpToolDefinition including metadata and handler