Skip to main content
Glama

Search files

search_files
Read-onlyIdempotent

Finds text in a file or folder, returning file:line matches with optional context; use file masks or regex to narrow results and skip heavy or binary files by default.

Instructions

Search text in one file or across the files of a folder on this computer (path may point to either). Returns file:line matches with optional surrounding context. Heavy folders (node_modules, .git, dist, build, ...) are excluded by default, binary files are skipped. Use include ('*.ts') to narrow by file mask and regex=true for regular expressions. Always reports the true match count.

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

Input Schema

NameRequiredDescriptionDefault
noteNoShort human-readable explanation (1 line, in the user's language) of what you are about to do and why. Shown to the user on the approval card. Always provide when calling mutating tools.
pathNo
agentNoShort consistent identifier or display name of this agent (e.g. 'Claude · Лендинг', 'Тесты', 'Мой агент'). Used to separate tasks and route tray messages when multiple agents work in parallel.
queryYes
regexNo
includeNo
ignoreCaseNo
maxResultsNo
contextLinesNo
includeIgnoredNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), so the bar is lower, and the description still adds real behavior: default exclusion of node_modules, .git, dist and build, skipping of binary files, and the guarantee that the true match count is always reported rather than a truncated count. These are non-obvious defaults an agent could otherwise be surprised by. It does not mention truncation/interaction between maxResults and the 'true match count' claim.

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?

Four dense sentences, front-loaded with the scope of the search before the return format, then defaults, then parameter hints. Every sentence carries new information and there is no filler or repetition of the title.

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?

There is no output schema, and the description does well to describe the return format and match-count behavior. But with 10 parameters at 20% schema coverage, several inputs (maxResults, ignoreCase, includeIgnored) remain undocumented anywhere, which is a gap for a tool with this many knobs. It is adequate but not complete.

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 coverage is only 20% (10 params, only note and agent documented), so the description must compensate and it does partially: it explains path (file or folder), query, include, regex, and implies contextLines via 'optional surrounding context' and includeIgnored via 'excluded by default'. However, maxResults and ignoreCase are left entirely unexplained in both schema and description. That is meaningful compensation but with clear remaining gaps.

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 and resource ('Search text in one file or across the files of a folder') and clarifies that path may point to either a file or a folder, which resolves the main ambiguity. It also specifies the return shape (file:line matches with optional context), so the agent knows what it gets back. It does not explicitly distinguish itself from siblings like read_file or list_directory, keeping 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 Guidelines4/5

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

Gives concrete usage context: heavy folders are excluded by default, binary files skipped, and it tells the agent to use include ('*.ts') to narrow by mask and regex=true for regular expressions. That is clear operational guidance for calling it well. It stops short of stating when to prefer this over read_file or list_directory, and it never explains when to set includeIgnored.

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