files.search
Schema
Input = { query: string, // substring, or /regex/ with flags path?: string, // sub-folder to search maxResults?: number, // 1-500, default 50 extensions?: string[], // restrict content search to these extensions; [] = all text files contents?: boolean, // default true — also grep inside files, not just names maxFileBytes?: number, // 1024-5000000, default 1000000}
Output = { query: string, matches: Array<{ path: string, kind: 'name' | 'content', line?: number, preview: string }>, scanned: number, truncated: boolean,}query doubles as a plain substring or a /pattern/flags regex (case-insensitive by default) — the
skill detects the /.../ shape automatically and falls back to substring matching if the regex
doesn’t compile. Binary-looking files are skipped for content search regardless of extension
filters.
Example
curl -s -X POST http://localhost:4000/api/studio/skills/invoke \ -H 'content-type: application/json' -b cookies.txt \ -d '{"name":"files.search","input":{"query":"TODO","extensions":["ts","tsx"]}}'{ "ok": true, "output": { "query": "TODO", "matches": [{ "path": "apps/api/src/index.ts", "kind": "content", "line": 42, "preview": "// TODO: paginate this" }], "scanned": 118, "truncated": false }}