Repository navigation
[Schema][Server][Client] Add resource template icons, completion context, content block _meta and lastModified - #765
Open
ajibarra wants to merge 4 commits into
Conversation
ResourceTemplate extends Icons since protocol revision 2025-11-25, like Resource, Tool and Prompt. The template now parses and serializes the field, and #[McpResourceTemplate] and Builder::addResourceTemplate() accept it, so resources/templates/list can carry icons. The new parameter comes last to keep positional calls working.
Since protocol revision 2025-06-18, completion/complete carries an optional context.arguments with the arguments the user already resolved for the prompt or URI template. CompletionCompleteRequest now parses and serializes it, Client::complete() can send it, and a provider that implements the new ContextAwareProviderInterface receives the arguments. Existing ProviderInterface implementations keep working unchanged.
Since protocol revision 2025-06-18, every content block can carry its own _meta. ResourceLink already had it; TextContent, ImageContent, AudioContent and EmbeddedResource now take an optional $meta, parse a _meta object and serialize it. The _meta of an EmbeddedResource is the block's own, separate from the one of its resource contents.
Annotations gained lastModified in protocol revision 2025-06-18: the moment a resource or content block was last modified, as an ISO 8601 string. Annotations now takes it as an optional third argument, parses it and serializes it, so it reaches resources, resource templates, resource links and content blocks alike.
ajibarra
requested review from
CodeWithKyrian,
Nyholm,
chr-hertel and
soyuka
as code owners
November 21, 2026 23:01
This branch has not been deployed
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.
Adds four optional fields the spec defines but the SDK did not read or write yet:
iconson resource templates,contextincompletion/complete(handed to providers that implement the newContextAwareProviderInterface),_metaon text, image, audio and embedded resource content, and thelastModifiedannotation. Each is its own commit, and every new argument is optional and comes last, so nothing existing breaks; I am happy to split them into separate PRs, or to add the context toProviderInterfaceitself as a[BC Break], if you prefer.