Class BuiltinToolCatalog

java.lang.Object
eu.mrapik.minecraftservermcp.builtin.BuiltinToolCatalog

public final class BuiltinToolCatalog extends Object
Central list of built-in McpToolDefinitions. The MCP plugin constructs this list at startup and registers each entry through MinecraftServerMcp.registerTool(McpToolDefinition) — the same API available to other plugins.

Filesystem read/list and player data are exposed as MCP resources (see BuiltinMcpResources), not tools.

The Supplier for PluginSettings allows tools to read updated limits after MinecraftServerMcp.reloadConfiguration() without re-registering tools.

  • Method Details

    • definitions

      public static List<McpToolDefinition> definitions(JavaPlugin mcpPlugin, Supplier<PluginSettings> settings, ServerFilePaths paths)
      Builds the full set of built-in tool definitions for registration on the MCP server.
      Parameters:
      mcpPlugin - owning plugin (the MCP plugin itself)
      settings - current settings; typically settingsRef::get so reads stay fresh after reload
      paths - server root paths for file tools
      Returns:
      immutable list of all built-in tool definitions