Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.foundation.mcp.apps

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.
raw docstring

allow-attributeclj

(allow-attribute granted)

The iframe allow value for granted (granted-permissions), or "".

The iframe `allow` value for `granted` ([[granted-permissions]]), or "".
sourceraw docstring

app-callable?clj

(app-callable? tool)

True when a view may call tool through the host.

True when a view may call `tool` through the host.
sourceraw docstring

app-method?clj

(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.
sourceraw docstring

capabilityclj

The value of capabilities.extensions["io.modelcontextprotocol/ui"].

The value of `capabilities.extensions["io.modelcontextprotocol/ui"]`.
sourceraw docstring

content-security-policyclj

(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.
sourceraw docstring

declared-cspclj

(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.
sourceraw docstring

envelopeclj

(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.
sourceraw docstring

envelope-media-typeclj

The media type of the attachment that holds one app instance.

The media type of the attachment that holds one app instance.
sourceraw docstring

extension-idclj

The extension identifier in client capabilities.

The extension identifier in client capabilities.
sourceraw docstring

granted-permissionsclj

(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 {}}`.
sourceraw docstring

mime-typeclj

The media type of an MCP App view resource.

The media type of an MCP App view resource.
sourceraw docstring

model-visible?clj

(model-visible? tool)

True when the agent may see and call tool.

True when the agent may see and call `tool`.
sourceraw docstring

protocol-versionclj

The MCP Apps revision that this host speaks.

The MCP Apps revision that this host speaks.
sourceraw docstring

refuse-app-callclj

(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".
sourceraw docstring

resource-uriclj

(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.
sourceraw docstring

view-resourceclj

(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.
sourceraw docstring

visibilityclj

(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.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close