From fe66a567f04389c9fc74e0fab6c3c74f67bd1cce Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 12 Aug 2026 01:14:14 +0000 Subject: [PATCH] docs: clarify FileReadTool usage example Show both runtime path and default-path construction, including a run() call that omits file_path. Co-authored-by: Rip&Tear --- docs/edge/en/tools/file-document/filereadtool.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/edge/en/tools/file-document/filereadtool.mdx b/docs/edge/en/tools/file-document/filereadtool.mdx index 8ffbf6db2c..1471c5ba91 100644 --- a/docs/edge/en/tools/file-document/filereadtool.mdx +++ b/docs/edge/en/tools/file-document/filereadtool.mdx @@ -31,13 +31,13 @@ pip install 'crewai[tools]' ```python Code from crewai_tools import FileReadTool -# Let the agent choose the file path at runtime +# Agent must pass file_path at runtime file_read_tool = FileReadTool() +content = file_read_tool.run(file_path='path/to/your/file.txt') -# OR - -# Set a default file path when you create the tool +# OR set a default file at construction file_read_tool = FileReadTool(file_path='path/to/your/file.txt') +content = file_read_tool.run() # reads the default file # Read only lines 100-149 partial_content = file_read_tool.run(