Skip to main content
Glama

Project Explorer MCP Server

search_files

Search files for patterns with regex, file type filtering, size constraints, and date filters. Exclude comments or string literals for cleaner code searches. Results can be formatted as text, JSON, or structured output with configurable sorting and grouping options.

Instructions

Advanced file and code search tool with comprehensive filtering and matching capabilities. Searches for patterns in files within allowed directories with support for regex patterns, file type filtering, size constraints, date filtering, and content preprocessing. When called without arguments, searches for common patterns in the current directory. Supports excluding comments and string literals for cleaner code searches. Results can be formatted as text, JSON, or structured output with configurable sorting and grouping options.

Input Schema

NameRequiredDescriptionDefault
caseSensitiveNoWhether search should be case sensitive
excludeCommentsNoWhether to exclude comments from search (language-aware)
excludeExtensionsNoArray of file extensions to exclude
excludePatternsNoArray of filename patterns to exclude (supports simple wildcards)
excludeStringsNoWhether to exclude string literals from search
extensionsNoArray of file extensions to include (e.g., ['.js', '.ts', '.py']). Include the dot prefix
followSymlinksNoWhether to follow symbolic links
groupByFileNoWhether to group results by file
includeBinaryNoWhether to search in binary files
maxDepthNoMaximum directory recursion depth. Unlimited if not specified
maxResultsNoMaximum number of match results to return
maxSizeNoMaximum file size in bytes
minSizeNoMinimum file size in bytes
modifiedAfterNoOnly include files modified after this date (ISO 8601 format)
modifiedBeforeNoOnly include files modified before this date (ISO 8601 format)
multilineNoWhether to enable multiline regex matching
outputFormatNoOutput format for resultstext
patternNoSearch pattern - can be literal text or regex depending on regexMode. Defaults to searching for common file types if not specified.*
regexModeNoWhether to treat pattern as a regular expression
searchPathNoDirectory path to search in. Must be within allowed directories. Defaults to first allowed directory if not specified
snippetLengthNoLength of text snippet around matches
sortByNoHow to sort the resultsrelevance
wordBoundaryNoWhether to match whole words only

Input Schema (JSON Schema)

{ "properties": { "caseSensitive": { "default": false, "description": "Whether search should be case sensitive", "type": "boolean" }, "excludeComments": { "default": false, "description": "Whether to exclude comments from search (language-aware)", "type": "boolean" }, "excludeExtensions": { "description": "Array of file extensions to exclude", "items": { "type": "string" }, "type": "array" }, "excludePatterns": { "description": "Array of filename patterns to exclude (supports simple wildcards)", "items": { "type": "string" }, "type": "array" }, "excludeStrings": { "default": false, "description": "Whether to exclude string literals from search", "type": "boolean" }, "extensions": { "description": "Array of file extensions to include (e.g., ['.js', '.ts', '.py']). Include the dot prefix", "items": { "type": "string" }, "type": "array" }, "followSymlinks": { "default": false, "description": "Whether to follow symbolic links", "type": "boolean" }, "groupByFile": { "default": true, "description": "Whether to group results by file", "type": "boolean" }, "includeBinary": { "default": false, "description": "Whether to search in binary files", "type": "boolean" }, "maxDepth": { "description": "Maximum directory recursion depth. Unlimited if not specified", "type": "integer" }, "maxResults": { "default": 100, "description": "Maximum number of match results to return", "type": "integer" }, "maxSize": { "description": "Maximum file size in bytes", "type": "integer" }, "minSize": { "description": "Minimum file size in bytes", "type": "integer" }, "modifiedAfter": { "description": "Only include files modified after this date (ISO 8601 format)", "type": "string" }, "modifiedBefore": { "description": "Only include files modified before this date (ISO 8601 format)", "type": "string" }, "multiline": { "default": false, "description": "Whether to enable multiline regex matching", "type": "boolean" }, "outputFormat": { "default": "text", "description": "Output format for results", "enum": [ "text", "json", "structured" ], "type": "string" }, "pattern": { "default": ".*", "description": "Search pattern - can be literal text or regex depending on regexMode. Defaults to searching for common file types if not specified", "type": "string" }, "regexMode": { "default": false, "description": "Whether to treat pattern as a regular expression", "type": "boolean" }, "searchPath": { "description": "Directory path to search in. Must be within allowed directories. Defaults to first allowed directory if not specified", "type": "string" }, "snippetLength": { "default": 50, "description": "Length of text snippet around matches", "type": "integer" }, "sortBy": { "default": "relevance", "description": "How to sort the results", "enum": [ "relevance", "file", "lineNumber", "modified", "size" ], "type": "string" }, "wordBoundary": { "default": false, "description": "Whether to match whole words only", "type": "boolean" } }, "required": [], "type": "object" }
Install Server

Other Tools from Project Explorer MCP 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/MausRundung362/mcp-explorer'

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