Search Lampa source contents
search_codeSearch Lampa source code for a literal or regex pattern and get path:line plus preview. Use when you need to locate a known symbol or pattern without listing files or reading full sources.
Instructions
Search Lampa source contents for a literal or regex and return path:line plus a preview. Use this when you know a symbol or pattern; do not use it to list files by name (find_files), dump catalogs (list_catalog), or read one known path (read_source).
Defaults: literal, case-sensitive match (regex=true compiles RegExp exactly as written — no implicit i); extensions .js/.ts/.css/.scss/.html/.json unless globs is set.
prefix narrows which folder is walked and globs still filters extensions within it — the two combine rather than override each other.
Limits: 100 hits total, 5 per file, 200-char preview per line (fixed, to keep results small enough for one call); invalid regex → error naming the bad pattern; no matches → empty markdown, not an error.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| globs | No | Extension globs to restrict search, e.g. ['*.js','*.ts']. When omitted, searches .js/.ts/.css/.scss/.html/.json. | |
| query | Yes | Literal substring (default, case-sensitive) or regex when regex=true. | |
| regex | No | If true, compile query as a JS RegExp with no extra flags (no implicit case-insensitive). Default false (literal). | |
| prefix | No | Repo-relative folder to walk, e.g. 'src' or 'plugins/iptv'. Combines with globs (prefix walks, globs filter extensions). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| markdown | Yes | Human-readable markdown report. Always present, including empty-result cases. Does not write files. |