Skip to content

RFC: Client / Server Content capabilities #223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
1 change: 1 addition & 0 deletions docs/docs/concepts/tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,7 @@ The MCP specification defines the following annotations for tools:
| `destructiveHint` | boolean | true | If true, the tool may perform destructive updates (only meaningful when `readOnlyHint` is false) |
| `idempotentHint` | boolean | false | If true, calling the tool repeatedly with the same arguments has no additional effect (only meaningful when `readOnlyHint` is false) |
| `openWorldHint` | boolean | true | If true, the tool may interact with an "open world" of external entities |
| `generatesHint` | string[] | None | If present, provides non-exhaustive list of MIME types this Tool may generate in a `CallToolResult`. |

### Example usage

Expand Down
9 changes: 5 additions & 4 deletions docs/specification/2025-03-26/basic/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -144,16 +144,17 @@ available during the session.

Key capabilities include:

| Category | Capability | Description |
| -------- | -------------- | -------------------------------------------------------------------------- |
| Category | Capability | Description |
| -------- | -------------- | ----------------------------------------------------------------------------------- |
| Client | `roots` | Ability to provide filesystem [roots](/specification/2025-03-26/client/roots) |
| Client | `sampling` | Support for LLM [sampling](/specification/2025-03-26/client/sampling) requests |
| Client | `experimental` | Describes support for non-standard experimental features |
| Client | `contentTypes` | Describes content types the Host can show the User, or tokenize for the LLM |
| Client | `experimental` | Describes support for non-standard experimental features |
| Server | `prompts` | Offers [prompt templates](/specification/2025-03-26/server/prompts) |
| Server | `resources` | Provides readable [resources](/specification/2025-03-26/server/resources) |
| Server | `tools` | Exposes callable [tools](/specification/2025-03-26/server/tools) |
| Server | `logging` | Emits structured [log messages](/specification/2025-03-26/server/utilities/logging) |
| Server | `experimental` | Describes support for non-standard experimental features |
| Server | `experimental` | Describes support for non-standard experimental features |

Capability objects can describe sub-capabilities like:

Expand Down
27 changes: 27 additions & 0 deletions schema/2025-03-26/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,26 @@
"ClientCapabilities": {
"description": "Capabilities a client may support. Known capabilities are defined here, in this schema, but this is not a closed set: any client can define its own, additional capabilities.",
"properties": {
"contentTypes": {
"description": "Present if the client advertises content types it can handle.",
"properties": {
"renders": {
"description": "Optional non-exclusive List of MIME types that the client can render to Users.",
"items": {
"type": "string"
},
"type": "array"
},
"tokenizes": {
"description": "Optional non-exclusive list of MIME types that the client can tokenize for the LLM.",
"items": {
"type": "string"
},
"type": "array"
}
},
"type": "object"
},
"experimental": {
"additionalProperties": {
"additionalProperties": true,
Expand Down Expand Up @@ -2064,6 +2084,13 @@
"description": "If true, the tool may perform destructive updates to its environment.\nIf false, the tool performs only additive updates.\n\n(This property is meaningful only when `readOnlyHint == false`)\n\nDefault: true",
"type": "boolean"
},
"generatesHint": {
"description": "Optional list of MIME types that this Tool may produce in a CallToolResult.",
"items": {
"type": "string"
},
"type": "array"
},
"idempotentHint": {
"description": "If true, calling the tool repeatedly with the same arguments\nwill have no additional effect on the its environment.\n\n(This property is meaningful only when `readOnlyHint == false`)\n\nDefault: false",
"type": "boolean"
Expand Down
20 changes: 20 additions & 0 deletions schema/2025-03-26/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ export interface ClientCapabilities {
* Present if the client supports sampling from an LLM.
*/
sampling?: object;
/**
* Present if the client advertises content types it can handle.
*/
contentTypes?: {
/**
* Optional non-exclusive List of MIME types that the client can render to Users.
*/
renders?: string[];
/**
* Optional non-exclusive list of MIME types that the client can tokenize for the LLM.
*/
tokenizes?: string[];
};
}

/**
Expand Down Expand Up @@ -269,6 +282,7 @@ export interface ServerCapabilities {
*/
listChanged?: boolean;
};

}

/**
Expand Down Expand Up @@ -776,6 +790,12 @@ export interface ToolAnnotations {
* Default: true
*/
openWorldHint?: boolean;


/**
* Optional list of MIME types that this Tool may produce in a CallToolResult.
*/
generatesHint?: string[];
}

/**
Expand Down