Skip to main content
Glama

search_text

Read-onlyIdempotent

Perform full-text search across indexed files using regex, glob patterns, and language filters to locate strings, comments, TODOs, config values, or error messages.

Instructions

Full-text search across all indexed files. Supports regex, glob file patterns, language filter. Use for finding strings, comments, TODOs, config values, error messages — anything not captured as a symbol. For symbol search (functions, classes) use search instead. Read-only. Returns JSON: { matches: [{ file, line, text, context }], total_matches }. Set grouping: "by_file" to deduplicate file paths in results with many hits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch string or regex pattern
is_regexNoTreat query as regex (default false)
file_patternYesGlob filter, e.g. "src/**/*.ts"
languageNoFilter by language (e.g. "typescript", "python")
max_resultsNoMax matches to return (default 50)
context_linesNoLines of context before/after each match (default 0 — set higher if you need surrounding code)
case_sensitiveNoCase-sensitive search (default false)
timeout_msNoWall-clock budget in milliseconds. Catastrophic-backtracking regex cannot pin a worker beyond this. Default 2000. Set 0 to disable.
groupingNoPayload shape. "flat" returns a single matches[] array (default). "by_file" groups hits under each file — saves tokens on long paths with many hits.flat
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, and the description reaffirms 'Read-only' and details the return JSON structure. It also explains timeout behavior and grouping effect, adding value beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and well-structured: first sentence summarizes purpose, then differentiates from sibling, then provides details and return format. Every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite complexity (9 parameters, no output schema), the description covers return format, usage guidance, parameter tips, and behavioral traits. No gaps remain; the agent can confidently invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds meaningful extra guidance for parameters like 'grouping' (saves tokens), 'timeout_ms' (backtracking), and 'context_lines' (surrounding code), justifying a 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it performs full-text search across all indexed files and distinguishes from symbol search by naming the sibling 'search' explicitly. It lists supported features and use cases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly tells when to use (finding strings, comments, etc.) and when not to (symbol search, directing to 'search' instead). It provides concrete examples and alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolai-vysotskyi/trace-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server