When saveImagesToTempStorage skips unsupported image formats (e.g. tiff,
bmp, avif), savedImagePaths becomes shorter than images[]. Using a plain
index to pair paths with data URLs causes misalignment. Now both
saveImagesToTempStorage and saveImagesToFallbackLocation return
{path, originalIndex}[] so the caller can correctly look up the matching
data URL from the original images array.
Adds a test with mixed supported/unsupported formats to verify correct
pairing.
Pass both source_path and raw base64 data URLs to the LLM in MCP tool
image responses. This ensures the model can analyze images in the current
turn (via base64 data) while still benefiting from path-based persistence
for future context (via source_path).
- Save MCP tool images to temp storage instead of passing raw base64 to LLM
- Add source_path parameter to save_image tool for copying from temp storage
- This prevents data corruption and reduces token costs significantly
- Images are still stored as data URLs in message.images for UI thumbnails
- Update tests to match new behavior with file paths instead of base64 in text
- Feature 1: Fix image thumbnails not displaying in MCP tool responses
- Add mcpResponseImages prop to ChatRow to pass images from mcp_server_response
- Find corresponding mcp_server_response message in ChatView and pass its images
- McpExecution now receives images from the response message instead of ask message
- Feature 2: Fix save_image tool not receiving image data
- Include base64 data URLs in MCP tool result text response
- Agent now receives image data in a format usable with save_image tool
- Images are wrapped in <image_N> tags for easy parsing
- Update tests to match new behavior
- Add image thumbnails to McpExecution component (Feature 1)
- Import Thumbnails component
- Add images prop to McpExecutionProps interface
- Render thumbnails when images are present (click to open in VSCode)
- Pass message.images from ChatRow to McpExecution
- Add save_image tool for agent to save images (Feature 2)
- Create SaveImageTool.ts with base64 data URL support
- Add save_image to toolNames in types/tool.ts
- Add tool definitions in shared/tools.ts
- Create native tool description in prompts/tools/native-tools
- Register tool in presentAssistantMessage.ts
- Add to edit tool group for file write operations
Addresses Issue #10877
Fixes#10872
The processToolContent method in UseMcpToolTool.ts now handles image
content types from MCP protocol responses (e.g., Figma's get_screenshot).
Changes:
- Modified processToolContent to return both text and images
- Updated executeToolAndProcessResult to pass images to task.say() and
pushToolResult()
- Added tests for image handling scenarios
* feat: warn users when too many MCP tools are enabled
- Add WarningRow component for displaying generic warnings with icon, title, message, and optional docs link
- Add TooManyToolsWarning component that shows when users have more than 40 MCP tools enabled
- Add MAX_MCP_TOOLS_THRESHOLD constant (40)
- Add i18n translations for the warning message
- Integrate warning into ChatView to display after task header
- Add comprehensive tests for both components
Closes ROO-542
* Moves constant to the right place
* Move it to the backend
* i18n
* Add actionlink that takes you to MCP settings in this case
* Add to MCP settings too
* Bump max tools up to 60 since github itself has 50+
* DRY
* Fix test
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Bruno Bergher <bruno@roocode.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>