Skip to content

Commit 8e5b641

Browse files
martinalongclaude
andcommitted
Restore McpUiAppCapabilities docs and fix display mode clause
- Restore McpUiAppCapabilities interface documentation with availableDisplayModes - Restore "View MUST check if the requested mode is in availableDisplayModes from host context" clause that was accidentally removed 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 89b4d36 commit 8e5b641

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

specification/draft/apps.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,27 @@ UI iframes can use the following subset of standard MCP protocol messages:
505505
- `ui/initialize``ui/notifications/initialized` - MCP-like handshake (replaces custom iframe-ready pattern in MCP-UI)
506506
- `ping` - Connection health check
507507

508+
### App Capabilities in `ui/initialize`
509+
510+
When the View sends an `ui/initialize` request to the Host, it MUST include its capabilities in the `appCapabilities` field:
511+
512+
```typescript
513+
interface McpUiAppCapabilities {
514+
/** Experimental features (structure TBD). */
515+
experimental?: {};
516+
/** App exposes MCP-style tools that the host can call. */
517+
tools?: {
518+
/** App supports tools/list_changed notifications. */
519+
listChanged?: boolean;
520+
};
521+
/**
522+
* Display modes the app supports. See Display Modes section for details.
523+
* @example ["inline", "fullscreen"]
524+
*/
525+
availableDisplayModes?: Array<"inline" | "fullscreen" | "pip">;
526+
}
527+
```
528+
508529
### Host Context in `McpUiInitializeResult`
509530

510531
When the View sends an `ui/initialize` request to the Host, the Host SHOULD include UI-specific context in the `McpUiInitializeResult`'s `hostContext` field:
@@ -986,7 +1007,7 @@ Host behavior:
9861007

9871008
View behavior:
9881009
* View MUST declare all display modes it supports in `appCapabilities.availableDisplayModes` during initialization.
989-
* View SHOULD check `availableDisplayModes` in host context before requesting a mode change.
1010+
* View MUST check if the requested mode is in `availableDisplayModes` from host context before requesting a mode change.
9901011
* View MUST handle the response mode differing from the requested mode.
9911012

9921013
`ui/update-model-context` - Update the model context

0 commit comments

Comments
 (0)