From 78da56f3328402034cc291edd6ef550f22dea370 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 12 Aug 2026 04:57:11 +0000 Subject: [PATCH] docs: note constructor file_path resolves against base_dir A relative default path anchors to base_dir when set, not the cwd. Co-authored-by: Rip&Tear --- docs/edge/en/tools/file-document/filereadtool.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/edge/en/tools/file-document/filereadtool.mdx b/docs/edge/en/tools/file-document/filereadtool.mdx index dd661e349c..e63603ddd9 100644 --- a/docs/edge/en/tools/file-document/filereadtool.mdx +++ b/docs/edge/en/tools/file-document/filereadtool.mdx @@ -52,7 +52,7 @@ The agent can pass these at runtime: You can set these when you create the tool: -- `file_path`: (Optional) Default file to read when the agent calls the tool with no path. +- `file_path`: (Optional) Default file to read when the agent calls the tool with no path. A relative path resolves against `base_dir` when `base_dir` is provided, otherwise against the current working directory. - `base_dir`: (Optional) Directory that runtime paths must stay inside. Default is the current working directory. The tool resolves this path when the tool is created, so a later change of working directory does not move the sandbox. - `encoding`: (Optional) Text encoding used to decode the file. Default is `utf-8`. If decoding fails, the tool returns an error and suggests passing a different `encoding`.