fix: clarify read_file tool single-file limitation for specific models

- Updated getSimpleReadFileDescription to explicitly state it only supports reading one file at a time
- Added note about using separate tool calls for multiple files
- This fixes the documentation mismatch for models like grok-code-fast-1 that use the simplified format

Fixes #8858
This commit is contained in:
Roo Code 2025-10-27 07:53:06 +00:00
parent bd1f890589
commit fe29629651

View file

@ -8,6 +8,8 @@ export function getSimpleReadFileDescription(args: ToolArgs): string {
return `## read_file
Description: Request to read the contents of a file. The tool outputs line-numbered content (e.g. "1 | const x = 1") for easy reference when discussing code.
**IMPORTANT: This tool can only read ONE file at a time. Multiple file reads are not supported in this format.**
Parameters:
- path: (required) File path (relative to workspace directory ${args.cwd})
@ -31,5 +33,7 @@ Examples:
3. Reading a markdown file:
<read_file>
<path>README.md</path>
</read_file>`
</read_file>
Note: To read multiple files, you must use separate read_file tool calls for each file.`
}