Skip to content
Merged
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
51 changes: 26 additions & 25 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1171,6 +1171,30 @@
],
"type": "object"
},
"PromptEmbeddedResource": {
"description": "The contents of a resource, embedded into a prompt.\n\nIt is up to the client how best to render embedded resources for the benefit\nof the LLM and/or the user.",
"properties": {
"resource": {
"anyOf": [
{
"$ref": "#/definitions/TextResourceContents"
},
{
"$ref": "#/definitions/BlobResourceContents"
}
]
},
"type": {
"const": "resource",
"type": "string"
}
},
"required": [
"resource",
"type"
],
"type": "object"
},
"PromptListChangedNotification": {
"description": "An optional notification from the server to the client, informing it that the list of prompts it offers has changed. This may be issued by servers without any previous subscription from the client.",
"properties": {
Expand All @@ -1196,7 +1220,7 @@
"type": "object"
},
"PromptMessage": {
"description": "Describes a message returned as part of a prompt.\n\nThis is similar to `SamplingMessage`, but also supports the embedding of\nresource contents from the MCP server.",
"description": "Describes a message returned as part of a prompt.\n\nThis is similar to `SamplingMessage`, but also supports the embedding of\nresources from the MCP server.",
"properties": {
"content": {
"anyOf": [
Expand All @@ -1207,7 +1231,7 @@
"$ref": "#/definitions/ImageContent"
},
{
"$ref": "#/definitions/PromptResourceContents"
"$ref": "#/definitions/PromptEmbeddedResource"
}
]
},
Expand Down Expand Up @@ -1243,29 +1267,6 @@
],
"type": "object"
},
"PromptResourceContents": {
"description": "The contents of a resource, embedded into a prompt.\n\nIt is up to the client how best to render embedded resources for the benefit\nof the LLM and/or the user.",
"properties": {
"mimeType": {
"description": "The MIME type of this resource, if known.",
"type": "string"
},
"type": {
"const": "resource",
"type": "string"
},
"uri": {
"description": "The URI of this resource.",
"format": "uri",
"type": "string"
}
},
"required": [
"type",
"uri"
],
"type": "object"
},
"ReadResourceRequest": {
"description": "Sent from the client to the server, to read a specific resource URI.",
"properties": {
Expand Down
7 changes: 4 additions & 3 deletions schema/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,11 +558,11 @@ export interface PromptArgument {
* Describes a message returned as part of a prompt.
*
* This is similar to `SamplingMessage`, but also supports the embedding of
* resource contents from the MCP server.
* resources from the MCP server.
*/
export interface PromptMessage {
role: "user" | "assistant";
content: TextContent | ImageContent | PromptResourceContents;
content: TextContent | ImageContent | PromptEmbeddedResource;
}

/**
Expand All @@ -571,8 +571,9 @@ export interface PromptMessage {
* It is up to the client how best to render embedded resources for the benefit
* of the LLM and/or the user.
*/
export interface PromptResourceContents extends ResourceContents {
export interface PromptEmbeddedResource {
type: "resource";
resource: TextResourceContents | BlobResourceContents;
}

/**
Expand Down