colmugx/mcp/protocol does not have a README file

    ContentItem

    Content item for MCP tool results

    MCPError

    MCP protocol-level errors These follow the JSON-RPC 2.0 error code conventions.

    Error code allocation (per 2026-07-28 spec):
    • -32700, -32600..-32603: standard JSON-RPC 2.0
    • -32000..-32019: legacy/implementation-defined (no new allocations)
    • -32020..-32099: reserved for the MCP specification

    ParamDef

    Parameter definition for tool schema

    ServerCapabilities

    Tool

    Core Tool trait following MCP protocol

    ToolResult

    Tool execution result following MCP protocol format

    TransportError

    Transport-level errors These occur at the communication layer (network, IO, etc.)

    get_number

    fn get_number(json : Json, key : String) -> Result[Double,
    ToolResult
    ]

    Extract number from JSON, returning error ToolResult on failure

    get_optional_number

    fn get_optional_number(json : Json, key : String) -> Result[Double?,
    ToolResult
    ]

    Extract optional number from JSON

    get_optional_string

    fn get_optional_string(json : Json, key : String) -> Result[String?,
    ToolResult
    ]

    Extract optional string from JSON

    get_string

    fn get_string(json : Json, key : String) -> Result[String,
    ToolResult
    ]

    Extract string from JSON, returning error ToolResult on failure

    simple_tool

    fn simple_tool(name : String, description : String, handler : (Json) ->
    ToolResult
    ) ->
    ToolWrapper

    tool_fn

    fn[Args :
    Params
    , Ret :
    ToToolResult
    ] tool_fn(handler : (Args) -> Ret, name~ : String, description~ : String) ->
    ToolWrapper

    Source Files

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io