Full-text search in BC AL source code
bc_search_codeSearch AL source code in a branch using regular expressions. Filter results by object type or app folder to narrow down matches.
Instructions
Searches AL source code in a branch using regular expressions (ripgrep). Returns matching lines with optional context. Filter by object_type (file suffix, e.g. "table" → "*.Table.al") or by app (top-level folder). Triggers indexing on first use of a branch (for the worktree).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | Branch name, e.g. "w1-26" | |
| pattern | Yes | Regular expression to search for | |
| object_type | No | Limit to a specific AL object type (table, page, codeunit, ...) | |
| app | No | Limit to a single top-level app folder, e.g. "Base Application" | |
| ignore_case | No | Case-insensitive search. Default false. | |
| max_results | No | Max number of matches (excluding context). Default 50. | |
| context_lines | No | Lines of context to include around each match. Default 2. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | ||
| pattern | Yes | ||
| total_matches | Yes | ||
| matches | Yes | ||
| truncated | Yes |