Skip to content

Commit 89b4d36

Browse files
martinalongclaude
andcommitted
Address Olivier's feedback - consolidate display mode docs
- Remove separate "App Capabilities" section for availableDisplayModes - Add display mode requirements to existing ui/request-display-mode section: - Host MUST NOT switch View to mode not in appCapabilities.availableDisplayModes - Host MAY decline requests from Views that didn't declare modes - View MUST declare supported modes during initialization 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent efd3733 commit 89b4d36

1 file changed

Lines changed: 3 additions & 42 deletions

File tree

specification/draft/apps.mdx

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -505,47 +505,6 @@ 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.
523-
*
524-
* Apps declare which display modes they are designed to work with.
525-
* Hosts use this to determine which modes are available for the app.
526-
*
527-
* @example ["inline", "fullscreen"]
528-
*/
529-
availableDisplayModes?: Array<"inline" | "fullscreen" | "pip">;
530-
}
531-
```
532-
533-
#### View `availableDisplayModes`
534-
535-
The `availableDisplayModes` field allows apps to declare which display modes they support. This enables hosts to only switch to (and provide UI controls for) display mode options that the app can handle.
536-
537-
**App Behavior:**
538-
539-
- Apps SHOULD declare all display modes they are designed to support
540-
- If omitted, hosts MAY assume the app supports all modes, or only `inline`. Apps that do not specify this field may not be able to take over fullscreen automatically.
541-
- Apps MUST handle graceful degradation if placed in an unsupported mode
542-
543-
**Host Behavior:**
544-
545-
- Host SHOULD honor requests for its declared supported display modes
546-
- Host MUST reject display mode requests for modes it does not support
547-
- Host MAY include the available modes in `HostContext.availableDisplayModes`
548-
549508
### Host Context in `McpUiInitializeResult`
550509

551510
When the View sends an `ui/initialize` request to the Host, the Host SHOULD include UI-specific context in the `McpUiInitializeResult`'s `hostContext` field:
@@ -1019,12 +978,14 @@ Host behavior:
1019978
```
1020979

1021980
Host behavior:
1022-
* App MUST check if the requested mode is in `availableDisplayModes` from host context.
981+
* Host MUST NOT switch the View to a display mode that does not appear in its `appCapabilities.availableDisplayModes`, if set.
1023982
* It is up to the host whether it switches to the requested mode, but the host MUST return the resulting mode (whether updated or not) in the response.
1024983
* If the requested mode is not available, Host SHOULD return the current display mode in the response.
1025984
* Host MAY coerce modes on certain platforms (e.g., "pip" to "fullscreen" on mobile).
985+
* Host MAY decline display mode requests from Views that did not declare said modes in their capabilities.
1026986

1027987
View behavior:
988+
* View MUST declare all display modes it supports in `appCapabilities.availableDisplayModes` during initialization.
1028989
* View SHOULD check `availableDisplayModes` in host context before requesting a mode change.
1029990
* View MUST handle the response mode differing from the requested mode.
1030991

0 commit comments

Comments
 (0)