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
311
+
- If `ui.resourceUri` is present and host supports MCP Apps, host renders tool results using the specified UI resource
283
312
- If host does not support MCP Apps, tool behaves as standard tool (text-only fallback)
284
313
- Resource MUST exist on the server
285
-
- Host MUST use `resources/read` to fetch the referenced resource URI.
314
+
- Host MUST use `resources/read` to fetch the referenced resource URI
286
315
- Host MAY prefetch and cache UI resource content for performance optimization
287
316
- Since UI resources are primarily discovered through tool metadata, Servers MAY omit UI-only resources from `resources/list` and `notifications/resources/list_changed`
288
317
318
+
#### Visibility:
319
+
320
+
-`visibility` defaults to `["model"]` if omitted (standard MCP behavior)
321
+
-`"model"`: Tool is visible to and callable by the agent
322
+
-`"apps"`: Tool is callable by apps from the same server connection only
323
+
- Host MUST NOT include tools with `visibility: ["apps"]` in the agent's tool list
324
+
- Host MUST reject `tools/call` requests from apps for tools that don't include `"apps"` in visibility
325
+
- Cross-server tool calls are always blocked for app-only tools
326
+
289
327
#### Benefits:
290
328
291
329
-**Performance:** Host can preload templates before tool execution
@@ -846,7 +884,7 @@ sequenceDiagram
846
884
847
885
autonumber
848
886
S -->> H: resources/list (includes ui:// resources)
849
-
S -->> H: tools/list (includes tools with ui/resourceUri metadata)
887
+
S -->> H: tools/list (includes tools with _meta.ui metadata)
850
888
```
851
889
852
890
#### 2. UI Initialization (Desktop/Native Hosts)
@@ -860,7 +898,7 @@ sequenceDiagram
860
898
861
899
autonumber
862
900
par UI Tool call
863
-
H ->> S: tools/call to Tool with ui/resourceUri metadata
901
+
H ->> S: tools/call to Tool with _meta.ui metadata
864
902
and UI initialization
865
903
alt Desktop/Native hosts
866
904
H ->> H: Render Guest UI in an iframe (HTML from the ui:// resource)
This pattern enables interactive, self-updating widgets.
1048
1086
1049
-
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.
1087
+
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.
1050
1088
1051
1089
### Client\<\>Server Capability Negotiation
1052
1090
@@ -1099,7 +1137,7 @@ if (hasUISupport) {
1099
1137
description: "Get weather with interactive dashboard",
@@ -1208,6 +1246,24 @@ This proposal synthesizes feedback from the UI CWG and MCP-UI community, host im
1208
1246
-**Inline styles in tool results:** Rejected; separating theming from data enables caching and updates
1209
1247
-**CSS-in-JS injection:** Rejected; framework-specific and security concerns with injected code
1210
1248
1249
+
#### 5. Tool Visibility via Metadata
1250
+
1251
+
**Decision:** Use `_meta.ui.visibility` array to control tool accessibility between model and app.
1252
+
1253
+
**Rationale:**
1254
+
1255
+
- Nested `_meta.ui` structure groups all UI-related metadata cleanly
1256
+
- Array format (`["model", "app"]`) allows flexible combinations
1257
+
- Default `["model", "app"]` allows both agent and app to access tools
1258
+
-`"app"` scope is per-server, preventing cross-server tool calls
1259
+
- Cleaner than OpenAI's two-field approach (`widgetAccessible` + `visibility`)
1260
+
1261
+
**Alternatives considered:**
1262
+
1263
+
-**Two separate fields:** OpenAI uses `widgetAccessible` and `visibility` separately. Rejected as redundant; single `visibility` array covers all cases.
1264
+
-**Boolean `private` flag:** Simpler but less flexible; doesn't express model-only tools.
1265
+
-**Flat `ui/visibility` key:** Rejected in favor of nested structure for consistency with future `_meta.ui` fields.
1266
+
1211
1267
### Backward Compatibility
1212
1268
1213
1269
The proposal builds on the existing core protocol. There are no incompatibilities.
0 commit comments