Skip to main content
Glama

find_text

Search indexed file content for literal text, comments, strings, and TODOs that symbol search misses; returns matching lines with optional surrounding context.

Instructions

Full-text search across indexed file content. Finds comments, strings, TODOs, and literal text that symbol search misses. Returns matching lines with optional surrounding context.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "find_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoNoFilter to a specific repository (as shown in list_repos)
queryYesSearch query (name, keyword, or description)
max_resultsNoMaximum results to return
file_patternNoGlob pattern to filter by file path (e.g., 'src/**/*.py')
context_linesNoNumber of surrounding lines to include

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.10.2

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It discloses the return shape ('matching lines with optional surrounding context') but says nothing about result ordering, matching semantics (regex vs literal), or pagination behavior for a tool that can return up to 1000 results.

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?

Three short sentences, front-loaded with what the tool does, then what makes it distinct, then what it returns. No redundant or filler wording.

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

Completeness4/5

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

Five well-documented parameters and a stated return shape cover most of what an agent needs, and no output schema exists to offload that. The remaining gap is query semantics — whether the query is treated as literal, keyword, or pattern — which matters for a search tool.

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

Parameters3/5

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

Schema description coverage is 100%, so the baseline is 3. The description only echoes the optional context-lines behavior already documented in the schema and adds no detail on file_pattern or repo scoping beyond what is structured.

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

Purpose4/5

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

The description names a concrete verb and resource ('Full-text search across indexed file content') and scopes it to literal text, comments, strings and TODOs. It distinguishes itself from symbol search without naming the sibling tool outright, which is enough for an agent to tell it apart from find_code.

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

Usage Guidelines4/5

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

Usage context is clear: reach for this when looking for literal text that symbol search misses. There are no explicit exclusions or named alternative tools, so it stops short of a full when/when-not/alternatives treatment.

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