Skip to main content
Glama
linhanhan227

Python MCP Toolkit Server

by linhanhan227

file_operation

Create, read, update, delete, and search files and directories within the MCP workspace.

Instructions

在 MCP_WORKSPACE 内执行文件操作;写入、复制、移动、删除需要 MCP_ALLOW_WRITE=true。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes文件操作类型:list/info/read/read_lines/write/append/replace/mkdir/copy/move/delete/find/grep。
pathNoMCP_WORKSPACE 内的文件或目录路径。.
contentNowrite/append 操作写入的文本内容;replace 操作中表示查找文本。
destinationNocopy/move 操作的目标路径,必须在 MCP_WORKSPACE 内。
replacementNoreplace 操作使用的替换文本。
queryNogrep 操作使用的正则表达式;也可作为 replace 的查找文本。
patternNofind/grep 使用的 glob 文件匹配模式。*
recursiveNolist/delete 操作是否递归处理目录。
overwriteNowrite/copy/move 目标已存在时是否覆盖。
include_hashNoinfo 操作是否计算普通文件 SHA-256。
regexNoreplace 操作是否按正则表达式查找。
case_sensitiveNogrep 操作是否区分大小写。
start_lineNoread_lines 从第几行开始读取,行号从 1 开始。
max_linesNoread_lines 最多返回行数,实际限制在 1 到 1000。
max_charsNoread 最多返回字符数,实际限制在 1 到 MCP_MAX_FILE_BYTES。
max_entriesNolist/find/grep 最多返回条目数,实际限制在 1 到 1000。
countNoreplace 最多替换次数;0 表示全部替换。

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It only mentions the write permission requirement, but fails to describe error handling, side effects, idempotency, or safety for other operations. This is insufficient.

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 a single sentence that conveys the essential purpose and a key behavioral constraint. It is efficiently front-loaded with the scope and permission condition.

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?

Despite the complexity (17 parameters, 13 actions), the description is minimal. It covers the workspace scope and write permission but lacks details on typical use cases, return values (though output schema exists), or guidance on action selection. The schema covers parameter details, but the context is sparse.

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 description coverage is 100%, so the baseline is 3. The tool description does not add extra meaning beyond the schema; it only mentions the write requirement which is already implied by the action enum.

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?

Description clearly states the tool executes file operations within MCP_WORKSPACE, distinct from sibling tools (agent, web_search). The verb 'execute file operations' and resource 'MCP_WORKSPACE' are specific.

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?

Description indicates that write/copy/move/delete operations require MCP_ALLOW_WRITE=true, providing clear context. No explicit exclusions or alternatives are needed given sibling tools are unrelated.

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/linhanhan227/termux-mcp'

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