Skip to content

fix(mcp): show exact callable tool names in prompt#79

Merged
Nomadcxx merged 2 commits into
mainfrom
followup/pr77-exact-mcp-call-names
May 24, 2026
Merged

fix(mcp): show exact callable tool names in prompt#79
Nomadcxx merged 2 commits into
mainfrom
followup/pr77-exact-mcp-call-names

Conversation

@Nomadcxx
Copy link
Copy Markdown
Owner

Stacked follow-up for #77.

This keeps the prompt-level approach from #77, but makes the system message print the exact callable MCP tool name instead of leaving the model to infer it from the raw server/tool names.

That matters for names like hybrid-memory, where the callable name is mcp__hybrid_memory__..., not mcp__hybrid-memory__....

Changes:

  • carry the computed MCP call name with the tool summary
  • reuse the same namespacing helper used by the MCP bridge
  • add a regression test for sanitized server/tool names

Verification:

  • npm run build
  • npm test -- tests/unit/plugin-mcp-system-transform.test.ts tests/unit/mcp/tool-bridge.test.ts tests/unit/mcp/integration.test.ts
  • npm test (606 pass, 2 skip, 0 fail)

Rollback note: pre-#77 snapshot tag is rollback/pre-pr77-mcp-direct-tools-2026-05-24 at f3a07f8; npm latest before these changes is 2.4.5.

cantalupo555 and others added 2 commits May 23, 2026 08:40
- Export MCP_TOOL_PREFIX constant
- Update system message to instruct models to use direct MCP tool calls
- Adjust corresponding test
@Nomadcxx Nomadcxx marked this pull request as ready for review May 24, 2026 03:53
@Nomadcxx Nomadcxx merged commit 7c4cfa3 into main May 24, 2026
2 checks passed
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.

2 participants