Skip to content

Commit 25c127f

Browse files
authored
docs(protocol): reject unadvertised prompt content before insertion (#2601)
1 parent d9a9e2e commit 25c127f

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎docs/protocol/v2/content.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ACP's `ContentBlock` is compatible with, and a superset of, the [Model Context P
1919

2020
A content type from a later MCP revision that ACP doesn't define isn't forwarded as is. Agents convert it to a supported type, such as an embedded resource, or omit it.
2121

22-
Content block `type` values can be custom or future variants when the receiver can preserve or display them generically. Custom content block types **MUST** begin with `_`. Unknown non-underscore content block types are reserved for future ACP variants.
22+
Content block `type` values can be custom or future variants when the receiver can preserve or display them generically. Custom content block types **MUST** begin with `_`. Unknown non-underscore content block types are reserved for future ACP variants. In prompts, Clients send only content types the Agent advertised, including custom types advertised through a [custom capability](/protocol/v2/extensibility#advertising-custom-capabilities), and Agents reject others with `-32602`.
2323

2424
### Text Content
2525

‎docs/protocol/v2/draft/content.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ACP's `ContentBlock` is compatible with, and a superset of, the [Model Context P
1919

2020
A content type from a later MCP revision that ACP doesn't define isn't forwarded as is. Agents convert it to a supported type, such as an embedded resource, or omit it.
2121

22-
Content block `type` values can be custom or future variants when the receiver can preserve or display them generically. Custom content block types **MUST** begin with `_`. Unknown non-underscore content block types are reserved for future ACP variants.
22+
Content block `type` values can be custom or future variants when the receiver can preserve or display them generically. Custom content block types **MUST** begin with `_`. Unknown non-underscore content block types are reserved for future ACP variants. In prompts, Clients send only content types the Agent advertised, including custom types advertised through a [custom capability](/protocol/v2/draft/extensibility#advertising-custom-capabilities), and Agents reject others with `-32602`.
2323

2424
### Text Content
2525

‎docs/protocol/v2/draft/prompt-lifecycle.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ The Client sends a user message with `session/prompt`:
261261
<ParamField path="prompt" type="ContentBlock[]" required>
262262
The contents of the user message, e.g. text, images, files, etc.
263263

264-
Clients **MUST** restrict types of content according to the [Prompt Capabilities](/protocol/v2/draft/initialization#session-prompt-capabilities) established during [initialization](/protocol/v2/draft/initialization). Agents **MUST** reject content types they don't support with `-32602`.
264+
Clients **MUST** restrict types of content according to the [Prompt Capabilities](/protocol/v2/draft/initialization#session-prompt-capabilities) established during [initialization](/protocol/v2/draft/initialization). Agents **MUST** reject a prompt containing a content type they did not advertise or don't understand with `-32602`, without inserting it. Custom content types need a [custom capability](/protocol/v2/draft/extensibility#advertising-custom-capabilities), such as an entry in `capabilities.session.prompt._meta`.
265265

266266
<Card icon="comments" horizontal href="/protocol/v2/draft/content">
267267
Learn more about Content

‎docs/protocol/v2/prompt-lifecycle.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ The Client sends a user message with `session/prompt`:
190190
<ParamField path="prompt" type="ContentBlock[]" required>
191191
The contents of the user message, e.g. text, images, files, etc.
192192

193-
Clients **MUST** restrict types of content according to the [Prompt Capabilities](/protocol/v2/initialization#session-prompt-capabilities) established during [initialization](/protocol/v2/initialization). Agents **MUST** reject content types they don't support with `-32602`.
193+
Clients **MUST** restrict types of content according to the [Prompt Capabilities](/protocol/v2/initialization#session-prompt-capabilities) established during [initialization](/protocol/v2/initialization). Agents **MUST** reject a prompt containing a content type they did not advertise or don't understand with `-32602`, without inserting it. Custom content types need a [custom capability](/protocol/v2/extensibility#advertising-custom-capabilities), such as an entry in `capabilities.session.prompt._meta`.
194194

195195
<Card icon="comments" horizontal href="/protocol/v2/content">
196196
Learn more about Content

0 commit comments

Comments
 (0)