Grep search
Searches indexed code for exact literal text or a regular expression (set regex to true). First choice when you already know an exact symbol name, string literal, error message, route, or configuration key, and for exhaustive “find every usage” sweeps. It complements semantic_search: embeddings underrepresent rare short tokens such as acronyms (JWT, OIDC), so run grep_search on the exact token alongside a semantic query rather than instead of it.
Authorizations
API Key authentication using Bearer token. Example: "Authorization: Bearer {apiKey}"
Body
Literal string or regex pattern to search for.
Optional success projection. Omit to return both obj and rendered; use json for obj only; use agentic for rendered text only. Repairable errors always return both obj.error and rendered.
json, agentic Repository or workspace names returned by get_data_sources. Omit only when the API key has a single unambiguous scope.
Optional repository-relative path prefixes to include.
Optional file extensions to include, for example cs, ts, or py.
Optional maximum number of search results.
Exclude Markdown files from search results. Default is false.
Set true to treat query as a regular expression. Default is false.
Response
Success envelope. obj.results[] adds grep specifics: matchCount and matches[] with lineNumber, column range, and lineText; rendered is a <grep_search_results> XML block. Repairable failures (missing or invalid arguments, ambiguous or unknown data sources) also return HTTP 200 with obj.error = { code, message, retry, try } and a rendered <tool_error> block; repair the arguments and retry.