Skip to content

Commit 445a75d

Browse files
authored
docs(schema): put the text-content Markdown rule on the content page (#2562)
1 parent 8e3ad97 commit 445a75d

10 files changed

Lines changed: 13 additions & 9 deletions

File tree

‎agent-client-protocol-schema/src/v2/content.rs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ pub enum ContentBlock {
8989
/// Text content. May be plain text or formatted with Markdown.
9090
///
9191
/// All agents MUST support text content blocks in prompts.
92-
/// Clients SHOULD render this text as Markdown.
92+
/// Clients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown
93+
/// extensions.
9394
Text(TextContent),
9495
/// Images for visual context or analysis.
9596
///

‎clippy.toml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ allowed-duplicate-crates = [
44
"schemars",
55
"syn",
66
]
7+
doc-valid-idents = ["CommonMark", ".."]

‎docs/protocol/v1/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
### Text Content
2121

22-
Plain text messages form the foundation of most interactions.
22+
Text may be plain text or Markdown. Clients **SHOULD** render it as Markdown. See [Rendering Agent Content](/protocol/v1/security#rendering-agent-content) for raw HTML.
2323

2424
```json
2525
{

‎docs/protocol/v1/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
### Text Content
2121

22-
Plain text messages form the foundation of most interactions.
22+
Text may be plain text or Markdown. Clients **SHOULD** render it as Markdown. See [Rendering Agent Content](/protocol/v1/draft/security#rendering-agent-content) for raw HTML.
2323

2424
```json
2525
{

‎docs/protocol/v2/content.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Content block `type` values can be custom or future variants when the receiver c
2323

2424
### Text Content
2525

26-
Plain text messages form the foundation of most interactions.
26+
Text may be plain text or Markdown. Clients **SHOULD** render it as [CommonMark](https://spec.commonmark.org/), and **MAY** support [GitHub Flavored Markdown](https://github.github.com/gfm/) extensions such as tables. This applies wherever a text block appears, including user messages, thoughts, and tool-call content. See [Rendering Agent Content](/protocol/v2/security#rendering-agent-content) for raw HTML.
2727

2828
```json
2929
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Content block `type` values can be custom or future variants when the receiver c
2323

2424
### Text Content
2525

26-
Plain text messages form the foundation of most interactions.
26+
Text may be plain text or Markdown. Clients **SHOULD** render it as [CommonMark](https://spec.commonmark.org/), and **MAY** support [GitHub Flavored Markdown](https://github.github.com/gfm/) extensions such as tables. This applies wherever a text block appears, including user messages, thoughts, and tool-call content. See [Rendering Agent Content](/protocol/v2/draft/security#rendering-agent-content) for raw HTML.
2727

2828
```json
2929
{

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2737,7 +2737,8 @@ See protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/draft/c
27372737
Text content. May be plain text or formatted with Markdown.
27382738

27392739
All agents MUST support text content blocks in prompts.
2740-
Clients SHOULD render this text as Markdown.
2740+
Clients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown
2741+
extensions.
27412742

27422743
<Expandable title="Properties">
27432744

‎docs/protocol/v2/schema.mdx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2272,7 +2272,8 @@ See protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/content
22722272
Text content. May be plain text or formatted with Markdown.
22732273

22742274
All agents MUST support text content blocks in prompts.
2275-
Clients SHOULD render this text as Markdown.
2275+
Clients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown
2276+
extensions.
22762277

22772278
<Expandable title="Properties">
22782279

‎schema/v2/schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -966,7 +966,7 @@
966966
"description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output reported through `session/update` notifications as\n message updates or streamed chunks\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/content)",
967967
"anyOf": [
968968
{
969-
"description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.",
969+
"description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown\nextensions.",
970970
"type": "object",
971971
"properties": {
972972
"type": {

‎schema/v2/schema.unstable.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@
10201020
"description": "Content blocks represent displayable information in the Agent Client Protocol.\n\nThey provide a structured way to handle various types of user-facing content—whether\nit's text from language models, images for analysis, or embedded resources for context.\n\nContent blocks appear in:\n- User prompts sent via `session/prompt`\n- Language model output reported through `session/update` notifications as\n message updates or streamed chunks\n- Progress updates and results from tool calls\n\nThis structure is compatible with the Model Context Protocol (MCP), enabling\nagents to seamlessly forward content from MCP tool outputs without transformation.\n\nSee protocol docs: [Content](https://agentclientprotocol.com/protocol/v2/draft/content)",
10211021
"anyOf": [
10221022
{
1023-
"description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as Markdown.",
1023+
"description": "Text content. May be plain text or formatted with Markdown.\n\nAll agents MUST support text content blocks in prompts.\nClients SHOULD render this text as CommonMark and MAY support GitHub Flavored Markdown\nextensions.",
10241024
"type": "object",
10251025
"properties": {
10261026
"type": {

0 commit comments

Comments
 (0)