Skip to content

Commit fe29629

Browse files
committed
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
1 parent bd1f890 commit fe29629

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/core/prompts/tools/simple-read-file.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ export function getSimpleReadFileDescription(args: ToolArgs): string {
88
return `## read_file
99
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.
1010
11+
**IMPORTANT: This tool can only read ONE file at a time. Multiple file reads are not supported in this format.**
12+
1113
Parameters:
1214
- path: (required) File path (relative to workspace directory ${args.cwd})
1315
@@ -31,5 +33,7 @@ Examples:
3133
3. Reading a markdown file:
3234
<read_file>
3335
<path>README.md</path>
34-
</read_file>`
36+
</read_file>
37+
38+
Note: To read multiple files, you must use separate read_file tool calls for each file.`
3539
}

0 commit comments

Comments
 (0)