[Bug] MCP tool results containing image content are sent to the model as Base64 text instead of as images
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by tracing how MCP tool results from the stdio transport are converted into the model request, then compare that path with manually attached images and the VS Code behavior described here. The fix is complete when image content is forwarded as an image, and models without image support receive a clear warning instead of Base64 text.
由索引模型根据 Issue 内容生成。
描述
OS: Red Hat Enterprise Linux 9.6 (Plow)
Eclipse Version: Eclipse Platform 4.38.0 (v20260708-0722)
Plugin Version: GitHub Copilot for Eclipse 0.20.0.202607100822
Model: GPT-6 Astra (Medium), in Agent mode
MCP transport: stdio (local server built with FastMCP)
When an MCP tool returns an image in its result ({"type": "image", "mimeType": "image/jpeg", "data": ""}), Copilot for Eclipse sends it to the model as a Base64 text string, not as an image. The model can't see the picture, so it says it received "Base64-encoded JPEG text rather than a viewable image".
The same MCP server, tool and image work in VS Code Copilot Chat, where the model sees and describes the screenshot. Manually attaching the same JPEG file in Copilot for Eclipse chat also works. So, the model can handle images, and the problem appears to be in how the plugin forwards images from MCP tool results.
To Reproduce
FastMCP Example:
from fastmcp import FastMCP
from fastmcp.utilities.types import Image
mcp = FastMCP("image-test")
@mcp.tool
def get_image() -> Image:
"""Return a test image."""
return Image(path="/path/to/any.jpg")
if __name__ == "__main__":
mcp.run()
Register the server in Copilot for Eclipse's MCP settings (stdio transport).
Open Copilot Chat in Agent mode and pick a vision-capable model.
Ask: "Call get_image and describe what is in the image."
The tool runs successfully, but the model replies that it received Base64 text and can't view the image.
Expected behavior
Image content from MCP tool results should be sent to the model as images, as VS Code Copilot Chat does and as happens with images attached manually in Copilot for Eclipse. The model should then be able to describe the image.
If the selected model doesn't support images, the plugin should show a clear warning rather than sending raw Base64 text.
LLM prompt and output:
Prompt: use the screenshot tool to describe the image. DO NOT use any other context or information to guess what is on the screenshot.
Copilot:
The screenshot was returned as Base64-encoded JPEG data, not a viewable image. I can’t reliably describe its contents and won’t guess from other context.
Please attach the screenshot directly as an image or use a model/interface that can render the returned image.
The point of the screenshot tool is to screenshot the IDE and automatically look at the image. It is cumbersome to take a screenshot, add it to the project (or drag it to the document viewer in eclipse), and then manually add it to chat.
- 主要语言
- Java
- 星标
- 125
- 派生
- 63
- 平均合并
- 1 天 3 小时
- 30 天内合并 PR
- 5
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoft/copilot-for-eclipse 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 45/100
microsoft/copilot-for-eclipse#474 ·
维护者通常 1 天内回复
-
[Feature Request] Copilot CLI Quick Launcher (Just like Intellij) with WSL & Auto-Install Support未关闭enhancement
难度 5/5 一周以上 新手友好度 42/100
microsoft/copilot-for-eclipse#473 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 48/100
microsoft/copilot-for-eclipse#472 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 45/100
microsoft/copilot-for-eclipse#458 ·
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 48/100
microsoft/copilot-for-eclipse#450 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
查看 microsoft/copilot-for-eclipse 的全部 Issue
相似的 Issue
-
[destination-snowflake] Custom domains rejected unlike source connections可能已有人在做 @kuza55 今天认领。 未关闭autoteam community connectors/destination/snowflake team/use
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
area-dashboard
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
component/operate kind/feature-request
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
Forge coverage prompts carry text the agent cannot act on可能已有人在做 @graalvmbot 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
oracle/graalvm-reachability-metadata#10572 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
IBM/sample-app-mod#55 ·