Quick Summary
Non-textual Base64-encoded data returned by MCP should not be passed to the LLM.
Occupy a large amount of context
Environment & Tools
- PicoClaw Version: 6148ccc
- Go Version: go 1.26.1
- AI Model & Provider: DeepSeek
- Operating System: WSL Ubuntu
- Channels: Telegram
📸 Steps to Reproduce
- Configuring MCP. e.g. https://github.com/grafana/mcp-grafana
- Use "Get panel or dashboard image" Tool
- picoclaw sent the Base64 data directly to the LLM, consuming a significant amount of context.
❌ Actual Behavior
picoclaw sent the Base64 data directly to the LLM, consuming a significant amount of context.
✅ Expected Behavior
Reference https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-result
Before forwarding the information returned by MCP to the LLM, picoclaw should check whether the type field within the Tool Result is set to image. If it is, the embedded Base64 data should be wrapped in the specified " format and sent directly to the IM service.
💬 Additional Context
Quick Summary
Non-textual Base64-encoded data returned by MCP should not be passed to the LLM.
Occupy a large amount of context
Environment & Tools
📸 Steps to Reproduce
❌ Actual Behavior
picoclaw sent the Base64 data directly to the LLM, consuming a significant amount of context.
✅ Expected Behavior
Reference https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-result
Before forwarding the information returned by MCP to the LLM, picoclaw should check whether the
typefield within the Tool Result is set toimage. If it is, the embedded Base64 data should be wrapped in the specified"format and sent directly to the IM service.💬 Additional Context