diff --git a/packages/agent-core/src/tools/builtin/file/read-media.md b/packages/agent-core/src/tools/builtin/file/read-media.md index 0ff49fb6c..892168f22 100644 --- a/packages/agent-core/src/tools/builtin/file/read-media.md +++ b/packages/agent-core/src/tools/builtin/file/read-media.md @@ -8,6 +8,6 @@ Read media content from a file. - This tool can only read image or video files. To read text files, use the Read tool. To list directories, use `ls` via Bash for a known directory, or Glob for pattern search. - If the file doesn't exist or path is invalid, an error will be returned. - The maximum size that can be read is {{ MAX_MEDIA_MEGABYTES }}MB. An error will be returned if the file is larger than this limit. -- The media content will be returned in a form that you can directly view and understand. +- When analyzing video files, prefer using ReadMediaFile directly rather than writing Python scripts to extract frames. The model can directly view and understand the video content returned by this tool. **Capabilities** \ No newline at end of file diff --git a/packages/agent-core/src/tools/builtin/file/read.md b/packages/agent-core/src/tools/builtin/file/read.md index 79bdda810..7cd02c50b 100644 --- a/packages/agent-core/src/tools/builtin/file/read.md +++ b/packages/agent-core/src/tools/builtin/file/read.md @@ -8,7 +8,7 @@ When you need several files, prefer to read them in parallel: emit multiple `Rea - Returns up to {{ MAX_LINES }} lines or {{ MAX_BYTES_KB }} KB per call, whichever comes first; lines longer than {{ MAX_LINE_LENGTH }} chars are truncated mid-line. - Page larger files with `line_offset` (1-based start line) and `n_lines`. Omit `n_lines` to read up to the {{ MAX_LINES }}-line cap. - Sensitive files (`.env` files, credential stores, SSH keys, and similar secrets) are refused to protect secrets; do not attempt to read them. -- Only UTF-8 text files can be read. Non-UTF-8 encodings, binary files, and files containing NUL bytes are refused; use `ReadMediaFile` for images or video, and Bash or an MCP tool for other binary formats. +- Only UTF-8 text files can be read. Non-UTF-8 encodings, binary files, and files containing NUL bytes are refused; use `ReadMediaFile` for images or video, and Bash or an MCP tool for other binary formats. Do not use Python scripts to extract frames from video files — use `ReadMediaFile` instead. - Negative line_offset reads from the end of the file (for example, -100 reads the last 100 lines); the absolute value cannot exceed {{ MAX_LINES }}. - Output format: `\t` per line. - A `...` status block is appended after the file content; it summarizes how much was read (line and byte counts, truncation, line-ending notes) and is not part of the file itself.