The host rules of MCP Apps (extension io.modelcontextprotocol/ui, revision
2026-01-26). A tool can name a ui:// resource in _meta.ui.resourceUri. After
the agent calls that tool, Vis reads the resource and keeps one app envelope as a
user attachment of the block. The Companion paints the envelope in a sandboxed
frame, and the TUI opens the web app at it.
This namespace holds only data rules: the capability that the client declares, the visibility of a tool, the validation of a view resource, the Content Security Policy and the frame permissions, and the envelope. It does no I/O.
The host rules of MCP Apps (extension `io.modelcontextprotocol/ui`, revision 2026-01-26). A tool can name a `ui://` resource in `_meta.ui.resourceUri`. After the agent calls that tool, Vis reads the resource and keeps one app envelope as a user attachment of the block. The Companion paints the envelope in a sandboxed frame, and the TUI opens the web app at it. This namespace holds only data rules: the capability that the client declares, the visibility of a tool, the validation of a view resource, the Content Security Policy and the frame permissions, and the envelope. It does no I/O.
(allow-attribute granted)The iframe allow value for granted (granted-permissions), or "".
The iframe `allow` value for `granted` ([[granted-permissions]]), or "".
(app-callable? tool)True when a view may call tool through the host.
True when a view may call `tool` through the host.
(app-method? method)True for an MCP request that a view may send to its server through the host.
True for an MCP request that a view may send to its server through the host.
The value of capabilities.extensions["io.modelcontextprotocol/ui"].
The value of `capabilities.extensions["io.modelcontextprotocol/ui"]`.
(content-security-policy csp)The Content Security Policy for a view with the declared domains csp (the
result of declared-csp). Nothing beyond the declared domains is allowed:
no network without connectDomains, no nested frame without frameDomains, a
same-origin base without baseUriDomains, and never an object.
The Content Security Policy for a view with the declared domains `csp` (the result of [[declared-csp]]). Nothing beyond the declared domains is allowed: no network without `connectDomains`, no nested frame without `frameDomains`, a same-origin base without `baseUriDomains`, and never an object.
(declared-csp csp)The domains of _meta.ui.csp that the host accepts, as the same four keys. An
invalid entry is dropped, never repaired.
The domains of `_meta.ui.csp` that the host accepts, as the same four keys. An invalid entry is dropped, never repaired.
(envelope {:keys [server tool arguments result view call-id]})The app instance that one tool call opened: what a surface needs to host it.
tool is the raw MCP tool, arguments the call arguments, result the raw
CallToolResult and view the result of view-resource. The MCP values keep
their own camelCase keys, because the host hands them to the view as they are.
The app instance that one tool call opened: what a surface needs to host it. `tool` is the raw MCP tool, `arguments` the call arguments, `result` the raw CallToolResult and `view` the result of [[view-resource]]. The MCP values keep their own camelCase keys, because the host hands them to the view as they are.
The media type of the attachment that holds one app instance.
The media type of the attachment that holds one app instance.
The extension identifier in client capabilities.
The extension identifier in client capabilities.
(granted-permissions permissions)The permissions of _meta.ui.permissions that the host knows, as {name {}}.
The permissions of `_meta.ui.permissions` that the host knows, as `{name {}}`.
The media type of an MCP App view resource.
The media type of an MCP App view resource.
(model-visible? tool)True when the agent may see and call tool.
True when the agent may see and call `tool`.
The MCP Apps revision that this host speaks.
The MCP Apps revision that this host speaks.
(refuse-app-call tools tool-name)Why a view may not call tool-name of a server whose tools are tools, or nil.
A view reaches only the tools of its own server that list "app".
Why a view may not call `tool-name` of a server whose tools are `tools`, or nil. A view reaches only the tools of its own server that list "app".
(resource-uri tool)The ui:// view resource of tool, or nil. The flat key ui/resourceUri is the
deprecated spelling and still counts.
The `ui://` view resource of `tool`, or nil. The flat key `ui/resourceUri` is the deprecated spelling and still counts.
(view-resource uri result)The view of uri from the resources/read result result: {"html" "csp" "permissions" "prefers_border" "domain"}. Throws an ex-info of type
:mcp-app/invalid-resource when the result has no content for a ui:// URI,
the media type is not mime-type, or the content has no text.
The view of `uri` from the `resources/read` result `result`: `{"html"
"csp" "permissions" "prefers_border" "domain"}`. Throws an ex-info of type
`:mcp-app/invalid-resource` when the result has no content for a `ui://` URI,
the media type is not [[mime-type]], or the content has no text.(visibility tool)Who may call tool: a vector of "model" and "app". A tool without
_meta.ui.visibility is visible to both.
Who may call `tool`: a vector of "model" and "app". A tool without `_meta.ui.visibility` is visible to both.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |