it feels like gemini is the only model that gets stuck because it cant read more than 250 lines of any file. i tried putting the context file in the prompt and putting it in the rules to read FULL files instead of the first 250 lines. doesnt work..
1 Like
That is the cap on the native read file tool in Cursor, if you want to go beyond the 250 line limitation then you will need to use a custom MCP tool.
See the link below for a suitable one that will meet your request:
If this solves your issue, please be sure to select is as the solution so other users may get resolve when facing the same situation.
add this to your rule:
- **Handle Tool Limitations & Multiple Calls**: Recognize that tools like `read_file` might only show a portion of the code at a time. If the information is insufficient, **do not hesitate to call `read_file` again** to read other parts of the file (adjacent code blocks, imports at the top, exports at the bottom, etc.), or adjust the reading range. **Specifically, when the tool fails to return the complete file at once due to limitations (even if requested), proactively use line range parameters (`start_line_one_indexed`, `end_line_one_indexed_inclusive`) to read the remaining content in segments, ensuring complete context acquisition.** Combine with other tools (like `grep_search`) for more comprehensive information.
2 Likes
This is also a viable option, unless you’re working with monolithic files that require 4+ tool calls.. which you should modularize if that’s the case.
The MCP tool I provided also gives the ability to read multiple files at once as well, plus some other various convenient tools.