Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Fast Code & Content Search

fs_search_content

Search directory code and text content for strings or regex patterns, returning precise file, line, column, and context matches.

Instructions

高速搜索目录内代码与文本内容(优先使用 ripgrep 加速,自动回退并发遍历),返回精确文件、行号、列号与上下文行。

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": {
      "directory": "<directory>",
      "query": "<query>"
    },
    "name": "fs_search_content"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYes搜索文本或正则表达式
isRegexNo是否按正则表达式匹配
directoryYes搜索起始目录
extensionsNo可选扩展名过滤,如 ["ts", "js"]
maxResultsNo最大返回匹配条数
excludeDirsNo额外排除的目录名
contextLinesNo每条匹配附带的上下文行数
caseSensitiveNo是否区分大小写
includeHiddenNo是否包含隐藏目录与文件

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.2/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It does disclose a meaningful implementation trait (ripgrep acceleration with automatic fallback to concurrent traversal) and the return fields (file, line, column, context lines). It omits permissions, performance/limits behavior, and what happens on zero matches or invalid regex.

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?

A single front-loaded sentence with no filler, covering purpose, execution mechanism, and return shape. It is efficient, though it leaves out usage routing that could have been added at little cost.

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 nine-parameter search tool with no output schema, the description at least sketches the return fields and the implementation strategy, which is useful. However, the absence of any when-to-use guidance against fs_search and the lack of error/empty-result behavior leaves real gaps for an agent choosing between search tools.

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 100%, so every one of the nine parameters is already documented in the schema, including defaults and bounds. The description adds no parameter meaning beyond that, which is the expected baseline when the schema does the work.

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?

The description states a specific verb and resource — search code and text content within a directory — and adds execution traits (ripgrep with concurrent-walk fallback) plus return shape. It does not explicitly distinguish itself from the sibling fs_search, so an agent must infer that fs_search is likely name/path based while this one matches content.

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 statement of when to use this versus fs_search, fs_read_file, or fs_tree, and no prerequisites or exclusions. The only guidance is implied by 'search code and text content', which is not enough to route between the two search tools.

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