-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Labels
MCPCategorizes an issue or PR as relevant to SIG MCPCategorizes an issue or PR as relevant to SIG MCP
Description
Problem Description
When managing conversation context, Cherry Studio currently has an asymmetry between what users see and what the model receives regarding MCP tool call records:
- User sees: Complete MCP request → parameters → response chain
- Model receives: MCP call records are filtered out, only natural language interaction content (main text) is retained
Impact
This "information asymmetry" accumulates and amplifies in long-context conversations, causing the model to gradually form incorrect cognitive patterns. This design flaw is particularly evident in tool-intensive conversations:
- Tool call hallucinations: The model mistakenly believes that language intent like "Let me open the Bing search page!" can directly drive functionality, rather than through the standardized MCP protocol
- Fake call tendency: In complex or multi-turn conversations, the model tends to "speak out" tool functionality rather than actually calling tools
- Reliability degradation: The longer the conversation, the more confused the model becomes about how to use tools
Environment
- Version: 1.7.7 | Platform: win32
- Verified models with issues: DeepseekChat (Deepseek v3.2), GLM-4.7 (approximately after 30k context)
- MCP tools used:
@playwright/mcp@latest
Reproduction
What the client (user) sees in context:
Let me open the Bing search page!
{
"params": {
"url": "https://www.bing.com"
},
"response": {
"content": [...]
}
}
The Bing page has been successfully opened! Now seeing the Bing Chinese version homepage...What is actually sent in the request context:
Let me open the Bing search page!
(MCP call record missing here)
The Bing page has been successfully opened! Now seeing the Bing Chinese version homepage...Proposed Solution
Adopt a lightweight structured MCP record strategy that retains request metadata while omitting detailed responses:
Historical calling process format (for model to inherit)
{
"type": "mcp_request",
"method": "tool_method_name",
"params": {"key_params": "..."}
}Historical calling result format (helps model understand execution status)
{
"status": "COMPLETED" // or "FAILED", "INTERRUPTED", "INVALID_PARAMS", etc.
}Technical Advantages
- Solves hallucination root cause: Model clearly sees "MCP call is a necessary intermediary"
- Context efficiency: Retains key metadata (~200 tokens), omits detailed responses (potentially thousands of tokens)
- Status learning: Through independent status fields, the model can learn failure patterns and retry strategies
- Protocol standardization: Reinforces MCP as a standardized interface
- Long conversation stability: Prevents error patterns from accumulating in context
Technical Context
Looking at the codebase:
src/renderer/src/aiCore/prepareParams/messageConverter.ts- TheconvertMessageToSdkParamfunction currently only processesMainText,File,Image,Thinkingblockssrc/renderer/src/utils/messageUtils/find.ts- Has a deprecatedgetContentWithToolsfunction that converts Tool blocks to text, but it's not used in the main flow- Tool blocks (
MessageBlockType.TOOL) exist but are not included when building the model context
Labels
- bug
- enhancement
- mcp
dosubot and Qtgcy08
Metadata
Metadata
Assignees
Labels
MCPCategorizes an issue or PR as relevant to SIG MCPCategorizes an issue or PR as relevant to SIG MCP