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
Conflict resolution:
- src/app.ts: kept _registeredTools (#72) alongside main's fields; took
main's assertCapabilityForMethod implementation (sampling check from #530).
- src/react/useApp.tsx: took main's version (#72 doesn't touch this file;
main has #622's autoResize forwarding).
- typedoc.config.mjs: kept #72's RequestHandlerExtra in
intentionallyNotExported.
Copy file name to clipboardExpand all lines: specification/draft/apps.mdx
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -528,6 +528,10 @@ Note that `tools/call` and `tools/list` flow **bidirectionally**:
528
528
529
529
-`resources/read` - Read resource content
530
530
531
+
**Sampling:**
532
+
533
+
-`sampling/createMessage` - Request an LLM completion from the host (uses the standard MCP [`CreateMessageRequest`](https://modelcontextprotocol.io/specification/2025-11-25/client/sampling) / `CreateMessageResult` types, including SEP-1577 `tools` / `toolChoice` / `tool_use` content blocks). The host has full discretion over model selection and SHOULD apply rate limiting, cost controls, and user approval (human-in-the-loop). Apps MUST check `hostCapabilities.sampling` before sending this request, and `hostCapabilities.sampling.tools` before including `tools` in the request params.
534
+
531
535
**Notifications:**
532
536
533
537
-`notifications/message` - Log messages to host
@@ -674,6 +678,14 @@ interface HostCapabilities {
674
678
};
675
679
/** Host accepts log messages. */
676
680
logging?: {};
681
+
/**
682
+
* Host supports LLM sampling (sampling/createMessage) from the view.
683
+
* Mirrors MCP ClientCapabilities.sampling so hosts can pass it through.
684
+
*/
685
+
sampling?: {
686
+
/** Host supports tool use via `tools` and `toolChoice` params (SEP-1577). */
687
+
tools?: {};
688
+
};
677
689
/** Sandbox configuration applied by the host. */
678
690
sandbox?: {
679
691
/** Permissions granted by the host (camera, microphone, geolocation, clipboard-write). */
0 commit comments