A connection to a Model Context Protocol server, as the MCP catalog's functions use it.
A2UICore makes no MCP connections itself: the host implements this
behaviour over whatever MCP client it uses and passes the client as
{module, state} (see A2UICore.Catalog.MCP.catalog/2). Every callback
receives the state; values are MCP's JSON objects with string keys.
call_tool/3sendstools/calland returns theCallToolResult.read_resource/2sendsresources/readand returns its result (%{"contents" => [...]}); without it, the UI resources a tool names are not read.list_tools/1sendstools/listand returns the tools; without it, a tool's declared UI resource (_meta.ui.resourceUriin its descriptor) is not looked up.
A callback returns {:error, reason} on failure; reason is a string,
an exception or any term, and becomes part of the function's error
message. Results are not cached between calls; a client that wants
caching (tools/list rarely changes) does it itself.