Skip to main content
Glama

search_text

Read-only

Search approved local project files by text query and return concise line previews, helping you locate relevant matches without opening files.

Instructions

Search bounded project files locally and return concise line previews

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": {
      "path": "<path>",
      "query": "<query>"
    },
    "name": "search_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path under configured approved roots
queryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint=false and destructiveHint=false, so the safety profile is covered. The description adds real context beyond that: search is constrained to approved roots ('bounded'), runs locally, and returns 'concise line previews', implying truncated matches rather than full file content.

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

Conciseness4/5

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

One sentence, front-loaded with the verb and scope, with zero redundant wording. It is arguably too terse for a search tool, but there is no padding or repetition to cut.

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

Completeness3/5

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

With no output schema, the description does at least sketch the return value ('concise line previews'), and the annotations cover safety. Missing for a search tool are query semantics, case sensitivity, result caps, and whether the search is recursive across the tree — all things an agent needs to call it correctly.

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

Parameters2/5

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

Schema coverage is only 50%: 'path' is documented as an absolute path under approved roots, but 'query' carries no description at all, just length bounds. The description says nothing about query syntax (literal vs regex), case sensitivity, or matching behavior, so it does not compensate for the coverage gap.

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 specific verb ('Search') and resource ('bounded project files'), and adds the result shape ('concise line previews'), so an agent can tell it is a content-search tool rather than a single-file reader like read_text_file or read_lines. It stops short of explicitly naming a sibling to contrast with, which keeps it below a 5.

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

Usage Guidelines3/5

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

Usage is implied: 'search bounded project files' signals a grep-like discovery step, which contrasts implicitly with read_text_file/read_lines for single-file reading. However, there is no explicit statement of when to prefer this over run_command or read_lines, and no exclusion conditions or prerequisites beyond the word 'bounded'.

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