Skip to main content
Glama

fs_search

Search sandbox text files for text or regular expressions, with optional path, filename pattern, result limit, and case-sensitivity controls. Use it to locate matching lines in allowed files.

Instructions

在沙箱文本文件中搜索内容。

Args: query: 要查找的文本或正则表达式。 path: 搜索起点,相对于沙箱根目录。 pattern: 文件名过滤模式,例如 "*.py"。 max_results: 最多返回的匹配行数,1-500。 use_regex: 是否把 query 当作正则表达式。 case_sensitive: 是否区分大小写。

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

Input Schema

NameRequiredDescriptionDefault
pathNo.
queryYes
patternNo*
use_regexNo
max_resultsNo
case_sensitiveNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden; it does add the useful scope constraint that only sandboxed *text* files are searched and discloses the max_results cap of 1-500. It says nothing about recursion into subdirectories, result ordering, truncation messaging, or whether the operation is read-only, which leaves real gaps for a mutation-free but potentially expensive scan.

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-line purpose followed by a compact per-argument list — front-loaded and waste-free. The Chinese arg list is slightly redundant with the schema but cheap enough to keep.

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 an output schema present, return-shape explanation is unnecessary, and all six parameters are documented in the description. For a file-search tool this covers what an agent needs to call it correctly; only recursion/ordering details are missing, which are minor against the rich schema coverage the description supplies.

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 0%, but the Args block documents all six parameters: it clarifies that 'path' is relative to the sandbox root, gives a concrete '*.py' example for the pattern filter, and states the 1-500 bound on max_results. That meaning goes beyond the bare schema titles, though query/use_regex/case_sensitive are near-restatements.

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 for content in sandbox text files. It is clearly distinguishable from fs_list, fs_read and fs_write, although it does not explicitly name the sibling it replaces when a user already knows the file.

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?

The description implies usage — a text/regex search across files starting at a path — but never says when to prefer it over fs_read, fs_list, or github_search_code, and offers no prerequisites or exclusions. The scope 'sandbox text files' is the only routing hint.

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