Skip to main content
Glama

Search files

fs_search
Read-onlyIdempotent

Search the project's code for a regular expression (ripgrep, case-smart). Returns matching lines with file and line number (about 100 characters either side of a match in a long line), as many whole matches as fit one answer; when there are more it says the offset to continue from. Dependency and build directories are skipped. env production searches the live site's files, read-only.

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": {
      "project": "<project>",
      "pattern": "<pattern>"
    },
    "name": "fs_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNopreview (default), or production: the live site's files, read-only (its code as published plus its own /data), for the project's owner and editors.preview
globNoOnly files matching this glob, e.g. "*.ts".
pathNoDirectory to search, e.g. "workspace/src".workspace
offsetNoSkip this many matches: the offset a previous search said to continue from.
patternYes
projectYesProject slug or id.

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 cover the safety profile (readOnly, idempotent, non-destructive), yet the description still adds real behavior: returned matches include file and line number with ~100 characters of surrounding context, results are truncated with a continuation offset, and production is read-only. It does not mention match limits, regex flavor caveats, or error behavior when the glob is malformed.

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?

Front-loaded with purpose and every clause carries information (engine, return shape, pagination, directory exclusions, production mode) with no filler. It is somewhat dense and run-on across semicolons, which slightly hurts scanability.

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

Completeness5/5

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

With no output schema, the description carries the return-format burden and does so fully: match lines, file/line location, context width, truncation and continuation via offset. Combined with 83% schema coverage on six parameters, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so the baseline is 3, but the description adds meaning by tying the pagination contract directly to the offset parameter ("the offset to continue from") and clarifying that env=production searches the live site read-only, beyond its enum description.

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?

"Search the project's code for a regular expression (ripgrep, case-smart)" names a specific verb, resource, and underlying engine, which distinguishes it from read/list siblings like fs_read and fs_list that return file contents rather than matching lines.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the description makes clear this is for pattern search and that dependency/build directories are skipped, but it never says when to prefer it over fs_read/fs_list or what happens when no matches are found.

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