Class ServerCommandToolSpec
java.lang.Object
eu.mrapik.minecraftservermcp.builtin.command.ServerCommandToolSpec
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 Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic McpToolDefinitiondefinition(BuiltinToolContext ctx, io.modelcontextprotocol.json.McpJsonMapper mapper) Builds theserver_commandtool definition for registration on the MCP server.
-
Field Details
-
ID
MCP tool name and config key ("server_command").- See Also:
-
-
Method Details
-
definition
public static McpToolDefinition definition(BuiltinToolContext ctx, io.modelcontextprotocol.json.McpJsonMapper mapper) Builds theserver_commandtool definition for registration on the MCP server.- Parameters:
ctx- shared built-in context (scheduler, paths, settings)mapper- JSON mapper used to parseINPUT_SCHEMAfor the MCP tool descriptor- Returns:
- a complete
McpToolDefinitionincluding metadata and handler
-