Skip to main content
Glama

MCP File Editor Server

by pwilkin

search_directory

Search for regex patterns in files within a specified directory, including optional recursive search, line context, and file inclusion/exclusion filters. Use to locate matches efficiently across multiple files.

Instructions

Search for regex patterns across all files in a directory.

Input Schema

NameRequiredDescriptionDefault
directory_pathYesAbsolute path to the directory to search
excludeNoGlob pattern for files/directories to exclude
includeNoGlob pattern for files to include (e.g., "*.ts", "*.js")
lines_afterNoNumber of lines to show after each match
lines_beforeNoNumber of lines to show before each match
recursiveNoSearch recursively in subdirectories
regexpYesRegular expression pattern to search for

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "directory_path": { "description": "Absolute path to the directory to search", "type": "string" }, "exclude": { "description": "Glob pattern for files/directories to exclude", "type": "string" }, "include": { "description": "Glob pattern for files to include (e.g., \"*.ts\", \"*.js\")", "type": "string" }, "lines_after": { "description": "Number of lines to show after each match", "minimum": 0, "type": "integer" }, "lines_before": { "description": "Number of lines to show before each match", "minimum": 0, "type": "integer" }, "recursive": { "default": false, "description": "Search recursively in subdirectories", "type": "boolean" }, "regexp": { "description": "Regular expression pattern to search for", "type": "string" } }, "required": [ "directory_path", "regexp" ], "type": "object" }

Other Tools from MCP File Editor Server

Related Tools

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pwilkin/mcp-file-edit'

If you have feedback or need assistance with the MCP directory API, please join our Discord server