READ_ALLOWED

Constant READ_ALLOWED 

Source
pub const READ_ALLOWED: &str = "Reads a file from the local filesystem within allowed directories.\nAssume this tool is able to read files within the configured allowed directories. If the User provides a path to a file assume that path is valid. It is okay to read a file that does not exist; an error will be returned.\n\nUsage:\n- Paths can be relative to configured allowed directories, or absolute paths within allowed directories\n- Paths outside allowed directories will be rejected\n- By default, it reads up to 2000 lines starting from line 1\n- You can optionally specify `offset` (1-indexed starting line) and `limit` (max lines), but it\'s recommended to read the whole file by not providing these parameters\n- Any lines longer than 2000 characters will be truncated\n- Results are returned with line numbers prefixed in \"L{n}: content\" format (e.g., \"L1: first line\")\n- This tool can read image files (eg PNG, JPG, etc). When reading an image file the contents are presented visually.\n- This tool can only read files, not directories. To list directory contents, use bash with `ls`.\n- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.\n\nYou can call multiple tools in a single response. It is always better to speculatively read multiple files as a batch that are potentially useful.\n\n### When to Use This Tool\n\n- Reading source code files to understand implementation\n- Viewing configuration files\n- Checking file contents before making edits\n- Reading log files for debugging\n- Viewing images and screenshots provided by the user\n\n### When NOT to Use This Tool\n\n- To list directory contents - use bash with `ls` instead\n- To search for patterns across files - use Grep instead\n- To find files by name - use Glob instead\n\n### Examples\n\nReading a full file:\n```\nfile_path: \"src/main.rs\"\n```\n\nReading specific lines (lines 100-200):\n```\nfile_path: \"src/main.rs\"\noffset: 100\nlimit: 100\n```\n\n### Best Practices\n\n1. Read files before editing them - the Edit tool requires you to have read the file first\n2. When exploring a codebase, read multiple related files in parallel to save time\n3. For large files, consider reading specific sections using offset/limit if you know what you\'re looking for\n4. Relative paths are resolved against allowed directories\n";
Expand description

Read tool context for allowed/sandboxed path mode.