Repository navigation
fix: render MCP tool names when a manifest's tools is a string array - #4
Merged
mayank-d3 merged 4 commits intoJul 1, 2026
Merged
Conversation
Signed-off-by: mayank-d3 <mayank.rawat@d3.com>
Signed-off-by: mayank-d3 <mayank.rawat@d3.com>
Signed-off-by: mayank-d3 <mayank.rawat@d3.com>
Signed-off-by: mayank-d3 <mayank.rawat@d3.com>
mayank-d3
force-pushed
the
fix/mcp-record-tools-display
branch
from
July 1, 2026 08:42
c6b5c0d to
67402bf
Compare
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.
Summary
MCP record tool names rendered as
tools: , , ,inresolveandinstallwhen a manifest publishestoolsas a string array (e.g. czarcash.com →["search", "get_info", "list_pages", "get_page"]).format-record.tsandinstall.tscasttoolstoArray<{ name }>and read.name, which isundefinedfor strings. Fixed with one shared, tolerantnormalizeToolshelper. Drafted with help from Claude; I reviewed every line.Changes
src/utils/normalize-tools.ts—normalizeTools(unknown): { name, description? }[]toleratingstring[]|{name, description}[]| mixed | malformed; non-array →[].unknown+ type guards (noany).src/utils/format-record.ts(theresolvedisplay) andsrc/commands/install.ts(the "Tools:" list) routetoolsthroughnormalizeToolsinstead of casting.tests/utils/normalize-tools.test.ts(all input shapes) + a string-tools regression intests/utils/format-record.test.ts.CHANGELOG.md## [Unreleased]→### Fixed.Checklist
feat:/fix:/docs:)tests/that fail without this change (the string-tools regression fails on the old cast)pnpm testpasses locally (441 passed)CHANGELOG.mdunder## [Unreleased]git commit -s)How to test
(
docs/screenshots/resolve.pngusesdoma.xyz, which has no string-tools MCP record, so it's unchanged.)Related
Closes #3