You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- If `ui/resourceUri` is present and host supports MCP Apps, host renders tool results using the specified UI resource
307
+
- If `ui.resourceUri` is present and host supports MCP Apps, host renders tool results using the specified UI resource
279
308
- If host does not support MCP Apps, tool behaves as standard tool (text-only fallback)
280
309
- Resource MUST exist on the server
281
-
- Host MUST use `resources/read` to fetch the referenced resource URI.
310
+
- Host MUST use `resources/read` to fetch the referenced resource URI
282
311
- Host MAY prefetch and cache UI resource content for performance optimization
283
312
- Since UI resources are primarily discovered through tool metadata, Servers MAY omit UI-only resources from `resources/list` and `notifications/resources/list_changed`
284
313
314
+
#### Visibility:
315
+
316
+
-`visibility` defaults to `["model"]` if omitted (standard MCP behavior)
317
+
-`"model"`: Tool is visible to and callable by the agent
318
+
-`"apps"`: Tool is callable by apps from the same server connection only
319
+
- Host MUST NOT include tools with `visibility: ["apps"]` in the agent's tool list
320
+
- Host MUST reject `tools/call` requests from apps for tools that don't include `"apps"` in visibility
321
+
- Cross-server tool calls are always blocked for app-only tools
322
+
285
323
#### Benefits:
286
324
287
325
-**Performance:** Host can preload templates before tool execution
@@ -702,7 +740,7 @@ sequenceDiagram
702
740
703
741
autonumber
704
742
S -->> H: resources/list (includes ui:// resources)
705
-
S -->> H: tools/list (includes tools with ui/resourceUri metadata)
743
+
S -->> H: tools/list (includes tools with _meta.ui metadata)
706
744
```
707
745
708
746
#### 2. UI Initialization (Desktop/Native Hosts)
@@ -716,7 +754,7 @@ sequenceDiagram
716
754
717
755
autonumber
718
756
par UI Tool call
719
-
H ->> S: tools/call to Tool with ui/resourceUri metadata
757
+
H ->> S: tools/call to Tool with _meta.ui metadata
720
758
and UI initialization
721
759
alt Desktop/Native hosts
722
760
H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource)
This pattern enables interactive, self-updating widgets.
904
942
905
-
Note: The called tool may not appear in `tools/list` responses. MCP servers MAY expose private tools specifically designed for UI interaction that are not visible to the agent. UI implementations SHOULD attempt to call tools by name regardless of discoverability. The specification for Private Tools will be covered in a future SEP.
943
+
Note: Tools with `visibility: ["apps"]` are hidden from the agent but remain callable by apps via `tools/call`. This enables UI-only interactions (refresh buttons, form submissions) without exposing implementation details to the model. See the Visibility section under Resource Discovery for details.
906
944
907
945
### Client\<\>Server Capability Negotiation
908
946
@@ -955,7 +993,7 @@ if (hasUISupport) {
955
993
description: "Get weather with interactive dashboard",
@@ -1046,6 +1084,24 @@ This proposal synthesizes feedback from the UI CWG and MCP-UI community, host im
1046
1084
-**Include external URLs in MVP:** This is one of the easiest content types for servers to adopt, as it's possible to embed regular apps. However, it was deferred due to concerns around model visibility, inability to screenshot content, and review process.
1047
1085
-**Support multiple content types:** Deferred to maintain a lean MVP.
1048
1086
1087
+
#### 4. Tool Visibility via Metadata
1088
+
1089
+
**Decision:** Use `_meta.ui.visibility` array to control tool accessibility between model and apps.
1090
+
1091
+
**Rationale:**
1092
+
1093
+
- Nested `_meta.ui` structure groups all UI-related metadata cleanly
1094
+
- Array format (`["model", "apps"]`) allows flexible combinations
1095
+
- Default `["model"]` preserves standard MCP behavior for existing tools
1096
+
-`"apps"` scope is per-server, preventing cross-server tool calls
1097
+
- Cleaner than OpenAI's two-field approach (`widgetAccessible` + `visibility`)
1098
+
1099
+
**Alternatives considered:**
1100
+
1101
+
-**Two separate fields:** OpenAI uses `widgetAccessible` and `visibility` separately. Rejected as redundant; single `visibility` array covers all cases.
1102
+
-**Boolean `private` flag:** Simpler but less flexible; doesn't express model-only tools.
1103
+
-**Flat `ui/visibility` key:** Rejected in favor of nested structure for consistency with future `_meta.ui` fields.
1104
+
1049
1105
### Backward Compatibility
1050
1106
1051
1107
The proposal builds on the existing core protocol. There are no incompatibilities.
0 commit comments