Skip to content

FindRequest

Request for finding files with optional glob pattern and content search. Designed for AI agents that need to explore and search filesystems efficiently.

Kind: an object, used in requests.

FieldTypeRequiredDescription
pathstringStarting directory path. Defaults to ”/” (root).
patternstring | nullGlob pattern to match files (e.g., ”/*.cs”, “src//*.ts”). Supports *, **, ?, [abc], {a,b} patterns.
grepstring | nullSearch pattern for file contents. If specified, only files containing this pattern are returned.
grepModestringHow to interpret the grep pattern: “literal” (default) or “regex”.
ignoreCasebooleanCase-insensitive search for grep. Default false.
contextLinesintegerNumber of lines before and after each grep match to include as context.
includePreviewbooleanIf true, include a preview of each file’s content (first N lines).
previewLinesintegerNumber of lines to include in preview. Default 30.
maxResultsintegerMaximum number of results to return. Default 100.
maxDepthintegerMaximum recursion depth. Default -1 (unlimited).
typestringFilter by entry type: “file”, “directory”, or “all”. Default “file”.
includeHiddenbooleanInclude hidden files/directories (starting with .). Default false.
{
"path": "...",
"pattern": "...",
"grep": "...",
"grepMode": "...",
"ignoreCase": false,
"contextLines": 0,
"includePreview": false,
"previewLines": 0,
"maxResults": 0,
"maxDepth": 0,
"type": "...",
"includeHidden": false
}