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 13 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
1 change: 1 addition & 0 deletions docs/specification/draft/basic/lifecycle.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ Key capabilities include:
| Client | `roots` | Ability to provide filesystem [roots](/specification/draft/client/roots) |
| Client | `sampling` | Support for LLM [sampling](/specification/draft/client/sampling) requests |
| Client | `elicitation` | Support for server [elicitation](/specification/draft/client/elicitation) requests |
| 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/draft/server/prompts) |
| Server | `resources` | Provides readable [resources](/specification/draft/server/resources) |
Expand Down
27 changes: 27 additions & 0 deletions schema/draft/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,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"
},
"elicitation": {
"additionalProperties": true,
"description": "Present if the client supports elicitation from the server.",
Expand Down Expand Up @@ -2319,6 +2339,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
18 changes: 18 additions & 0 deletions schema/draft/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,19 @@ export interface ClientCapabilities {
* Present if the client supports elicitation from the server.
*/
elicitation?: 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 @@ -788,6 +801,11 @@ export interface ToolAnnotations {
* Default: true
*/
openWorldHint?: boolean;

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

/**
Expand Down