fix: improve MCP tool prompt clarity to prevent format confusion #8508
+38
−8
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.
Description
This PR addresses Issue #8507 where AI models were forgetting to use the
use_mcp_tool
wrapper when calling MCP tools, instead trying to call them directly by their tool name.Problem
Users reported that when using MCP tools (like GitHub MCP), the AI would output incorrect format:
Instead of the correct format:
Solution
Enhanced the MCP tool prompts with:
use_mcp_tool
wrapperChanges
src/core/prompts/tools/use-mcp-tool.ts
to include clear format instructionssrc/core/prompts/sections/mcp-servers.ts
to reinforce proper usageTesting
Related Issues
Fixes #8507
Review Confidence
Implementation review showed 95% confidence with PROCEED recommendation.
Important
Improves MCP tool prompt clarity in
use_mcp_tool.ts
andmcp-servers.ts
to prevent format confusion by emphasizing correct usage with explicit warnings and examples.use_mcp_tool.ts
to emphasize correct usage ofuse_mcp_tool
wrapper with explicit warnings and examples.mcp-servers.ts
to reinforce the requirement to useuse_mcp_tool
wrapper and provide clear examples of correct vs incorrect formats.This description was created by
for 260accb. You can customize this summary. It will automatically update as commits are pushed.