Skip to main content
Glama

MCP File Editor Server

by pwilkin

search_file

Find regex patterns in a file and display matching lines with specified context lines before and after each match for precise file analysis.

Instructions

Search for regex patterns in a file and show matching lines with context.

Input Schema

NameRequiredDescriptionDefault
file_pathYesAbsolute path to the file
lines_afterNoNumber of lines to show after each match
lines_beforeNoNumber of lines to show before each match
regexpYesRegular expression pattern to search for

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "file_path": { "description": "Absolute path to the file", "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" }, "regexp": { "description": "Regular expression pattern to search for", "type": "string" } }, "required": [ "file_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