Skip to main content
Glama
GeminiDesk MCP
by LZ7TOP

Change File or Directory Permissions

fs_chmod

Change file or folder permissions to octal modes such as 755 or 644, and optionally apply them recursively to directory contents.

Instructions

修改文件或文件夹的系统权限(如 755、644),可选递归修改目录内容权限。

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": {
      "path": "<path>",
      "mode": "<mode>"
    },
    "name": "fs_chmod"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes八进制权限字符串,如 "755"、"644"、"0700"
pathYes目标文件或文件夹路径
recursiveNo如果是文件夹,是否递归应用权限

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it falls short. It does not say that existing permission bits are overwritten, that a wrong mode can lock the owner out of the file, whether symlinks or special bits are followed, or what the tool returns on success or failure. Only the recursive scope of the change is disclosed.

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 states the action, the mode examples, and the optional recursive scope, with no filler. Its brevity is efficient rather than padded, though it leaves too much unsaid for a mutation tool.

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

Completeness2/5

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

For a write operation that alters security-relevant state with no annotations and no output schema, the description should cover at least failure behavior and the effect on existing permissions. It covers neither, leaving an agent unable to predict the outcome or error handling of a chmod call.

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 schema already documents all three parameters, including the octal string format and the recursive default. The description merely restates the mode examples and the recursive case, adding no syntax or edge-case meaning beyond the schema; baseline 3 applies.

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 names a specific verb (修改/change) and resource (文件或文件夹的系统权限) and gives concrete mode examples (755, 644), so an agent immediately knows this is the chmod-style permission tool. It does not differentiate itself from the sibling fs_chown, which changes ownership rather than permission bits, but the resource is unambiguous.

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 only implied: the tool applies to files or folders, and the recursive flag is flagged as relevant for directories. There is no explicit statement of when to prefer this over fs_chown, no prerequisite about the file existing, and no note that the caller must already own or control the target.

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