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
Copy file name to clipboardExpand all lines: docs/api/server.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,15 @@ In this SDK the server and/or client use the experimental map for:
27
27
-`capabilities.experimental.logLevel` (client → server) — see [Logging to client](#logging-to-client) for client-selected minimum log level.
28
28
-`capabilities.experimental.resourceReadChunking` (server → client) — see [Resource read chunking (experimental)](#resource-read-chunking-experimental).
29
29
30
+
## Extensions capabilities (optional)
31
+
32
+
Clients may advertise optional extensions in the initialize request under `capabilities.extensions` (per SEP‑1724). The SDK now models these verbatim in `ClientCapabilities.extensions` so server code can detect extension support without schema loss. For MCP Apps (SEP‑1865), the extension identifier is `io.modelcontextprotocol/ui` (see `Extensions::uiExtensionId` in [include/mcp/Protocol.h](../../include/mcp/Protocol.h)).
33
+
34
+
Notes:
35
+
36
+
- Unknown extension objects are preserved as `JSONValue`s without interpretation.
37
+
- Malformed shapes (non‑object `extensions`, wrong types inside entries) are ignored safely during parsing.
- The `Tool` type supports an optional metadata field serialized as `_meta` in `tools/list` responses. This allows servers to attach arbitrary JSON metadata to tools without changing the core schema.
246
+
- Example: Linking a tool to a UI resource (MCP Apps):
247
+
248
+
```json
249
+
{
250
+
"tools": [
251
+
{
252
+
"name": "get_weather",
253
+
"description": "Get weather with interactive dashboard",
0 commit comments