grep_docs
Search across documentation markdown using regex. Use after search_docs fails; retrieves every occurrence of literals like env vars, config keys, or flags.
Instructions
Regex search over the raw documentation markdown. Use search_docs first.
This is the last resort, not the first move. It returns raw matching lines, so it costs several times what a search costs and gives you no ranking — an unscoped grep for a common term burns ~1.5k tokens and still hits its cap.
Symbols are NOT a reason to come here: AGENTS.md, PreToolUse and
--flag-name all match in search_docs. Come here only when search_docs
missed, or when you need every occurrence of a literal — an env var, a
config key, a flag — rather than the best passages about it.
pattern is a Python regex. Pass source unless you truly want all of them.
Indexed sources: claude-code (Claude Code), codex (OpenAI Codex), cursor (Cursor), opencode (opencode), xai (xAI / Grok).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | No | One of: claude-code (Claude Code), codex (OpenAI Codex), cursor (Cursor), opencode (opencode), xai (xAI / Grok) | |
| pattern | Yes | ||
| ignore_case | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |