search_text

[semantic]

Literal/regex text search over the workspace for comments, strings, config-like text, or non-symbol text. Delegates to the scout universal index (install scout to enable); returns a structured install hint when scout is absent.

Why this tool exists

Literal and regex text hunts (comments, strings, config) need repo-wide coverage that compiler-backed symbol tools do not provide.

How it helps the agent

The model gets scout-backed, ignore-aware, exhaustive text search with paging instead of shell grep, and a structured install hint when scout is missing.

Try it locally in the TGlider playground

Parameters

NameTypeRequiredDescription
querystringYesSearch text or pattern.
useRegexbooleanNoTreat query as a regex (Rust regex dialect via the scout backend). Default is false.
caseSensitivebooleanNoCase-sensitive match. Default is false.
scopejsonNoOptional scope: pathPrefix (workspace-relative) and globs (prefix with ! to exclude).
skipnumberNoPagination offset. Default is 0.
takenumberNoPagination size. Default is 50, maximum 200.
maxLineTextCharsnumberNoMax characters of preview per match. Use 0 for the scout backend's cap. Default is 200.
pathStylestringNoPath style: 'relative' (to the workspace root, default) or 'absolute'.

Examples

Find TODO comments across the workspace

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_text",
    "arguments": {
      "query": "TODO"
    }
  }
}

Response Notes

Returns scout-backed matches (filePath, line, column, preview) with paging (including totalIsFloor), exhaustive, and hints. Errors carry code scout_not_installed with install commands when scout is absent.

↑/↓ NavigateEnter OpenSpace Expand