summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/server/src/tools/read-many-files.ts22
1 files changed, 16 insertions, 6 deletions
diff --git a/packages/server/src/tools/read-many-files.ts b/packages/server/src/tools/read-many-files.ts
index 5064ae1b..9593fe86 100644
--- a/packages/server/src/tools/read-many-files.ts
+++ b/packages/server/src/tools/read-many-files.ts
@@ -161,7 +161,14 @@ export class ReadManyFilesTool extends BaseTool<
super(
ReadManyFilesTool.Name,
'ReadManyFiles',
- `Reads content from multiple text files specified by paths or glob patterns within a configured target directory and concatenates them into a single string.
+ `Reads content from multiple files specified by paths or glob patterns
+within a configured target directory. For text files, it concatenates their content
+into a single string. It is primarily designed for text-based files. However, it can
+also process image (e.g., .png, .jpg) and PDF (.pdf) files if their file names or
+extensions are explicitly included in the 'paths' argument. For these explicitly
+requested non-text files, their data is read and included in a format suitable for
+model consumption (e.g., base64 encoded).
+
This tool is useful when you need to understand or analyze a collection of files, such as:
- Getting an overview of a codebase or parts of it (e.g., all TypeScript files in the 'src' directory).
- Finding where specific functionality is implemented if the user asks broad questions about code.
@@ -169,12 +176,15 @@ This tool is useful when you need to understand or analyze a collection of files
- Gathering context from multiple configuration files.
- When the user asks to "read all files in X directory" or "show me the content of all Y files".
-Use this tool when the user's query implies needing the content of several files simultaneously for context, analysis, or summarization.
-It uses default UTF-8 encoding and a '--- {filePath} ---' separator between file contents.
+Use this tool when the user's query implies needing the content of several files
+simultaneously for context, analysis, or summarization.
+For text files, it uses default UTF-8 encoding and a '--- {filePath} ---' separator between file contents.
Ensure paths are relative to the target directory. Glob patterns like 'src/**/*.js' are supported.
-Avoid using for single files if a more specific single-file reading tool is available, unless the user specifically requests to process a list containing just one file via this tool.
-This tool should NOT be used for binary files; it attempts to skip them.
-Default excludes apply to common non-text files and large dependency directories unless 'useDefaultExcludes' is false.`,
+Avoid using for single files if a more specific single-file reading tool is available,
+unless the user specifically requests to process a list containing just one file via this tool.
+Other binary files (not explicitly requested as image/PDF) are generally skipped.
+Default excludes apply to common non-text files (except for explicitly requested images/PDFs)
+and large dependency directories unless 'useDefaultExcludes' is false.`,
parameterSchema,
);
this.targetDir = path.resolve(targetDir);