Class FsWriteToolSpec

java.lang.Object
eu.mrapik.minecraftservermcp.builtin.filesystem.FsWriteToolSpec

public final class FsWriteToolSpec extends Object
MCP tool that writes or appends raw bytes to a path under the server root. The caller supplies file content as standard Base64 in the contentBase64 argument; parent directories are created when needed.
  • Field Details

  • Method Details

    • definition

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