
Tool Rename Deprecation
OfficialFreeMaintain backward compatibility during tool renaming.
Free · Opens the source repo
What Tool Rename Deprecation does
The Tool Rename Deprecation skill is designed to ensure that when built-in tools or tool sets are renamed, their old names are preserved in a legacy array. This is crucial for maintaining backward compatibility, as many existing configurations, prompt files, and saved references rely on the previous names. By running this skill whenever there is a change to tool registration code, developers can avoid breaking existing functionality and ensure a seamless transition to new tool names.
This skill operates by guiding users through a structured process. First, it helps identify whether the change pertains to a tool or a tool set, and clarifies the registration context. It emphasizes the importance of adding the old name to the appropriate legacy array, ensuring that all references to the tool or tool set remain valid. The skill provides specific code examples for both TypeScript-registered tools and extension-contributed tools, illustrating how to correctly implement the necessary changes without disrupting existing functionality.
Moreover, the skill outlines a comprehensive procedure to verify that all consumers of tool names respect the legacy names. This includes checks for prompt files, tool enablement, and auto-approval configurations, ensuring that all aspects of the system acknowledge the old names. By following these guidelines, developers can prevent regressions and maintain a stable environment for users who may still rely on the legacy names.
In summary, the Tool Rename Deprecation skill is an essential tool for developers working with tool registration in environments where backward compatibility is critical. By adhering to the outlined procedures, developers can confidently implement changes while safeguarding existing user configurations and references.
When to use it
Use this skill whenever you rename a tool or tool set, or modify tool registration code to ensure backward compatibility.
When not to use it
This skill is not necessary if you are not changing any tool names or if the tools do not have existing references that need to be preserved.
What you can build with it
Renaming a Tool
When renaming a tool's `toolReferenceName`, use this skill to ensure the old name is added to the legacy array.
Modifying Tool Registration
If you're making changes to tool registration code, run this skill to avoid breaking existing tool references.
Reviewing a Pull Request
Use this skill to verify that no legacy names have been dropped in a PR that modifies tool registration.
How to install Tool Rename Deprecation
View source1. Install with the skills CLI
npx skills add microsoft/vscode/tool-rename-deprecation --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by microsoftTool Rename Deprecation
When a tool or tool set reference name is changed, the old name must always be added to the deprecated/legacy array so that existing prompt files, tool configurations, and saved references continue to resolve correctly.
When to Use
Run this skill on any change to built-in tool or tool set registration code to catch regressions:
- Renaming a tool's
toolReferenceName - Renaming a tool set's
referenceName - Moving a tool from one tool set to another (the old
toolSet/toolNamepath becomes a legacy name) - Reviewing a PR that modifies tool registration — verify no legacy names were dropped
Procedure
Step 1 — Identify What Changed
Determine whether you are renaming a tool or a tool set, and where it is registered:
| Entity | Registration | Name field to rename | Legacy array | Stable ID (NEVER change) |
|---|---|---|---|---|
Tool (IToolData) | TypeScript | toolReferenceName | legacyToolReferenceFullNames | id |
| Tool (extension) | package.json languageModelTools | toolReferenceName | legacyToolReferenceFullNames | name (becomes id) |
Tool set (IToolSet) | TypeScript | referenceName | legacyFullNames | id |
| Tool set (extension) | package.json languageModelToolSets | name or referenceName | legacyFullNames | — |
Critical: For extension-contributed tools, the name field in package.json is mapped to id on IToolData (see languageModelToolsContribution.ts line id: rawTool.name). It is also used for activation events (onLanguageModelTool:<name>). Never rename the name field — only rename toolReferenceName.
Step 2 — Add the Old Name to the Legacy Array
Verify the old toolReferenceName value appears in legacyToolReferenceFullNames. Don't assume it's already there — check the actual array contents. If the old name is already listed (e.g., from a previous rename), confirm it wasn't removed. If it's not there, add it.
For internal/built-in tools (TypeScript IToolData):
// Before rename
export const MyToolData: IToolData = {
id: 'myExtension.myTool',
toolReferenceName: 'oldName',
// ...
};
// After rename — old name preserved
export const MyToolData: IToolData = {
id: 'myExtension.myTool',
toolReferenceName: 'newName',
legacyToolReferenceFullNames: ['oldName'],
// ...
};
If the tool previously lived inside a tool set, use the full toolSet/toolName form:
legacyToolReferenceFullNames: ['oldToolSet/oldToolName'],
If renaming multiple times, accumulate all prior names — never remove existing entries:
legacyToolReferenceFullNames: ['firstOldName', 'secondOldName'],
For tool sets, add the old name to the legacyFullNames option when calling createToolSet:
toolsService.createToolSet(source, id, 'newSetName', {
legacyFullNames: ['oldSetName'],
});
For extension-contributed tools (package.json), rename only toolReferenceName and add the old value to legacyToolReferenceFullNames. Do NOT rename the name field:
// CORRECT — only toolReferenceName changes, name stays stable
{
"name": "copilot_myTool", // ← KEEP this unchanged
"toolReferenceName": "newName", // ← renamed
"legacyToolReferenceFullNames": [
"oldName" // ← old toolReferenceName preserved
]
}
Step 3 — Check All Consumers of Tool Names
Legacy names must be respected everywhere a tool is looked up by reference name, not just in prompt resolution. Key consumers:
- Prompt files —
getDeprecatedFullReferenceNames()maps old → current names for.prompt.mdvalidation and code actions - Tool enablement —
getToolAliases()/getToolSetAliases()yield legacy names so tool picker and enablement maps resolve them - Auto-approval config —
isToolEligibleForAutoApproval()checkslegacyToolReferenceFullNames(including the segment after/for namespaced legacy names) againstchat.tools.eligibleForAutoApprovalsettings - RunInTerminalTool — has its own local auto-approval check that also iterates
LEGACY_TOOL_REFERENCE_FULL_NAMES
After renaming, confirm:
#oldNamein a.prompt.mdfile still resolves (shows no validation error)- Tool configurations referencing the old name still activate the tool
- A user who had
"chat.tools.eligibleForAutoApproval": { "oldName": false }still has that restriction honored
Step 4 — Update References (Optional)
While legacy names ensure backward compatibility, update first-party references to use the new name:
- System prompts and built-in
.prompt.mdfiles - Documentation and model descriptions that mention the tool by reference name
- Test files that reference the old name directly
Key Files
| File | What it contains |
|---|---|
src/vs/workbench/contrib/chat/common/tools/languageModelToolsService.ts | IToolData and IToolSet interfaces with legacy name fields |
src/vs/workbench/contrib/chat/browser/tools/languageModelToolsService.ts | Resolution logic: getToolAliases, getToolSetAliases, getDeprecatedFullReferenceNames, isToolEligibleForAutoApproval |
src/vs/workbench/contrib/chat/common/tools/languageModelToolsContribution.ts | Extension point schema, validation, and the critical id: rawTool.name mapping (line ~274) |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts | Example of a tool with its own local auto-approval check against legacy names |
Real Examples
runInTerminaltool: renamed fromrunCommands/runInTerminal→legacyToolReferenceFullNames: ['runCommands/runInTerminal']todotool: renamed fromtodos→legacyToolReferenceFullNames: ['todos']getTaskOutputtool: renamed fromrunTasks/getTaskOutput→legacyToolReferenceFullNames: ['runTasks/getTaskOutput']
Reference PRs
- #277047 — Design PR: Introduced
legacyToolReferenceFullNamesandlegacyFullNames, built the resolution infrastructure, and performed the first batch of tool renames. Use as a template for how to properly rename with legacy names. - #278506 — Consumer-side fix: After the renames in #277047, the
eligibleForAutoApprovalsetting wasn't checking legacy names — users who had restricted the old name lost that restriction. Shows why all consumers of tool reference names must account for legacy names. - vscode-copilot-chat#3810 — Example of a miss: Renamed
openSimpleBrowser→openIntegratedBrowserbut also changed thenamefield (stable id) fromcopilot_openSimpleBrowser→copilot_openIntegratedBrowser. ThetoolReferenceNamebackward compat only worked by coincidence (the old name happened to already be in the legacy array from a prior change — it was not intentionally added as part of this rename).
Regression Check
Run this check on any PR that touches tool registration (TypeScript IToolData, createToolSet, or package.json languageModelTools/languageModelToolSets):
- Search the diff for changed
toolReferenceNameorreferenceNamevalues. For each change, confirm the previous value now appears inlegacyToolReferenceFullNamesorlegacyFullNames. Don't assume it was already there — read the actual array. - Search the diff for changed
namefields on extension-contributed tools. Thenamefield is the tool's stableid— it must never change. If it changed, flag it as a bug. (This breaks activation events, tool invocations by id, and any code referencing the tool by itsname.) - Verify no entries were removed from existing legacy arrays.
- If a tool moved between tool sets, confirm the old
toolSet/toolNamefull path is in the legacy array. - Check tool set membership lists (the
toolsarray inlanguageModelToolSetscontributions). If a tool'stoolReferenceNamechanged, any tool settoolsarray referencing the old name should be updated — but the legacy resolution system handles this, so the old name still works.
Anti-patterns
- Changing the
namefield on extension-contributed tools — thenameinpackage.jsonbecomes theidonIToolData(viaid: rawTool.nameinlanguageModelToolsContribution.ts). Changing it breaks activation events (onLanguageModelTool:<name>), any code referencing the tool by id, and tool invocations. Only renametoolReferenceName, nevername. (See vscode-copilot-chat#3810 where bothnameandtoolReferenceNamewere changed.) - Changing the
idfield on TypeScript-registered tools — same principle as above. Theidis a stable internal identifier and must never change. - Assuming the old name is already in the legacy array — always verify by reading the actual
legacyToolReferenceFullNamescontents, not just checking that the field exists. A legacy array might list names from an even older rename but not the current one being changed. - Removing an old name from the legacy array — breaks existing saved prompts and user configurations.
- Forgetting to add the legacy name entirely — prompt files and tool configs silently stop resolving.
- Only updating prompt resolution but not other consumers — auto-approval settings, tool enablement maps, and individual tool checks (like
RunInTerminalTool) all need to respect legacy names (see #278506).
Frequently asked questions about Tool Rename Deprecation
Similar skills
Quality Playbook Generator
Run comprehensive quality audits on any codebase.
PR Draft Summary
Automate PR summary generation for openai-agents-python.
Final Release Review
Streamline your release candidate audits with ease.
Unit Test Vue Pinia
Efficiently write and review unit tests for Vue 3 applications.
Slang Shader Expert
Optimize and integrate Slang shaders with ease.
Telemetry Standards
Ensure consistent event tracking in Supabase Studio.
