Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Image File for Filesystem server #533

Open
cliffhall opened this issue Jan 16, 2025 · 0 comments
Open

Read Image File for Filesystem server #533

cliffhall opened this issue Jan 16, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@cliffhall
Copy link

Is your feature request related to a problem? Please describe.
Filesystem read_file tool currently only reads text files.

When asking Claude app with the filesystem MCP server enabled, asking it to read and analyze a file returns:

I can see there's an image file called "Untitled.png" in the directory. However, I need to clarify something: while I can see that the file exists, I cannot actually open or view image files. I can only work with text-based files and perform file system operations.
If you'd like me to analyze the image, you would need to describe what's in it or share it directly in our conversation. Is there something specific about the image you'd like to discuss?

Describe the solution you'd like
Add support for reading image files.

The "read_file" logic is in this switch statement in the filesystem server.

I haven't drilled into MCP deeply enough to know if another case in this switch and possibly some type declarations would be enough, or if there is some problem with handling an image returned from this tool as opposed to text. Feels like probably the latter, or it would have been relatively low-hanging fruit when the server was originally written.

Describe alternatives you've considered
I suppose the "read_file" tool could be modified to return text, images, or any other MIME type). I need to learn more about how the return from this function is consumed to know more.

Additional context
This arose from a discussion on Reddit.

@cliffhall cliffhall added the enhancement New feature or request label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant