Tool · Grok Build · xAI

grep

grok-build/grepCode search · primarysource@72a61251fcffchecked 2026-09-05
What matters here1 of 3 invariants hold · 2 unverified

The facts the registry marks decision-changing, with how the other implementations answered. An invariant may be shown as pass/fail; a design choice never is, however unusual it looks.

Description, as the model sees it

Not recorded yet — the verbatim description has not been captured for this tool.

Registered schema

Not recorded yet — the schema as registered has not been captured for this tool.

Observed · Code search

compare all →
FactThis toolAcross all implementations
Shape3 of 3 recorded
What it searchesby-contentsrclike 9 of 20by-name ×9 · both ×1 +1
Tools per harnesstwo toolssrc
grep for contents, list_dir for names — but list_dir walks a tree rather than matching a pattern, so there is no glob half here.
like 18 of 20no search tool ×1 · one tool ×1
Search enginebundled ripgrepsrclike 6 of 19ripgrep ×2 · bundled fd ×1 +101 unverified
Query language2 of 2 recorded
Regex dialectRust regexsrc
The description tells the model to escape literal specials and gives two worked examples, which is the only place in this survey where the dialect's sharp edges are explained to the caller rather than left to be discovered.
like 8 of 11varies by backend: Rust regex, git grep, POSIX, or JS RegExp ×1 · varies by backend: Rust regex, POSIX, or Python re ×1 +1
Case sensitivitysensitive, model can asksrclike 3 of 6always insensitive, not configurable ×2 · whatever is on the machine ×113 unverified
Result shape3 of 4 recorded
Line numbers in resultsN: under a path headingsrc
--heading groups matches by file; ':' marks a match line and '-' a context line.
only one of 11Line N: ×3 · path:N: ×2 +5
Result caphead limit, mode-dependentsrc
A per-mode default the model can raise up to a hard ceiling; also a 2000-character line cap and a 10,000-file ceiling.
only one of 20100 files ×4 · 100 matches ×3 +10
Announces truncationinvariantholdssrc
Capped results report "at least" counts rather than a total, because ripgrep is killed early and the true figure is not known. It is also the only implementation here that reads one line past the budget specifically so an exact-fit result is not mislabelled as truncated.
all 18 hold1 unverified
How "no matches" reads?17 others recordedsentence ×16 · empty stdout ×13 unverified
Agreement with read0 of 2 recorded
Search line N is read line Ninvariant?
The grep half is 1-indexed; Grok Build's read tool has not been read from source, so the pair has not been checked.
6 of 7 holdtrue ×6 · false ×12 unverified
Search counts as having read?2 others recordedno read tracking at all ×1 · yes — matched files are recorded as partial reads ×19 unverified
Scope1 of 3 recorded
Respects .gitignoreyes, model can overridesrc
The description tells the model how: pass a broad glob such as '--glob *'.
only one of 18yes ×8 · no, deliberately ×2 +52 unverified
Searches hidden files?14 others recordedyes ×7 · yes, except .git ×3 +36 unverified
Binary content never enters contextinvariant?2 of 3 holdtrue ×2 · false ×18 unverified
Ordering1 of 1 recorded
Result orderingripgrep traversal ordersrclike 5 of 16modification time, newest first ×5 · bounded discovery order; newest-first on request ×1 +54 unverified

Other tools in Grok Build

names verbatim, as registered