Support qualified tool names in user tool sets#320265
Open
Copilot wants to merge 3 commits into
Open
Conversation
Co-authored-by: jamesmontemagno <1676321+jamesmontemagno@users.noreply.github.com>
Co-authored-by: jamesmontemagno <1676321+jamesmontemagno@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add support for qualified names in tool sets
Support qualified tool names in user tool sets
Jun 6, 2026
jamesmontemagno
approved these changes
Jun 6, 2026
Member
jamesmontemagno
left a comment
There was a problem hiding this comment.
Tested and working for me here
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes user tool sets (*.toolsets.jsonc) dropping tools/tool sets referenced via qualified “full reference names” by switching resolution and schema completions to use ILanguageModelToolsService.getToolByFullReferenceName(...) / getFullReferenceName(...), aligning tool set configuration with prompt/tool referencing semantics.
Changes:
- Update tool set member resolution to prefer full-reference-name lookup (qualified + aliases), with legacy unqualified fallback.
- Update the toolsets JSON schema enum values to emit full reference names for tools and tool sets.
- Widen
getFullReferenceName(...)to acceptIToolData | IToolSet, and add a round-trip test for qualified names.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/test/common/tools/mockLanguageModelToolsService.ts | Updates mock interface signature for getFullReferenceName to accept tools and tool sets. |
| src/vs/workbench/contrib/chat/test/browser/tools/languageModelToolsService.test.ts | Adds test coverage for qualified full-reference-name round-tripping for tools and tool sets. |
| src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts | Widens the ILanguageModelToolsService.getFullReferenceName interface signature to include IToolSet. |
| src/vs/workbench/contrib/chat/browser/tools/toolSetsContribution.ts | Uses full reference names in schema completions and resolves tool set members via full reference name first, with legacy fallback. |
Copilot's findings
- Files reviewed: 4/4 changed files
- Comments generated: 0
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.
Description
User tool sets (
*.toolsets.jsonc) resolvedtoolsentries only by unqualified reference name. Tools referenced in prompts/chat-modes by qualified names —vscode/memory,github/*,execute/runInTerminal— never matched, so MCP (github, azure) and built-in tool-set members were silently dropped.{ "CurrentTools": { "tools": ["vscode/memory", "execute/runInTerminal", "read/readFile", "github/*"], "description": "Slim tools", "icon": "tools" } }Resolution now flows through full reference names, which is how tools are referenced everywhere else.
Changes
toolSetsContribution.ts): resolve eachtoolsentry viagetToolByFullReferenceNamefirst — handles qualified names and their unqualified aliases — then fall back to the legacygetToolByName/getToolSetByNamelookups for backward compatibility.enumfrom qualified full reference names (getFullReferenceName) so autocomplete in the toolsets file matches prompt referencing.getFullReferenceNameto acceptIToolData | IToolSet(implementation already supported it); update the mock accordingly.languageModelToolsService.test.ts.