feat: Add SEP-973 icons and metadata support#912
Open
sainathreddyb wants to merge 1 commit intomodelcontextprotocol:mainfrom
Open
feat: Add SEP-973 icons and metadata support#912sainathreddyb wants to merge 1 commit intomodelcontextprotocol:mainfrom
sainathreddyb wants to merge 1 commit intomodelcontextprotocol:mainfrom
Conversation
Add Icon record and icons field to Implementation, Resource, ResourceTemplate, Prompt, and Tool records per SEP-973. Add websiteUrl and description fields to Implementation. All fields are optional and backward compatible. Existing constructors and builders continue to work unchanged. Icon.src is validated as required per the spec. Includes serialization, deserialization, round-trip, and backward compatibility tests for all modified records. Closes modelcontextprotocol#694
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Icon record and icons field to Implementation, Resource, ResourceTemplate, Prompt, and Tool records per SEP-973. Add websiteUrl and description fields to Implementation.
All fields are optional and backward compatible. Existing constructors and builders continue to work unchanged. Icon.src is validated as required per the spec.
Includes serialization, deserialization, round-trip, and backward compatibility tests for all modified records.
Closes #694
Motivation and Context
SEP-973 adds visual metadata (icons, website URLs) to MCP protocol types so that client UIs can display icons next to tools, resources, prompts, and server implementations. This is already implemented in the TypeScript SDK and Python SDK. The Java SDK is the remaining SDK without this support.
How Has This Been Tested?
srcvalidation, and backward compatibility./mvnw clean test)Breaking Changes
None. All new fields are optional and default to null. Existing code compiles and runs without modification.
Types of changes
Checklist
Additional context
IconSchema/IconsSchemaapproach (commit856d9ec)Icon.srcis validated as non-empty in the compact constructor, consistent with howResource.uriandResource.nameare validated in their builder@JsonIgnoreProperties(ignoreUnknown = true)onIconensures forward compatibility if the spec adds more fields later