Skip to main content
Glama

Search in files

files_search
Read-onlyIdempotent

Search the text of the project for a string or regex, like grep. Returns matching lines with their file and line number. Use it to find where something is defined or used instead of reading files one by one.

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": {
      "id": "<id>",
      "query": "<query>"
    },
    "name": "files_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYes
globNoOnly files whose name matches, e.g. '*.php' or '*.{ts,js}'. Omit to search every text file.
pathNoLimit the search to this directory, or to a single file. Defaults to the whole volume.
queryYesText to find, or a regular expression when regex is true.
regexNoTreat query as a JavaScript regular expression. Default false.
maxResultsNoDefault 100.
caseSensitiveNoDefault false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/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 value beyond that by disclosing the return shape ('matching lines with their file and line number'), which matters because there is no output schema. It does not mention result truncation or how binary/large files are handled, which keeps it from 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.

Conciseness5/5

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

Three short sentences, front-loaded with the core action, then the return value, then the usage rule. Every sentence carries distinct information and nothing is repeated from the schema.

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?

For a 7-parameter read tool with no output schema, the description covers purpose, return shape, and usage guidance adequately. The remaining gap is behavioral edge cases such as result caps and non-text file handling, which an agent would benefit from knowing but which are partly implied by the schema's maxResults 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 86%, so the schema already documents glob, path, query, regex, maxResults, and caseSensitive with examples and defaults. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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

Purpose5/5

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

States a specific verb and resource ('search the text of the project for a string or regex') and anchors it with a familiar analogy ('like grep'). It also distinguishes itself from the read-one-file-at-a-time approach, so an agent can tell it apart from files_read without opening either schema.

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 explicit when-to-use guidance: 'find where something is defined or used instead of reading files one by one.' That is a clear routing rule against the most likely alternative. It stops short of naming other search-ish siblings (docs_search, files_outline) or stating when not to use it, so it is not a full 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources