search_files
Search for text across all files in an app. Returns matching lines grouped by file with line numbers. Skips node_modules, .git, and binary files. Max 500 results by default.
Supports grep-like options: context lines (-A/-B/-C), file glob filtering (e.g. ".ts", "src/**/.ts"), and output modes (content, files_with_matches, count).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| app | Yes | App ID (UUID) or subdomain | |
| glob | No | File pattern filter, e.g. "*.ts", "src/**/*.ts", "**/*.{ts,js}". Matches against relative file paths. | |
| query | Yes | Text or regex pattern to search for | |
| regex | No | Treat query as a regular expression (default: false) | |
| context | No | Lines of context before AND after each match (like grep -C). Max 10. | |
| maxResults | No | Maximum number of matches to return (default: 500) | |
| outputMode | No | Output mode: "content" (default, returns matching lines), "files_with_matches" (returns file paths only), "count" (returns match count per file). | |
| contextAfter | No | Lines of context after each match (like grep -A). Max 10. | |
| caseSensitive | No | Case-sensitive search (default: false) | |
| contextBefore | No | Lines of context before each match (like grep -B). Max 10. |