colmugx/mcp/client does not have a README file
pub(all) struct ListPromptsResult {
prompts : Array[PromptDefinition]
next_cursor : String?
metadata : ResultMetadata
} derive(Eq, Debug)pub(all) struct ListResourceTemplatesResult {
resource_templates : Array[ResourceTemplate]
next_cursor : String?
metadata : ResultMetadata
} derive(Eq, Debug)fn ListResourceTemplatesResult::equal(ListResourceTemplatesResult, ListResourceTemplatesResult) -> Boolfn ListResourceTemplatesResult::not_equal(x : ListResourceTemplatesResult, y : ListResourceTemplatesResult) -> Boolpub(all) struct ListResourcesResult {
resources : Array[ResourceDefinition]
next_cursor : String?
metadata : ResultMetadata
} derive(Eq, Debug)pub(all) struct ListToolsResult {
tools : Array[ToolDefinition]
next_cursor : String?
metadata : ResultMetadata
} derive(Eq, Debug)pub struct MCPClient {
client_name : String
client_version : String
capabilities : ClientCapabilities
transport : AnyTransport
id_counter : RequestIdCounter
server_capabilities : ServerCapabilities?
server_info : ServerInfo?
notification_handlers : NotificationHandlers
subscription_handlers : Map[String, (Json) -> Unit]
sampling_handler : (Json) -> Result[CreateMessageResult, MCPError]?
roots_handler : () -> Result[Array[Root], MCPError]?
elicitation_handler : (Json) -> Result[ElicitationResult, MCPError]?
response_map : Map[String, Queue[String]]
request_cancellations : Map[String, (String?) -> Unit]
receive_mutex : Mutex
event_loop_started : Bool
legacy_mode : Bool
backend : ClientBackend
}async fn MCPClient::call_tool(self : MCPClient, name : String, arguments? : String, progress_token? : ProgressToken) -> Result[ToolResult, MCPError]async fn MCPClient::complete(self : MCPClient, ref_type~ : String, ref_name~ : String, argument_name~ : String, argument_value~ : String, context_arguments? : Map[String, String]) -> Result[CompletionResult, MCPError]async fn MCPClient::complete_reference(self : MCPClient, reference : CompletionReference, argument_name~ : String, argument_value~ : String, context_arguments? : Map[String, String]) -> Result[CompletionResult, MCPError]async fn MCPClient::connect_http(url~ : String, name~ : String, version~ : String, auth_token? : String, extra_headers? : Array[(String, String)], era? : ProtocolEra) -> Result[MCPClient, MCPError]| era | server/discover probe | legacy fallback |
|---|---|---|
| Auto | yes (default) | allowed |
| Legacy | skipped | direct connect |
| Modern | yes | forbidden (Err) |
| era | server/discover probe | legacy fallback |
|---|---|---|
| Auto | yes (default) | allowed |
| Legacy | skipped | direct connect |
| Modern | yes | forbidden (Err) |
async fn MCPClient::get_prompt(self : MCPClient, name : String, arguments? : String) -> Result[GetPromptResult, MCPError]async fn MCPClient::list_prompts(self : MCPClient, cursor? : String) -> Result[ListPromptsResult, MCPError]async fn MCPClient::list_resource_templates(self : MCPClient, cursor? : String) -> Result[ListResourceTemplatesResult, MCPError]async fn MCPClient::list_resources(self : MCPClient, cursor? : String) -> Result[ListResourcesResult, MCPError]async fn MCPClient::list_tools(self : MCPClient, cursor? : String) -> Result[ListToolsResult, MCPError]fn MCPClient::on_elicitation(self : MCPClient, handler : (Json) -> Result[ElicitationResult, MCPError], capabilities? : ElicitationCapabilities) -> MCPClientfn MCPClient::on_sampling(self : MCPClient, handler : (Json) -> Result[CreateMessageResult, MCPError], capabilities? : SamplingCapabilities) -> MCPClientasync fn MCPClient::read_resource(self : MCPClient, uri : String) -> Result[ReadResourceResult, MCPError]fn MCPClient::with_capabilities(self : MCPClient, capabilities : ClientCapabilities) -> MCPClient raise MCPErrorasync fn MCPHost::call_tool(self : MCPHost, qualified_name : String, arguments? : String) -> Result[ToolResult, MCPError]async fn MCPHost::connect_http(self : MCPHost, name~ : String, url~ : String, auth_token? : String, era? : ProtocolEra) -> Result[Unit, MCPError]| era | server/discover probe | legacy fallback |
|---|---|---|
| Auto | yes (default) | allowed |
| Legacy | skipped | direct connect |
| Modern | yes | forbidden (Err) |
pub(all) struct NotificationHandlers {
on_tools_changed : () -> Unit?
on_resources_changed : () -> Unit?
on_prompts_changed : () -> Unit?
on_progress : (ProgressNotification) -> Unit?
on_cancelled : (CancelledNotification) -> Unit?
on_resource_updated : (ResourceUpdatedNotification) -> Unit?
on_message : (String, Json?) -> Unit?
}pub(all) struct ReadResourceResult {
contents : Array[ResourceContents]
metadata : ResultMetadata
} derive(Eq, Debug)pub(all) struct ResourceTemplate {
uri_template : String
name : String
title : String?
description : String?
mime_type : String?
icons : Array[Icon]?
metadata : ContentMetadata
} derive(Eq, Debug)Install
Download zipType-safe MCP SDK in MoonBit with server/client support and dual transport (STDIO/HTTP)