edit_contentEdit large files using search/replace with fuzzy matching.
Use instead of line-based editing to avoid LLM line number errors. Fuzzy
matching handles whitespace and formatting differences automatically.
Preview mode (default) shows diff without applying. Creates automatic
backup before changes - use revert_edit to undo. Does NOT support regex
in replacement - patterns must be literal text (use fuzzy=true for
flexibility).
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to target file",
"title": "Absolute File Path",
"type": "string"
},
"changes": {
"description": "Array of {search, replace, fuzzy?} objects. Applied in order.",
"items": {
"additionalProperties": true,
"type": "object"
},
"title": "Changes",
"type": "array"
},
"fuzzy": {
"default": true,
"description": "Enable fuzzy matching for all changes (default: true)",
"title": "Fuzzy",
"type": "boolean"
},
"preview": {
"default": true,
"description": "Show diff preview without applying changes. Always preview first!",
"title": "Preview",
"type": "boolean"
}
},
"required": [
"absolute_file_path",
"changes"
],
"title": "edit_contentArguments",
"type": "object"
}Annotations{
"readOnlyHint": false,
"destructiveHint": true
} | — | WritesDestructive | — |
get_overviewGet file structure, size, and semantic outline for large files (code, logs, data).
Use FIRST when working with any file over 1000 lines or when you need to
understand file structure. Returns: line count, byte size, binary detection,
long line stats, section headings, and suggested search patterns. For code
files, uses Tree-sitter to extract functions, classes, and structure. Does
NOT return file content - use read_content or search_content for that.
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to target file (e.g., /path/to/large_module.py)",
"title": "Absolute File Path",
"type": "string"
},
"changed_lines": {
"anyOf": [
{
"items": {
"items": {
"anyOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array"
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"description": "Optional list of changed line ranges from a diff. Each entry is [start, end] or [start, end, type] where type is \"added\", \"modified\", or \"removed\". Example: [[10, 15, \"added\"], [45, 52]]. Available from diffchunk list_chunks file_details output.",
"title": "Changed Lines"
}
},
"required": [
"absolute_file_path"
],
"title": "get_overviewArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |
list_directoryList the contents of a directory.
Each entry has a type field: 'dir' for directories, 'file' for files.
Use max_depth > 1 to recurse into subdirectories. Automatically ignores
__pycache__, node_modules, and .git. Returns entry type, size in bytes,
and child count for directories.
Input schema{
"properties": {
"absolute_dir_path": {
"description": "The absolute path to the directory to list.",
"title": "Absolute Dir Path",
"type": "string"
},
"max_depth": {
"default": 1,
"description": "How many levels deep to recurse (default: 1 = direct children only).",
"title": "Max Depth",
"type": "integer"
},
"max_entries": {
"anyOf": [
{
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Maximum total entries to return. Defaults to server config (200).",
"title": "Max Entries"
},
"include_hidden": {
"default": false,
"description": "Include entries starting with '.' (default: false).",
"title": "Include Hidden",
"type": "boolean"
}
},
"required": [
"absolute_dir_path"
],
"title": "list_directoryArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |
read_contentRead specific portions of large files efficiently.
Use after search_content locates content, or directly with tail/head modes
for logs. Modes: 'lines' (read by offset/limit), 'semantic' (complete
functions/classes via Tree-sitter), 'tail' (last N lines - ideal for logs),
'head' (first N lines). Does NOT search - use search_content first to find
line numbers, then read_content to examine. For files over 500MB, tail/head
modes are most efficient.
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to target file",
"title": "Absolute File Path",
"type": "string"
},
"offset": {
"default": 1,
"description": "Starting line number, 1-indexed (default: 1). Ignored in tail/head modes.",
"minimum": 1,
"title": "Offset",
"type": "integer"
},
"limit": {
"default": 100,
"description": "Lines to return (default 100). Reduce for files with long lines (check get_overview).",
"title": "Limit",
"type": "integer"
},
"pattern": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Pattern to position read (finds match, then reads around it). Overrides offset.",
"title": "Pattern"
},
"mode": {
"default": "lines",
"description": "Reading mode: 'lines' (by range), 'semantic' (tree-sitter chunks), 'tail' (last N), 'head' (first N)",
"title": "Mode",
"type": "string"
}
},
"required": [
"absolute_file_path"
],
"title": "read_contentArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |
read_enclosingFind the enclosing function or class for a specific line number.
Given a file and line number, returns the complete enclosing definition
(function, method, class, struct, etc.) containing that line. Use depth=2
to get the parent definition (e.g., the class containing a method).
Falls back to a centered context window for unsupported languages or
top-level code.
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to target file",
"title": "Absolute File Path",
"type": "string"
},
"line": {
"description": "Line number to find the enclosing function/class for",
"minimum": 1,
"title": "Line",
"type": "integer"
},
"depth": {
"default": 1,
"description": "Nesting depth: 1 = innermost definition, 2 = parent (e.g., class containing a method)",
"minimum": 1,
"title": "Depth",
"type": "integer"
},
"context_lines": {
"default": 40,
"description": "Lines of context for fallback window when no enclosing definition is found",
"minimum": 1,
"title": "Context Lines",
"type": "integer"
}
},
"required": [
"absolute_file_path",
"line"
],
"title": "read_enclosingArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |
revert_editRestore a file to a previous state from automatic backups.
Use when edit_content made unwanted changes. Backups are created
automatically before each edit. Current state is saved as new backup
before reverting (so revert is reversible). Without backup_id, reverts to
most recent backup. Returns list of available backups with timestamps.
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to the file to revert",
"title": "Absolute File Path",
"type": "string"
},
"backup_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "Backup ID from response. Omit to use most recent.",
"title": "Backup Id"
}
},
"required": [
"absolute_file_path"
],
"title": "revert_editArguments",
"type": "object"
}Annotations{
"readOnlyHint": false,
"destructiveHint": true
} | — | WritesDestructive | — |
search_contentSearch large files for text patterns without loading entire content into memory.
Use when finding functions, classes, errors, log entries, or counting
occurrences. Supports: fuzzy matching (handles typos/whitespace), regex
patterns, case-insensitive search, inverted matching (like grep -v), and
count-only mode. Returns ranked matches with line numbers and context
(lines truncated to 500 chars). When count_only=True, returns
{count, pattern, fuzzy_enabled, regex_enabled, case_sensitive, inverted}
instead of the full results structure.
Input schema{
"properties": {
"absolute_file_path": {
"description": "Absolute path to target file",
"title": "Absolute File Path",
"type": "string"
},
"pattern": {
"description": "Text pattern to find (e.g., 'class User', 'ERROR', or regex like r'\\d{3}-\\d{4}')",
"title": "Pattern",
"type": "string"
},
"max_results": {
"default": 20,
"description": "Maximum results to return (1-100)",
"maximum": 100,
"minimum": 1,
"title": "Max Results",
"type": "integer"
},
"context_lines": {
"default": 2,
"description": "Lines of context before/after each match",
"title": "Context Lines",
"type": "integer"
},
"fuzzy": {
"default": true,
"description": "Enable fuzzy matching to handle typos and whitespace differences (default: true)",
"title": "Fuzzy",
"type": "boolean"
},
"regex": {
"default": false,
"description": "Enable regex pattern matching (e.g., r'error.*timeout'). Disables fuzzy matching.",
"title": "Regex",
"type": "boolean"
},
"case_sensitive": {
"default": false,
"description": "Match exact case when true (default: false for case-insensitive)",
"title": "Case Sensitive",
"type": "boolean"
},
"invert": {
"default": false,
"description": "Return lines that do NOT match the pattern (like grep -v)",
"title": "Invert",
"type": "boolean"
},
"count_only": {
"default": false,
"description": "Return only the match count, not content. Efficient for large files.",
"title": "Count Only",
"type": "boolean"
}
},
"required": [
"absolute_file_path",
"pattern"
],
"title": "search_contentArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |
search_directorySearch for a text pattern across all files in a directory.
Returns results grouped by file with line numbers and context. Use
include_pattern to filter by file extension (e.g. '*.py'). Automatically
ignores __pycache__, node_modules, and .git. Prefer fuzzy=False (default)
for multi-file search performance.
Input schema{
"properties": {
"absolute_dir_path": {
"description": "The absolute path to the directory to search.",
"title": "Absolute Dir Path",
"type": "string"
},
"pattern": {
"description": "Text pattern to search for.",
"title": "Pattern",
"type": "string"
},
"include_pattern": {
"default": "*",
"description": "fnmatch glob matched against file names (default: '*'). Examples: '*.py', '*.md', '*.ts'.",
"title": "Include Pattern",
"type": "string"
},
"max_results": {
"anyOf": [
{
"maximum": 100,
"minimum": 1,
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"description": "Total match cap across all files. Defaults to server config (100).",
"title": "Max Results"
},
"context_lines": {
"default": 2,
"description": "Lines of context before/after each match (default: 2).",
"title": "Context Lines",
"type": "integer"
},
"fuzzy": {
"default": false,
"description": "Enable fuzzy matching (default: false, expensive for many files).",
"title": "Fuzzy",
"type": "boolean"
},
"regex": {
"default": false,
"description": "Enable Python regex matching (default: false).",
"title": "Regex",
"type": "boolean"
},
"case_sensitive": {
"default": false,
"description": "Case-sensitive search (default: false).",
"title": "Case Sensitive",
"type": "boolean"
},
"invert": {
"default": false,
"description": "Return non-matching lines, like grep -v (default: false).",
"title": "Invert",
"type": "boolean"
},
"include_hidden": {
"default": false,
"description": "Include dot-files and dot-dirs (default: false).",
"title": "Include Hidden",
"type": "boolean"
}
},
"required": [
"absolute_dir_path",
"pattern"
],
"title": "search_directoryArguments",
"type": "object"
}Annotations{
"readOnlyHint": true,
"destructiveHint": false
} | — | Read onlyNon-destructive | — |