feat(SEP-973): add support for icons and websiteUrl across relevant types (#432)

This commit is contained in:
Alex Hancock 2025-09-11 11:49:03 -04:00 • committed by GitHub
commit b57aa47693
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 611 additions and 63 deletions

View file

@ -487,9 +487,45 @@
"name"
]
},
"Icon": {
"description": "A URL pointing to an icon resource or a base64-encoded data URI.\n\nClients that support rendering icons MUST support at least the following MIME types:\n- image/png - PNG images (safe, universal compatibility)\n- image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)\n\nClients that support rendering icons SHOULD also support:\n- image/svg+xml - SVG images (scalable but requires security precautions)\n- image/webp - WebP images (modern, efficient format)",
"type": "object",
"properties": {
"mimeType": {
"description": "Optional override if the server's MIME type is missing or generic",
"type": [
"string",
"null"
]
},
"sizes": {
"description": "Size specification (e.g., \"48x48\", \"any\" for SVG, or \"48x48 96x96\")",
"type": [
"string",
"null"
]
},
"src": {
"description": "A standard URI pointing to an icon resource",
"type": "string"
}
},
"required": [
"src"
]
},
"Implementation": {
"type": "object",
"properties": {
"icons": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"type": "string"
},
@ -501,6 +537,12 @@
},
"version": {
"type": "string"
},
"websiteUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -938,6 +980,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [

View file

@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JsonRpcMessage",
"description": "Represents any JSON-RPC message that can be sent or received.\n\nThis enum covers all possible message types in the JSON-RPC protocol:\nindividual requests/responses, notifications, batch operations, and errors.\nIt serves as the top-level message container for MCP communication.",
"description": "Represents any JSON-RPC message that can be sent or received.\n\nThis enum covers all possible message types in the JSON-RPC protocol:\nindividual requests/responses, notifications, and errors.\nIt serves as the top-level message container for MCP communication.",
"anyOf": [
{
"description": "A single request expecting a response",
@ -113,7 +113,7 @@
},
"allOf": [
{
"$ref": "#/definitions/Annotated2"
"$ref": "#/definitions/RawAudioContent"
}
],
"required": [
@ -139,31 +139,6 @@
}
]
},
"Annotated2": {
"type": "object",
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"data",
"mimeType"
]
},
"Annotations": {
"type": "object",
"properties": {
@ -327,6 +302,17 @@
"argument": {
"$ref": "#/definitions/ArgumentInfo"
},
"context": {
"description": "Optional context containing previously resolved argument values",
"anyOf": [
{
"$ref": "#/definitions/CompletionContext"
},
{
"type": "null"
}
]
},
"ref": {
"$ref": "#/definitions/Reference"
}
@ -336,6 +322,22 @@
"argument"
]
},
"CompletionContext": {
"description": "Context for completion requests providing previously resolved arguments.\n\nThis enables context-aware completion where subsequent argument completions\ncan take into account the values of previously resolved arguments.",
"type": "object",
"properties": {
"arguments": {
"description": "Previously resolved argument values that can inform completion suggestions",
"type": [
"object",
"null"
],
"additionalProperties": {
"type": "string"
}
}
}
},
"CreateElicitationResult": {
"description": "The result returned by a client in response to an elicitation request.\n\nContains the user's decision (accept/decline/cancel) and optionally their input data\nif they chose to accept the request.",
"type": "object",
@ -485,14 +487,62 @@
"name"
]
},
"Icon": {
"description": "A URL pointing to an icon resource or a base64-encoded data URI.\n\nClients that support rendering icons MUST support at least the following MIME types:\n- image/png - PNG images (safe, universal compatibility)\n- image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)\n\nClients that support rendering icons SHOULD also support:\n- image/svg+xml - SVG images (scalable but requires security precautions)\n- image/webp - WebP images (modern, efficient format)",
"type": "object",
"properties": {
"mimeType": {
"description": "Optional override if the server's MIME type is missing or generic",
"type": [
"string",
"null"
]
},
"sizes": {
"description": "Size specification (e.g., \"48x48\", \"any\" for SVG, or \"48x48 96x96\")",
"type": [
"string",
"null"
]
},
"src": {
"description": "A standard URI pointing to an icon resource",
"type": "string"
}
},
"required": [
"src"
]
},
"Implementation": {
"type": "object",
"properties": {
"icons": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
},
"websiteUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -845,6 +895,12 @@
"properties": {
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -855,6 +911,21 @@
"description": "Represents the MCP protocol version used for communication.\n\nThis ensures compatibility between clients and servers by specifying\nwhich version of the Model Context Protocol is being used.",
"type": "string"
},
"RawAudioContent": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"data",
"mimeType"
]
},
"RawEmbeddedResource": {
"type": "object",
"properties": {
@ -909,6 +980,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -929,6 +1010,13 @@
"format": "uint32",
"minimum": 0
},
"title": {
"description": "Human-readable title of the resource",
"type": [
"string",
"null"
]
},
"uri": {
"description": "URI representing the resource location (e.g., \"file:///path/to/file\" or \"str:///content\")",
"type": "string"

View file

@ -189,6 +189,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -608,9 +618,45 @@
"messages"
]
},
"Icon": {
"description": "A URL pointing to an icon resource or a base64-encoded data URI.\n\nClients that support rendering icons MUST support at least the following MIME types:\n- image/png - PNG images (safe, universal compatibility)\n- image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)\n\nClients that support rendering icons SHOULD also support:\n- image/svg+xml - SVG images (scalable but requires security precautions)\n- image/webp - WebP images (modern, efficient format)",
"type": "object",
"properties": {
"mimeType": {
"description": "Optional override if the server's MIME type is missing or generic",
"type": [
"string",
"null"
]
},
"sizes": {
"description": "Size specification (e.g., \"48x48\", \"any\" for SVG, or \"48x48 96x96\")",
"type": [
"string",
"null"
]
},
"src": {
"description": "A standard URI pointing to an icon resource",
"type": "string"
}
},
"required": [
"src"
]
},
"Implementation": {
"type": "object",
"properties": {
"icons": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"type": "string"
},
@ -622,6 +668,12 @@
},
"version": {
"type": "string"
},
"websiteUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -1136,6 +1188,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the prompt",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"description": "The name of the prompt",
"type": "string"
@ -1314,6 +1376,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -1450,6 +1522,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -1837,6 +1919,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the tool",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"inputSchema": {
"description": "A JSON Schema object defining the expected parameters for the tool",
"type": "object",

View file

@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JsonRpcMessage",
"description": "Represents any JSON-RPC message that can be sent or received.\n\nThis enum covers all possible message types in the JSON-RPC protocol:\nindividual requests/responses, notifications, batch operations, and errors.\nIt serves as the top-level message container for MCP communication.",
"description": "Represents any JSON-RPC message that can be sent or received.\n\nThis enum covers all possible message types in the JSON-RPC protocol:\nindividual requests/responses, notifications, and errors.\nIt serves as the top-level message container for MCP communication.",
"anyOf": [
{
"description": "A single request expecting a response",
@ -113,7 +113,7 @@
},
"allOf": [
{
"$ref": "#/definitions/Annotated2"
"$ref": "#/definitions/RawAudioContent"
}
],
"required": [
@ -140,31 +140,6 @@
]
},
"Annotated2": {
"type": "object",
"properties": {
"annotations": {
"anyOf": [
{
"$ref": "#/definitions/Annotations"
},
{
"type": "null"
}
]
},
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"data",
"mimeType"
]
},
"Annotated3": {
"type": "object",
"properties": {
"_meta": {
@ -193,7 +168,7 @@
"resource"
]
},
"Annotated4": {
"Annotated3": {
"description": "Represents a resource in the extension with metadata",
"type": "object",
"properties": {
@ -214,6 +189,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -234,6 +219,13 @@
"format": "uint32",
"minimum": 0
},
"title": {
"description": "Human-readable title of the resource",
"type": [
"string",
"null"
]
},
"uri": {
"description": "URI representing the resource location (e.g., \"file:///path/to/file\" or \"str:///content\")",
"type": "string"
@ -244,7 +236,7 @@
"name"
]
},
"Annotated5": {
"Annotated4": {
"type": "object",
"properties": {
"annotations": {
@ -272,6 +264,12 @@
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"uriTemplate": {
"type": "string"
}
@ -620,14 +618,62 @@
"messages"
]
},
"Icon": {
"description": "A URL pointing to an icon resource or a base64-encoded data URI.\n\nClients that support rendering icons MUST support at least the following MIME types:\n- image/png - PNG images (safe, universal compatibility)\n- image/jpeg (and image/jpg) - JPEG images (safe, universal compatibility)\n\nClients that support rendering icons SHOULD also support:\n- image/svg+xml - SVG images (scalable but requires security precautions)\n- image/webp - WebP images (modern, efficient format)",
"type": "object",
"properties": {
"mimeType": {
"description": "Optional override if the server's MIME type is missing or generic",
"type": [
"string",
"null"
]
},
"sizes": {
"description": "Size specification (e.g., \"48x48\", \"any\" for SVG, or \"48x48 96x96\")",
"type": [
"string",
"null"
]
},
"src": {
"description": "A standard URI pointing to an icon resource",
"type": "string"
}
},
"required": [
"src"
]
},
"Implementation": {
"type": "object",
"properties": {
"icons": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
},
"version": {
"type": "string"
},
"websiteUrl": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -815,7 +861,7 @@
"resourceTemplates": {
"type": "array",
"items": {
"$ref": "#/definitions/Annotated5"
"$ref": "#/definitions/Annotated4"
}
}
},
@ -835,7 +881,7 @@
"resources": {
"type": "array",
"items": {
"$ref": "#/definitions/Annotated4"
"$ref": "#/definitions/Annotated3"
}
}
},
@ -1142,9 +1188,25 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the prompt",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"name": {
"description": "The name of the prompt",
"type": "string"
},
"title": {
"type": [
"string",
"null"
]
}
},
"required": [
@ -1172,6 +1234,13 @@
"boolean",
"null"
]
},
"title": {
"description": "A human-readable title for the argument",
"type": [
"string",
"null"
]
}
},
"required": [
@ -1274,7 +1343,7 @@
"type": "object",
"properties": {
"resource": {
"$ref": "#/definitions/Annotated3"
"$ref": "#/definitions/Annotated2"
},
"type": {
"type": "string",
@ -1307,6 +1376,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -1327,6 +1406,13 @@
"format": "uint32",
"minimum": 0
},
"title": {
"description": "Human-readable title of the resource",
"type": [
"string",
"null"
]
},
"type": {
"type": "string",
"const": "resource_link"
@ -1367,6 +1453,21 @@
"description": "Represents the MCP protocol version used for communication.\n\nThis ensures compatibility between clients and servers by specifying\nwhich version of the Model Context Protocol is being used.",
"type": "string"
},
"RawAudioContent": {
"type": "object",
"properties": {
"data": {
"type": "string"
},
"mimeType": {
"type": "string"
}
},
"required": [
"data",
"mimeType"
]
},
"RawEmbeddedResource": {
"type": "object",
"properties": {
@ -1421,6 +1522,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the resource",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"mimeType": {
"description": "MIME type of the resource content (\"text\" or \"blob\")",
"type": [
@ -1441,6 +1552,13 @@
"format": "uint32",
"minimum": 0
},
"title": {
"description": "Human-readable title of the resource",
"type": [
"string",
"null"
]
},
"uri": {
"description": "URI representing the resource location (e.g., \"file:///path/to/file\" or \"str:///content\")",
"type": "string"
@ -1801,6 +1919,16 @@
"null"
]
},
"icons": {
"description": "Optional list of icons for the tool",
"type": [
"array",
"null"
],
"items": {
"$ref": "#/definitions/Icon"
}
},
"inputSchema": {
"description": "A JSON Schema object defining the expected parameters for the tool",
"type": "object",
@ -1817,6 +1945,13 @@
"null"
],
"additionalProperties": true
},
"title": {
"description": "A human-readable title for the tool",
"type": [
"string",
"null"
]
}
},
"required": [