Skip to content

[Server] Complete the resource template a completion reference names - #738

Open
skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:completion-resource-template-ref
Open

skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:completion-resource-template-ref

Conversation

@skybleak333

Copy link
Copy Markdown
Contributor

Clients reference a resource template in completion/complete by its URI template ({"type": "ref/resource", "uri": "file:///{path}"} in the spec), but the handler matched that string with getResource(), so another template whose pattern also matches it answered instead: with weather://{city} registered first, completing country of weather://{city},{country} returned nothing. A URI with { is now looked up as a template first, a concrete URI still goes through getResource().

Found, fixed and written up with Claude Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant