pub const WRITE_ALLOWED: &str = "Writes a file to the local filesystem within allowed directories. Creates parent directories if they don\'t exist.\n\nUsage:\n- This tool will overwrite the existing file if there is one at the provided path.\n- Paths can be relative to configured allowed directories, or absolute paths within allowed directories\n- Paths outside allowed directories will be rejected\n- If this is an existing file, you MUST use the Read tool first to read the file\'s contents. This tool will fail if you did not read the file first.\n- ALWAYS prefer editing existing files in the codebase using the Edit tool. NEVER write new files unless explicitly required.\n- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.\n- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.\n\n### Parameters\n\n- `file_path`: Path for the file to write - can be relative or absolute within allowed directories (required)\n- `content`: Content to write to the file (required)\n\n### When to Use This Tool\n\n- Creating new files that don\'t exist yet\n- Completely rewriting a file when most content changes\n- Writing generated output (build artifacts, reports, etc.)\n- Creating new source files when explicitly requested\n\n### When NOT to Use This Tool\n\n- Modifying existing files - use Edit tool instead (more precise, less error-prone)\n- Creating documentation unless explicitly requested\n- Writing files you haven\'t read first (if they exist)\n\n### Examples\n\nCreating a new file:\n```\nfile_path: \"src/new_module.rs\"\ncontent: \"//! New module\\n\\npub fn hello() {\\n println!(\\\"Hello!\\\");\\n}\\n\"\n```\n\n### Best Practices\n\n1. ALWAYS read existing files with Read tool before overwriting them\n2. Prefer Edit tool for making changes to existing files - it\'s safer and more precise\n3. When creating new files, ensure the content is complete and correct\n4. Don\'t create files proactively - wait for explicit user requests\n5. Relative paths are resolved against allowed directories\n\n### Error Handling\n\n- If you try to overwrite a file you haven\'t read, the operation will fail\n- Paths outside allowed directories will be rejected\n- Permission errors will be returned if you can\'t write to the location\n- Parent directories are created automatically if they don\'t exist\n";Expand description
Write tool context for allowed/sandboxed path mode.