-
Notifications
You must be signed in to change notification settings - Fork 262
Implement SEP-973 #570
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
IAmSurajBobade
wants to merge
20
commits into
modelcontextprotocol:main
Choose a base branch
from
IAmSurajBobade:issue/552
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Implement SEP-973 #570
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
2b368a3
Implement SEP-973
IAmSurajBobade 085099e
update tests
IAmSurajBobade 970671b
Merge branch 'modelcontextprotocol:main' into issue/552
IAmSurajBobade 24947b3
revert tests
IAmSurajBobade ec8b14a
add draft protocol version
IAmSurajBobade dc32c43
Add conformance test for Icon and websiteUrl metadata
IAmSurajBobade 1fb3343
update test description
IAmSurajBobade 6d6107f
Merge branch 'modelcontextprotocol:main' into issue/552
IAmSurajBobade 5092e10
address review comments
IAmSurajBobade 47f6939
add example
IAmSurajBobade 8ab66a9
update test url
IAmSurajBobade 80ef38b
clean diff
IAmSurajBobade dc75b26
update website url in test
IAmSurajBobade eb96101
Merge branch 'modelcontextprotocol:main' into issue/552
IAmSurajBobade e74e5c9
add icons to resource template and links. add theme
IAmSurajBobade 33fc556
update everything example
IAmSurajBobade b4f4f0d
support Icon marshal/unmarshal in ResourceLink
IAmSurajBobade b706c83
update conformance test with ResourceLink and Theme
IAmSurajBobade 114c59f
Merge branch 'modelcontextprotocol:main' into issue/552
IAmSurajBobade 9646ab2
address review comments
IAmSurajBobade File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -658,6 +658,23 @@ type ProgressNotificationParams struct { | |
|
|
||
| func (*ProgressNotificationParams) isParams() {} | ||
|
|
||
| // Icon provides visual identifiers for their resources, tools, prompts, and implementations | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be a single doc comment group (the newline breaks documentation).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. updated |
||
| // See [/specification/draft/basic/index#icons] for notes on icons | ||
| // | ||
| // TODO(iamsurajbobade): update specification url from draft. | ||
| type Icon struct { | ||
| // Source is A URI pointing to the icon resource (required). This can be: | ||
| // - An HTTP/HTTPS URL pointing to an image file | ||
| // - A data URI with base64-encoded image data | ||
| Source string `json:"src"` | ||
| // Optional MIME type if the server's type is missing or generic | ||
| MIMEType string `json:"mimeType,omitempty"` | ||
| // Optional size specification (e.g., ["48x48"], ["any"] for scalable formats like SVG, or ["48x48", "96x96"] for multiple sizes) | ||
| Sizes []string `json:"sizes,omitempty"` | ||
| // Optional Theme of the icon, e.g., "light" or "dark" | ||
| Theme string `json:"theme,omitempty"` | ||
| } | ||
findleyr marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| // A prompt or prompt template that the server offers. | ||
| type Prompt struct { | ||
| // See [specification/2025-06-18/basic/index#general-fields] for notes on _meta | ||
|
|
@@ -673,6 +690,8 @@ type Prompt struct { | |
| // Intended for UI and end-user contexts — optimized to be human-readable and | ||
| // easily understood, even by those unfamiliar with domain-specific terminology. | ||
| Title string `json:"title,omitempty"` | ||
| // Icons for the prompt, if any. | ||
| Icons []Icon `json:"icons,omitempty"` | ||
| } | ||
|
|
||
| // Describes an argument that a prompt can accept. | ||
|
|
@@ -782,6 +801,8 @@ type Resource struct { | |
| Title string `json:"title,omitempty"` | ||
| // The URI of this resource. | ||
| URI string `json:"uri"` | ||
| // Icons for the resource, if any. | ||
| Icons []Icon `json:"icons,omitempty"` | ||
| } | ||
|
|
||
| type ResourceListChangedParams struct { | ||
|
|
@@ -822,6 +843,8 @@ type ResourceTemplate struct { | |
| // A URI template (according to RFC 6570) that can be used to construct resource | ||
| // URIs. | ||
| URITemplate string `json:"uriTemplate"` | ||
| // Icons for the resource template, if any. | ||
| Icons []Icon `json:"icons,omitempty"` | ||
| } | ||
|
|
||
| // The sender or recipient of messages and data in a conversation. | ||
|
|
@@ -948,6 +971,8 @@ type Tool struct { | |
| // If not provided, Annotations.Title should be used for display if present, | ||
| // otherwise Name. | ||
| Title string `json:"title,omitempty"` | ||
| // Icons for the tool, if any. | ||
| Icons []Icon `json:"icons,omitempty"` | ||
| } | ||
|
|
||
| // Additional properties describing a Tool to clients. | ||
|
|
@@ -1090,6 +1115,10 @@ type Implementation struct { | |
| // easily understood, even by those unfamiliar with domain-specific terminology. | ||
| Title string `json:"title,omitempty"` | ||
| Version string `json:"version"` | ||
| // WebsiteURL for the server, if any. | ||
| WebsiteURL string `json:"websiteUrl,omitempty"` | ||
| // Icons for the Server, if any. | ||
| Icons []Icon `json:"icons,omitempty"` | ||
| } | ||
|
|
||
| // Present if the server supports argument autocompletion suggestions. | ||
|
|
||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work. I'll investigate why it doesn't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this specific issue only, I have raised #631.