"description":"Read a text file with line numbers and pagination. Use this instead of cat/head/tail in terminal. Output format: 'LINE_NUM|CONTENT'. Suggests similar filenames if not found. Use offset and limit for large files. NOTE: Cannot read images or binary files — use vision_analyze for images.",
"description":"Write content to a file, completely replacing existing content. Use this instead of echo/cat heredoc in terminal. Creates parent directories automatically. OVERWRITES the entire file — use 'patch' for targeted edits.",
"description":"Targeted find-and-replace edits in files. Use this instead of sed/awk in terminal. Uses fuzzy matching (9 strategies) so minor whitespace/indentation differences won't break it. Returns a unified diff. Auto-runs syntax checks after editing.\n\nReplace mode (default): find a unique string and replace it.\nPatch mode: apply V4A multi-file patches for bulk changes.",
"mode":{"type":"string","enum":["replace","patch"],"description":"Edit mode: 'replace' for targeted find-and-replace, 'patch' for V4A multi-file patches","default":"replace"},
"path":{"type":"string","description":"File path to edit (required for 'replace' mode)"},
"old_string":{"type":"string","description":"Text to find in the file (required for 'replace' mode). Must be unique in the file unless replace_all=true. Include enough surrounding context to ensure uniqueness."},
"new_string":{"type":"string","description":"Replacement text (required for 'replace' mode). Can be empty string to delete the matched text."},
"replace_all":{"type":"boolean","description":"Replace all occurrences instead of requiring a unique match (default: false)","default":False},
"patch":{"type":"string","description":"V4A format patch content (required for 'patch' mode). Format:\n*** Begin Patch\n*** Update File: path/to/file\n@@ context hint @@\n context line\n-removed line\n+added line\n*** End Patch"}
"description":"Search file contents or find files by name. Use this instead of grep/rg/find/ls in terminal. Ripgrep-backed, faster than shell equivalents.\n\nContent search (target='content'): Regex search inside files. Output modes: full matches with line numbers, file paths only, or match counts.\n\nFile search (target='files'): Find files by glob pattern (e.g., '*.py', '*config*'). Also use this instead of ls — results sorted by modification time.",
"pattern":{"type":"string","description":"Regex pattern for content search, or glob pattern (e.g., '*.py') for file search"},
"target":{"type":"string","enum":["content","files"],"description":"'content' searches inside file contents, 'files' searches for files by name","default":"content"},
"path":{"type":"string","description":"Directory or file to search in (default: current working directory)","default":"."},
"file_glob":{"type":"string","description":"Filter files by pattern in grep mode (e.g., '*.py' to only search Python files)"},
"limit":{"type":"integer","description":"Maximum number of results to return (default: 50)","default":50},
"offset":{"type":"integer","description":"Skip first N results for pagination (default: 0)","default":0},
"output_mode":{"type":"string","enum":["content","files_only","count"],"description":"Output format for grep mode: 'content' shows matching lines with line numbers, 'files_only' lists file paths, 'count' shows match counts per file","default":"content"},
"context":{"type":"integer","description":"Number of context lines before and after each match (grep mode only)","default":0}