Skip to content

Commit c34e867

Browse files
authored
Merge branch 'main' into fix-nav-link
2 parents 8e98e65 + 51feed1 commit c34e867

File tree

6 files changed

+3287
-4
lines changed

6 files changed

+3287
-4
lines changed

docs/specification/draft/client/sampling.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ weight: 40
88
**Protocol Revision**: draft
99
{{< /callout >}}
1010

11-
The Model Context Protocol (MCP) provides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients. This flow allows clients to maintain control over model access, selection, and permissions while enabling servers to leverage AI capabilities&mdash;with no server API keys necessary. Servers can request text or image-based interactions and optionally include context from MCP servers in their prompts.
11+
The Model Context Protocol (MCP) provides a standardized way for servers to request LLM sampling ("completions" or "generations") from language models via clients. This flow allows clients to maintain control over model access, selection, and permissions while enabling servers to leverage AI capabilities&mdash;with no server API keys necessary. Servers can request text, audio, or image-based interactions and optionally include context from MCP servers in their prompts.
1212

1313
## User Interaction Model
1414

@@ -27,7 +27,7 @@ Implementations are free to expose sampling through any interface pattern that s
2727

2828
## Capabilities
2929

30-
Clients that support sampling **MUST** declare the `sampling` capability during [initialization]({{< ref "/specification/draft/basic/lifecycle#initialization" >}}):
30+
Clients that support sampling **MUST** declare the `sampling` capability during [initialization]({{< ref "../basic/lifecycle#initialization" >}}):
3131

3232
```json
3333
{
@@ -142,6 +142,16 @@ Sampling messages can contain:
142142
}
143143
```
144144

145+
#### Audio Content
146+
```json
147+
{
148+
"type": "audio",
149+
"data": "base64-encoded-audio-data",
150+
"mimeType": "audio/wav"
151+
}
152+
```
153+
154+
145155
### Model Preferences
146156

147157
Model selection in MCP requires careful abstraction since servers and clients may use different AI providers with distinct model offerings. A server cannot simply request a specific model by name since the client may not have access to that exact model or may prefer to use a different provider's equivalent model.

docs/specification/draft/server/prompts.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ Image content allows including visual information in messages:
189189
```
190190
The image data **MUST** be base64-encoded and include a valid MIME type. This enables multi-modal interactions where visual context is important.
191191

192+
#### Audio Content
193+
Audio content allows including audio information in messages:
194+
```json
195+
{
196+
"type": "audio",
197+
"data": "base64-encoded-audio-data",
198+
"mimeType": "audio/wav"
199+
}
200+
```
201+
The audio data MUST be base64-encoded and include a valid MIME type. This enables multi-modal interactions where audio context is important.
202+
192203
#### Embedded Resources
193204
Embedded resources allow referencing server-side resources directly in messages:
194205
```json

docs/specification/draft/server/tools.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,15 @@ Tool results can contain multiple content items of different types:
188188
}
189189
```
190190

191+
#### Audio Content
192+
```json
193+
{
194+
"type": "audio",
195+
"data": "base64-encoded-audio-data",
196+
"mimeType": "audio/wav"
197+
}
198+
```
199+
191200
#### Embedded Resources
192201

193202
[Resources]({{< ref "/specification/draft/server/resources" >}}) **MAY** be embedded, to provide additional context or data, behind a URI that can be subscribed to or fetched again by the client later:

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"node": ">=20"
1212
},
1313
"scripts": {
14-
"validate:schema": "tsc --noEmit schema/schema.ts",
15-
"generate:json": "typescript-json-schema --defaultNumberType integer --required schema/schema.ts \"*\" -o schema/schema.json",
14+
"validate:schema": "tsc --noEmit schema/schema.ts schema/draft/schema.ts",
15+
"generate:json": "typescript-json-schema --defaultNumberType integer --required schema/schema.ts \"*\" -o schema/schema.json && typescript-json-schema --defaultNumberType integer --required schema/draft/schema.ts \"*\" -o schema/draft/schema.json",
1616
"serve:docs": "hugo --source site/ server --logLevel debug --disableFastRender"
1717
},
1818
"devDependencies": {

0 commit comments

Comments
 (0)