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
- Change default visibility to ["model", "apps"]
- Add deprecation notice for flat ui/resourceUri format
- Add McpUiToolMeta and McpUiToolVisibility to spec.types.ts
- Improve tools/list and tools/call behavior wording
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>
Copy file name to clipboardExpand all lines: specification/draft/apps.mdx
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,11 +252,11 @@ interface McpUiToolMeta {
252
252
/** URI of UI resource for rendering tool results */
253
253
resourceUri?:string;
254
254
/**
255
-
* Who can access this tool. Default: ["model"]
255
+
* Who can access this tool. Default: ["model", "app"]
256
256
* - "model": Tool visible to and callable by the agent
257
-
* - "apps": Tool callable by ui apps from this server
257
+
* - "app": Tool callable by the app from this server only
258
258
*/
259
-
visibility?:Array<"model"|"apps">;
259
+
visibility?:Array<"model"|"app">;
260
260
}
261
261
262
262
interfaceTool {
@@ -265,10 +265,14 @@ interface Tool {
265
265
inputSchema:object;
266
266
_meta?: {
267
267
ui?:McpUiToolMeta;
268
+
/**@deprecated Use `ui.resourceUri` instead. Will be removed before GA. */
269
+
"ui/resourceUri"?:string;
268
270
};
269
271
}
270
272
```
271
273
274
+
> **Deprecation notice:** The flat `_meta["ui/resourceUri"]` format is deprecated. Use `_meta.ui.resourceUri` instead. The deprecated format will be removed before GA.
275
+
272
276
Example (tool visible to both model and apps):
273
277
274
278
```json
@@ -284,7 +288,7 @@ Example (tool visible to both model and apps):
@@ -317,11 +321,11 @@ Example (app-only tool, hidden from model):
317
321
318
322
#### Visibility:
319
323
320
-
-`visibility` defaults to `["model"]` if omitted (standard MCP behavior)
324
+
-`visibility` defaults to `["model", "app"]` if omitted
321
325
-`"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
326
+
-`"app"`: Tool is callable by the app from the same server connection only
327
+
-**tools/list behavior:**Host MUST NOT include tools in the agent's tool list when their visibility does not include `"model"` (e.g., `visibility: ["app"]`)
328
+
-**tools/call behavior:**Host MUST reject `tools/call` requests from apps for tools that don't include `"app"` in visibility
325
329
- Cross-server tool calls are always blocked for app-only tools
This pattern enables interactive, self-updating widgets.
1086
1090
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.
1091
+
Note: Tools with `visibility: ["app"]` 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.
0 commit comments