Skip to content

Fix case-insensitive tool name lookup and remove duplicate entries#623

Merged
rajbos merged 1 commit intomainfrom
rajbos/fix-case-insensitive-tool-name-lookup
Apr 18, 2026
Merged

Fix case-insensitive tool name lookup and remove duplicate entries#623
rajbos merged 1 commit intomainfrom
rajbos/fix-case-insensitive-tool-name-lookup

Conversation

@rajbos
Copy link
Copy Markdown
Owner

@rajbos rajbos commented Apr 18, 2026

Summary

Fixes the duplicate entries introduced in #620 by making all tool name lookups case-insensitive, so capitalized variants like "Read", "Write", "Edit", "Bash" are handled automatically without needing separate JSON entries.

Changes

Duplicate removal

  • toolNames.json: Removed "Read", "Write", "Edit" (duplicates of lowercase keys)
  • automaticTools.json: Removed "Read" and "Bash" (duplicates of lowercase entries)

Case-insensitive lookups

  • extension.ts: getUnknownTools() — checks both exact and lowercase key before reporting a tool as unknown
  • workspaceHelpers.ts: extractMcpServerName() — falls back to toolName.toLowerCase() lookup
  • webview/logviewer/main.ts and webview/usage/main.ts: lookupToolName() — tries lowercase fallback before returning raw id
  • maturityScoring.ts: Stores AUTOMATIC_TOOL_SET with lowercased keys; checks with t.toLowerCase()
  • webview/usage/main.ts: AUTOMATIC_TOOL_SET_WV likewise normalized; badge check uses tool.toLowerCase()

Fixes #619

- Make toolNameMap lookups case-insensitive in extension.ts, workspaceHelpers.ts, logviewer and usage webviews
- Normalize automaticTools sets to lowercase for case-insensitive .has() checks in maturityScoring.ts and usage webview
- Remove duplicate capitalized keys from toolNames.json: 'Read', 'Write', 'Edit'
- Remove duplicate capitalized entries from automaticTools.json: 'Read', 'Bash'

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rajbos rajbos enabled auto-merge April 18, 2026 10:22
@rajbos rajbos merged commit 51c39fb into main Apr 18, 2026
18 checks passed
@rajbos rajbos deleted the rajbos/fix-case-insensitive-tool-name-lookup branch April 18, 2026 10:26
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.

Add missing friendly names for tools

1 participant