Class ServerLogsToolSpec

java.lang.Object
eu.mrapik.minecraftservermcp.builtin.logs.ServerLogsToolSpec

public final class ServerLogsToolSpec extends Object
MCP tool that returns a bounded tail of logs/latest.log under the server root. Line and byte limits come from the tool call arguments and from the profile's extra map (maxLogLines, maxLogBytes in config.yml).
  • Field Details

  • Method Details

    • definition

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