Skip to main content
Glama

Search files

search_files
Read-only

Searches file contents with a regular expression (ripgrep). Returns path:line: text.

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": {
      "projectId": "<projectId>",
      "pattern": "<pattern>"
    },
    "name": "search_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
globNo
patternYes
projectIdYesProject id from list_projects
ignore_caseNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior3/5

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

The annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value with the return format ("path:line: text") since there is no output schema, but it says nothing about result limits, scope (whole project vs. glob-restricted), or matching-preview truncation.

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?

Two short sentences, front-loaded with purpose and followed by the return format. Nothing is padded and every clause carries 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 read-only search tool with no output schema, the description covers the essentials: what it matches and what it returns. It falls short on the two undocumented optional parameters (glob scoping, ignore_case) and on any note about result volume, which an agent needs to invoke it confidently.

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 25% — just projectId is documented. The description partially compensates by identifying the pattern as a ripgrep-style regular expression, which is meaningful syntax guidance, but glob and ignore_case are left entirely undocumented in both schema and description.

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 ("searches file contents") plus the mechanism (regular expression / ripgrep) and the return shape. It is clear what the tool does, but it never contrasts itself with obvious siblings such as list_files or read_file, so differentiation is left to the agent's inference.

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 explicit when-to-use or when-not-to-use guidance, no prerequisites, and no pointers to alternatives. An agent can only infer from the name and the words "file contents" that this is content search rather than the name/path listing offered by list_files.

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