Skip to main content
Glama
AndersHsueh

AX Local Operations MCP Server

by AndersHsueh

file_search

Read-onlyIdempotent

Search file contents within directories using regex patterns, with file type filtering, depth limits, timeout controls, and ignore patterns for targeted results.

Instructions

文件内容搜索:在目录中搜索匹配正则表达式的内容。支持文件类型过滤、深度限制、超时控制和忽略模式。

示例:搜索 JS 文件中的函数定义 { "search_path": "src", "pattern": "function\s+\w+", "file_types": "js,ts" } 示例:忽略 node_modules 搜索 { "search_path": ".", "pattern": "TODO", "ignore": ["node_modules", "*.log"] }

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_pathYes搜索起始目录路径
patternYes正则表达式搜索模式
file_typesNo逗号分隔的文件扩展名列表,如 "js,ts,json"
case_sensitiveNo是否区分大小写搜索
max_resultsNo最大结果数量,超过会截断,默认100
max_depthNo最大递归深度,0表示不递归,默认8
timeout_msNo超时时间(毫秒),防止命令长时间阻塞,默认60000
ignoreNo要忽略的文件/目录模式列表,支持通配符如 "*.log"、"node_modules"
output_formatNo输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
matchesNo匹配数量
resultsNo搜索结果
timed_outNo是否超时
truncatedNo结果是否被截断
Behavior4/5

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

The description adds valuable behavioral context beyond what annotations provide. While annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=false, the description reveals practical constraints: '超时控制' (timeout control) for preventing long blocks, '深度限制' (depth limits) for recursion control, and '忽略模式' (ignore patterns) for filtering. This gives the agent important operational context not captured in annotations.

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?

The description is perfectly structured and concise. The first sentence clearly states the core purpose, followed by bullet-point style features, then two practical examples that demonstrate different use cases. Every sentence earns its place by providing either essential functionality explanation or concrete usage guidance.

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?

Given the tool's complexity (9 parameters, regex search functionality), rich annotations (4 hints), and the existence of an output schema, the description is complete enough. It covers the core purpose, key features, and provides practical examples. With output schema handling return values and annotations covering safety/behavioral hints, the description focuses appropriately on usage guidance rather than repeating structured information.

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?

With 100% schema description coverage, the input schema already documents all 9 parameters thoroughly. The description doesn't add significant semantic meaning beyond what's in the schema - it mentions the same capabilities (file type filtering, depth limits, timeout control, ignore patterns) but doesn't provide additional syntax, format details, or usage nuances. This meets the baseline 3 for high schema coverage.

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?

The description clearly states the tool's purpose with specific verbs ('文件内容搜索' - file content search) and resources ('在目录中搜索匹配正则表达式的内容' - search in directories for content matching regular expressions). It distinguishes from sibling tools like file_edit (editing) or file_operation (general operations) by focusing specifically on content pattern matching within files.

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?

The description provides clear context through two usage examples showing when to use this tool (searching JS files for function definitions, searching for TODOs while ignoring certain directories). However, it doesn't explicitly state when NOT to use this tool or name specific alternatives among siblings, though the examples imply it's for content pattern matching rather than file operations like file_archive or file_permissions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AndersHsueh/Ax-LocalTools-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server