Skip to main content
Glama

files__search_file

Search a text file for an exact plain-text string and return numbered matching lines for review.

Instructions

Lines of a text file containing text (plain text, not a pattern), numbered.

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>",
      "text": "<text>"
    },
    "name": "files__search_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
textYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.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 disclosure burden. It does add one genuinely useful behavioral fact — that matching is literal plain text rather than a regex/pattern — and that results are line-numbered. It omits case sensitivity, substring vs. whole-line vs. whole-word matching, encoding/binary handling, and any cap on the number of returned lines, all of which materially change results.

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?

It is a single, economical phrase with no filler, and the most decision-relevant detail (literal, not pattern) is placed inline where it matters. The cost is that it reads as a sentence fragment with no verb, which is a structural weakness rather than verbosity.

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

Completeness2/5

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

An output schema exists, so return-value details are fairly covered, but the description still leaves the agent without case-sensitivity, match-scope, or result-limit information for a search operation — exactly the traits that determine whether the call produces usable output. With zero annotation coverage and zero schema description coverage, the definition is thinner than this tool's ambiguity warrants.

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 0%, so the description must compensate, and it does partially: the parenthetical "plain text, not a pattern" directly clarifies how the `text` argument is interpreted, which is not stated in the schema. The `path` parameter receives no clarification beyond its bare title, and there is no indication of whether it is absolute, workspace-relative, or restricted to certain roots.

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

Purpose3/5

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

The fragment "Lines of a text file containing `text`... numbered" conveys the resource (a text file) and the result shape (matching lines, numbered), so the intent is inferable. However, it never states an explicit verb like search or grep, and it does not differentiate itself from the sibling `files__read_file` or `files__list_files`, leaving the agent to guess why one would pick this over reading the file outright.

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

Usage Guidelines2/5

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

There is no when-to-use guidance at all: nothing says to prefer this over `files__read_file` when hunting for a string, and no prerequisites, exclusions, or alternatives are named. The only hint is the implicit 'search rather than read' framing carried by the tool name itself, not by the description.

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