Skip to main content
Glama

fs_search_text

Read-onlyIdempotent

Search workspace files for literal text or regex patterns and return matching lines with binary skipping, ReDoS protection, and secret redaction.

Instructions

Search for literal text or regular expressions across files in the sandbox workspace root with automatic binary skipping, ReDoS protection, and inline secret redaction.

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": "fs_search_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoRelative directory or file path to scope the search..
queryYesLiteral string or regular expression to search for.
is_regexNoWhether to evaluate query as a regular expression.
max_resultsNoMaximum number of matching lines to return.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds genuinely new behavioral facts beyond that: binaries are skipped automatically, regex input is ReDoS-protected, and secrets are redacted inline. It does not mention result truncation behavior or the output shape, keeping it below a 5.

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 efficiently front-loaded sentence with no filler; the core purpose comes first and the security/behavior traits follow. The trailing feature list is slightly list-like but every clause carries real information.

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?

For a 4-parameter, fully documented read tool with no output schema, most call-critical information is present. However, an agent is not told what a match looks like (file path plus line?), what happens when max_results is hit, or whether the search recurses into subdirectories by default.

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 schema already documents path, query, is_regex, and max_results. The description echoes the literal-vs-regex duality and the workspace-root scoping but adds no syntax, matching-mode, or result-cap semantics beyond the schema. Baseline 3 applies.

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?

States a specific verb ('search') and resource ('literal text or regular expressions across files') bounded to a clear scope ('sandbox workspace root'). It is easy to distinguish from fs_read_file or fs_list_directory, but it never names an alternative or states the boundary explicitly, which keeps it just short of 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 Guidelines2/5

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

The description only implies when to use it via the phrase 'search ... across files'; there is no explicit when-to-use, when-not-to-use, or pointer to a sibling tool. An agent must infer from the name alone that this is the grep-style option rather than reading a file directly.

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