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

Filesystem cannot read large file #478

Open
akendall1966 opened this issue Jan 4, 2025 · 0 comments · May be fixed by #480
Open

Filesystem cannot read large file #478

akendall1966 opened this issue Jan 4, 2025 · 0 comments · May be fixed by #480
Labels
bug Something isn't working

Comments

@akendall1966
Copy link

Describe the bug
Claude could not read the file data.csv with error:

Error

File not found: No file named "d:/mcp_sandbox/data.csv"

I created a truncated version data1.csv which is read out

To Reproduce
Steps to reproduce the behavior:

  1. put both the attached file into the same directory that file system is allowed to access.
  2. prompt claude to read each file

Expected behavior
I would expect both files to be readable.

Logs
If applicable, add logs to help explain your problem.

Additional context
Add any other context about the problem here.
data.csv
data1.csv

@akendall1966 akendall1966 added the bug Something isn't working label Jan 4, 2025
chavan-arvind added a commit to chavan-arvind/servers that referenced this issue Jan 5, 2025
Fixes modelcontextprotocol#478

Add functionality to handle reading large files in chunks.

* Add a new function `readLargeFile` to read large files in chunks.
* Update the `read_file` tool implementation to use `readLargeFile` for files larger than 1MB.
* Improve error handling in the `read_file` tool to provide more detailed error messages.
* Check file size before using `readLargeFile` to determine if the file exceeds the 1MB threshold.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/modelcontextprotocol/servers/issues/478?shareId=XXXX-XXXX-XXXX-XXXX).
@chavan-arvind chavan-arvind linked a pull request Jan 5, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant