Implementations of the MCP catalog's functions (see
A2UICore.Catalog.MCP).
callMcpToolcalls a tool through the host'sA2UICore.MCP.Clientand returns the tool'sCallToolResult. The A2UI messages the result carries — in the UI resources it names (_meta.ui.resourceUri, else those its tool descriptor declares) and embedded in its content — come back as{:messages, %{messages: messages, source: :resource | :inline}}effects for the renderer to apply; messages without aversionget the catalog's (v0.9orv1.0). WithtargetDataPath(v1.0), the MCP App a resource holds is written there as%{"uri", "htmlContent", "csp", "permissions", "toolInput", "toolResult"}(a{:write, ...}effect), ready for anMcpAppcomponent to bind.jmespathevaluates a JMESPath expression (A2UICore.JMESPath).split,regexCaptureandregexReplacework on a string, or on each string of an array. Patterns are RE2 expressions, run by PCRE with RE2's meaning of$(end of text) and ASCII\d,\w,\b.updateDataModelasks for its updates to be written: one{:write, %{path: path, value: value}}effect per entry, the path resolved against the calling scope.
Effects reach the renderer from an action (see
A2UICore.Resolution.NodeResolver.invoke/5); a renderer applies them
in order. Failures are errors with category :expression.
Summary
Functions
The function implementations of the MCP catalog of version.
Types
@type client() :: A2UICore.MCP.Client.t() | (String.t() -> A2UICore.MCP.Client.t() | nil)
The MCP client: {module, state}, or a function from a tool name to one.
Functions
@spec implementations(String.t(), keyword()) :: %{ optional(String.t()) => A2UICore.Catalog.Function.execute() }
The function implementations of the MCP catalog of version.
Options: :client — the client/0 callMcpTool uses. Without one,
callMcpTool fails.