colmugx/mcp/server does not have a README file

    ContentItem

    Content item for MCP tool results

    JsonRpcResponse

    MCPError

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

    ParamDef

    Parameter definition for tool schema

    RequestId

    Request ID supporting both Int and String per JSON-RPC 2.0 / MCP spec

    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.)

    MCPServer

    pub struct MCPServer {
    name : String
    version : String
    title : String?
    description : String?
    instructions : String?
    log_level : String?
    auth_config :
    AuthConfig
    ?
    registry : ToolRegistry
    resource_registry : ResourceRegistry
    prompt_registry : PromptRegistry
    }

    MCPServer::handle_request

    async fn MCPServer::handle_request(self : MCPServer, request_json : String) -> String

    MCPServer::new

    fn MCPServer::new(name : String, version : String) -> MCPServer

    MCPServer::resource

    fn MCPServer::resource(self : MCPServer, uri : String, name : String, description : String, mime_type : String, handler : async () -> Result[
    ResourceReadResult
    ,
    MCPError
    ]) -> MCPServer

    MCPServer::run_http

    async fn MCPServer::run_http(self : MCPServer, port? : Int, path? : String) -> Unit raise
    TransportError

    MCPServer::run_stdio

    MCPServer::tool

    fn MCPServer::tool(self : MCPServer, name : String, description : String, input_schema : Json, handler : async (Json) -> Result[
    ToolResult
    ,
    MCPError
    ]) -> MCPServer

    MCPServer::with_auth

    MCPServer::with_description

    fn MCPServer::with_description(self : MCPServer, description : String) -> MCPServer

    MCPServer::with_instructions

    fn MCPServer::with_instructions(self : MCPServer, instructions : String) -> MCPServer

    MCPServer::with_prompt

    fn[T :
    Prompt
    ] MCPServer::with_prompt(self : MCPServer, prompt : T) -> MCPServer

    MCPServer::with_resource

    fn[T :
    Resource
    ] MCPServer::with_resource(self : MCPServer, resource : T) -> MCPServer

    MCPServer::with_title

    fn MCPServer::with_title(self : MCPServer, title : String) -> MCPServer

    MCPServer::with_tool

    fn[T :
    Tool
    ] MCPServer::with_tool(self : MCPServer, tool : T) -> MCPServer

    PromptRegistry

    type PromptRegistry

    ResourceRegistry

    type ResourceRegistry

    ToolRegistry

    type ToolRegistry

    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

    mcp_server

    fn mcp_server(name~ : String, version~ : String) -> MCPServer

    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