Skip to main content
Glama

Filesystem MCP Server

by rawr-ai

regex_search_content

Search file content recursively using a regex pattern. Scan subdirectories from a specified path, return matching files with line details. Optional filters: file pattern, depth, size, and result limits. Works within secure directories.

Instructions

Recursively search file content using a regex pattern. Searches through subdirectories from the starting path. Returns a list of files containing matches, including line numbers and matching lines. Requires regex pattern. Optional: path, filePattern, maxDepth, maxFileSize, maxResults. Only searches within allowed directories.

Input Schema

NameRequiredDescriptionDefault
filePatternNoGlob pattern to filter files to search within (e.g., "*.ts", "data/**.json"). Defaults to searching all files.*
maxDepthNoMaximum directory depth to search recursively. Defaults to 2.
maxFileSizeNoMaximum file size in bytes to read for searching. Defaults to 10MB.
maxResultsNoMaximum number of files with matches to return. Defaults to 50.
pathYesDirectory path to start the search from.
regexYesThe regular expression pattern to search for within file content.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "filePattern": { "default": "*", "description": "Glob pattern to filter files to search within (e.g., \"*.ts\", \"data/**.json\"). Defaults to searching all files.", "type": "string" }, "maxDepth": { "default": 2, "description": "Maximum directory depth to search recursively. Defaults to 2.", "exclusiveMinimum": 0, "type": "integer" }, "maxFileSize": { "default": 10485760, "description": "Maximum file size in bytes to read for searching. Defaults to 10MB.", "exclusiveMinimum": 0, "type": "integer" }, "maxResults": { "default": 50, "description": "Maximum number of files with matches to return. Defaults to 50.", "exclusiveMinimum": 0, "type": "integer" }, "path": { "description": "Directory path to start the search from.", "type": "string" }, "regex": { "description": "The regular expression pattern to search for within file content.", "type": "string" } }, "required": [ "path", "regex" ], "type": "object" }

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/rawr-ai/mcp-filesystem'

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