Skip to content

Fix large file read issue in filesystem #480

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chavan-arvind
Copy link

@chavan-arvind chavan-arvind commented Jan 5, 2025

Fixes #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.

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).
@dsp-ant dsp-ant force-pushed the main branch 29 times, most recently from ed3df93 to da6fe62 Compare January 13, 2025 21:09
@dsp-ant dsp-ant force-pushed the main branch 27 times, most recently from c114833 to 4f3dc11 Compare January 14, 2025 03:05
@olaservo olaservo added enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem labels Mar 25, 2025
@olaservo
Copy link
Member

olaservo commented Apr 1, 2025

Looks like this older PR will be superseded by this one: #1027

Recommend closing this one once the other one is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server-filesystem Reference implementation for the Filesystem MCP server - src/filesystem
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Filesystem cannot read large file
2 participants