Skip to content

Commit 32aa753

Browse files
authored
Merge pull request #675 from rajbos/copilot/add-friendly-names-for-tools
Add missing friendly display names for 13 tools (Claude/MCP variants)
2 parents 5bf78be + e9bdbce commit 32aa753

4 files changed

Lines changed: 33 additions & 2 deletions

File tree

.github/agents/tool-names.agent.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ When adding a new tool to `toolNames.json`, also determine if it belongs in `aut
124124
- The file is a plain JSON array of tool ID strings
125125
- Add new entries at the end of the array (before the closing `]`)
126126
- Keep related tool variants together (e.g., all variants of `read_file`)
127+
- **Case-insensitive deduplication**: Before adding a tool ID, check if a differently-cased variant (e.g., lowercase equivalent) is already in the array. If `grep` is already there, do **not** add `Grep`. Only add a capitalized variant if the lowercase form is absent.
127128

128129

129130

@@ -134,6 +135,7 @@ When adding a new tool to `toolNames.json`, also determine if it belongs in `aut
134135
- Insert new MCP entries near existing entries with the same prefix
135136
- Insert new non-MCP entries alphabetically or near logically related tools
136137
- Never remove existing entries
138+
- **Case-insensitive deduplication**: Before adding a new tool ID, check whether a lowercase (or differently-cased) variant already exists. If `grep` is already mapped, do **not** add `Grep`. If `tool_search` is already mapped, do **not** add `ToolSearch`. The lookup code handles exact-match only, so capitalized variants do map differently — but if both would resolve to the *exact same friendly name*, skip the duplicate. Only add a capitalized variant when it has a meaningfully different name or the lowercase form does not exist at all.
137139

138140
### Validation
139141

.github/workflows/check-toolnames.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,21 @@ jobs:
9090
9191
already_added = []
9292
needs_adding = []
93+
case_variants = []
9394
9495
for tool in tools:
9596
if tool in known_tools:
9697
already_added.append((tool, known_tools[tool]))
9798
else:
98-
needs_adding.append(tool)
99+
# Case-insensitive check: if a differently-cased variant already
100+
# exists with the same friendly name, flag it as a case variant
101+
# rather than a missing entry — it should NOT be added separately.
102+
lower_tool = tool.lower()
103+
case_match = next((k for k in known_tools if k.lower() == lower_tool), None)
104+
if case_match and known_tools[case_match] == known_tools.get(tool, known_tools[case_match]):
105+
case_variants.append((tool, case_match, known_tools[case_match]))
106+
else:
107+
needs_adding.append(tool)
99108
100109
lines = ["## 🔍 Toolnames Checkup", ""]
101110
lines.append("Checked the tool names in this issue against `vscode-extension/src/toolNames.json` on the `main` branch:")
@@ -110,6 +119,18 @@ jobs:
110119
lines.append(f"| `{tool}` | {friendly} |")
111120
lines.append("")
112121
122+
if case_variants:
123+
lines.append("### ⚠️ Case variant of an existing entry — do not add")
124+
lines.append("")
125+
lines.append("These tool names differ only in capitalisation from an entry that is already mapped.")
126+
lines.append("**Do not add a separate entry** — the existing lowercase form covers this tool.")
127+
lines.append("")
128+
lines.append("| Tool Name (from issue) | Existing Entry | Friendly Name |")
129+
lines.append("| --- | --- | --- |")
130+
for tool, existing, friendly in case_variants:
131+
lines.append(f"| `{tool}` | `{existing}` | {friendly} |")
132+
lines.append("")
133+
113134
if needs_adding:
114135
lines.append("### ❌ Not yet in `toolNames.json`")
115136
lines.append("")
@@ -119,8 +140,10 @@ jobs:
119140
lines.append(f"| `{tool}` |")
120141
lines.append("")
121142
122-
if already_added and not needs_adding:
143+
if already_added and not needs_adding and not case_variants:
123144
lines.append("> **All tool names in this issue are already mapped.** This issue may be a duplicate — consider closing it.")
145+
elif case_variants and not needs_adding:
146+
lines.append("> **All unmapped tool names are case variants of existing entries.** No new entries should be added. Consider closing this issue.")
124147
elif needs_adding:
125148
lines.append(f"> **{len(needs_adding)} tool name(s) still need to be added.** Please use the `tool-names` custom agent or update `vscode-extension/src/toolNames.json` manually.")
126149

vscode-extension/src/automaticTools.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
"memory",
6767
"copilot_memory",
6868
"detect_memories",
69+
"todo",
6970

7071
"tool_replay",
7172
"copilot_toolReplay",

vscode-extension/src/toolNames.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,11 @@
337337
,"RunCtest_CMakeTools": "CMake Tools: Run CTest"
338338
,"nuget_get-nuget-solver": "NuGet: Get NuGet Solver"
339339
,"webfetch": "Web Fetch"
340+
,"web_fetch": "Web Fetch"
340341
,"write": "Write"
341342
,"edit": "Edit"
343+
,"search_replace": "Search Replace"
344+
,"write_file": "Write File"
342345
,"multiedit": "Multi Edit"
343346
,"question": "Question"
344347
,"skill": "Skill"
@@ -347,6 +350,7 @@
347350
,"todowrite": "Todo Write"
348351
,"TodoWrite": "Todo Write"
349352
,"todos": "Todos"
353+
,"todo": "Todo"
350354
,"websearch": "Web Search"
351355
,"WebSearch": "Web Search"
352356
,"click_element": "Click Element"
@@ -380,5 +384,6 @@
380384
,"mcp__plugins__suggest_plugin_install": "Plugins MCP: Suggest Plugin Install"
381385
,"mcp__workspace__bash": "Workspace MCP: Bash"
382386
,"mcp__workspace__web_fetch": "Workspace MCP: Web Fetch"
387+
,"mcp__mcp-registry__search_mcp_registry": "MCP Registry: Search MCP Registry"
383388
,"invalid": "Invalid"
384389
}

0 commit comments

Comments
 (0)