McpAppView

@Composable
fun McpAppView(client: McpClient, resourceUri: String, toolCallId: String, tool: JsonObject, input: JsonObject, result: JsonObject?, actions: McpAppActions, modifier: Modifier = Modifier, sessions: McpAppSessions = rememberMcpAppSessions(), maxHeight: Dp = 600.dp, originKey: String = client.url)(source)

Shows the MCP App view resourceUri of one tool call: it reads the view from client (the connection of the server that owns it), runs it in a sandbox and connects it to the chat through actions. input is the call's arguments and result its CallToolResult once it returns.

Tools the view calls that are not read-only ask the user first; ui/request-display-mode fullscreen opens a full-screen dialog. The view lives in sessions, so it survives recomposition and scrolling. Test tags: mcp-app-<toolCallId>, mcp-app-allow / mcp-app-deny on the approval dialog; the WebView's tag is mcp-app-webview-<toolCallId>.