Skip to content

Commit 5854842

Browse files
dsp-antclaude
andauthored
Change Icon.sizes from string to string array (modelcontextprotocol#1531)
* Add SDK Support Tiers section to priority areas Introduces standardized tiering system for MCP SDKs based on: - Specification compliance - Maintenance quality - Update frequency Defines three tiers to help developers choose appropriate SDKs and provide clear improvement pathways for maintainers. * Change Icon.sizes from string to string array The Icon.sizes field was previously defined as a space-separated string (e.g., "48x48 96x96"), which was ambiguous and error-prone to parse. Changed to string[] format (e.g., ["48x48", "96x96"]) for clarity and consistency. Each size is now a discrete array element, making it easier to iterate over and validate individual size specifications. This maintains compatibility with the "any" keyword for scalable formats while providing a cleaner, more structured representation. Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent e550ed2 commit 5854842

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

docs/specification/draft/basic/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ Icons are represented as an array of `Icon` objects, where each icon includes:
158158
- An HTTP/HTTPS URL pointing to an image file
159159
- A data URI with base64-encoded image data
160160
- `mimeType`: Optional MIME type if the server's type is missing or generic
161-
- `sizes`: Optional size specification (e.g., "48x48", "any" for scalable formats like SVG, or "48x48 96x96" for multiple sizes)
161+
- `sizes`: Optional array of size specifications (e.g., `["48x48"]`, `["any"]` for scalable formats like SVG, or `["48x48", "96x96"]` for multiple sizes)
162162

163163
**Required MIME type support:**
164164

docs/specification/draft/basic/lifecycle.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The client **MUST** initiate this phase by sending an `initialize` request conta
7474
{
7575
"src": "https://example.com/icon.png",
7676
"mimeType": "image/png",
77-
"sizes": "48x48"
77+
"sizes": ["48x48"]
7878
}
7979
],
8080
"websiteUrl": "https://example.com"
@@ -112,7 +112,7 @@ The server **MUST** respond with its own capabilities and information:
112112
{
113113
"src": "https://example.com/server-icon.svg",
114114
"mimeType": "image/svg+xml",
115-
"sizes": "any"
115+
"sizes": ["any"]
116116
}
117117
],
118118
"websiteUrl": "https://example.com/server"

docs/specification/draft/schema.mdx

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/specification/draft/server/prompts.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ supports [pagination](/specification/draft/server/utilities/pagination).
8888
{
8989
"src": "https://example.com/review-icon.svg",
9090
"mimeType": "image/svg+xml",
91-
"sizes": "any"
91+
"sizes": ["any"]
9292
}
9393
]
9494
}

docs/specification/draft/server/resources.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ supports [pagination](/specification/draft/server/utilities/pagination).
120120
{
121121
"src": "https://example.com/rust-file-icon.png",
122122
"mimeType": "image/png",
123-
"sizes": "48x48"
123+
"sizes": ["48x48"]
124124
}
125125
]
126126
}

docs/specification/draft/server/tools.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ To discover available tools, clients send a `tools/list` request. This operation
9898
{
9999
"src": "https://example.com/weather-icon.png",
100100
"mimeType": "image/png",
101-
"sizes": "48x48"
101+
"sizes": ["48x48"]
102102
}
103103
]
104104
}

schema/draft/schema.json

Lines changed: 5 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

schema/draft/schema.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,12 +313,12 @@ export interface Icon {
313313
mimeType?: string;
314314

315315
/**
316-
* Optional string that specifies one or more sizes at which the icon can be used.
317-
* For example: `"48x48"`, `"48x48 96x96"`, or `"any"` for scalable formats like SVG.
316+
* Optional array of strings that specify sizes at which the icon can be used.
317+
* Each string should be in WxH format (e.g., `"48x48"`, `"96x96"`) or `"any"` for scalable formats like SVG.
318318
*
319319
* If not provided, the client should assume that the icon can be used at any size.
320320
*/
321-
sizes?: string;
321+
sizes?: string[];
322322
}
323323

324324
/**

0 commit comments

Comments
 (0)