Skip to main content
Glama

files/chmod

Change file or directory permission bits (chmod) with safety: refuses symlinks, supports octal and symbolic modes, recursive option, and optional root privilege for files you don't own.

Instructions

Changes a file's or directory's permission bits (chmod). Never follows symbolic links: a path containing a symlink in any component is refused, and recursive changes skip symlinks and report them. Numeric modes follow GNU chmod semantics (on directories a 4-digit mode keeps setuid/setgid; use 5 digits, e.g. 00755, to set them exactly).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeYesOctal (644, 0755, 4755) or symbolic (u+x, go-w, a=r, +X, u+s, +t; comma-separated)
pathYesAbsolute path
recursiveNoAlso apply to everything below a directory (symlinks are skipped, never followed)
privilegedNoRun as root - needed for files you don't own

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses that symlinks are never followed, recursive operations skip and report symlinks, and numeric modes follow GNU chmod semantics with the 4-digit vs 5-digit setuid/setgid distinction. Minor vagueness remains in what 'report them' means, but the key behavioral traits are disclosed.

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?

Three sentences, each earning its place: the first defines the operation, the second covers the critical symlink behavior, and the third clarifies numeric mode semantics. Information is front-loaded and there is no fluff.

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

Completeness4/5

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

For a tool with no annotations and no output schema, the description covers the essential operational semantics: purpose, symlink handling, and mode interpretation. It could add what 'report them' means or clarify error behavior, but an agent has enough to invoke the tool correctly.

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 100%, so the baseline is 3. The description adds valuable semantic detail beyond the schema, especially the GNU chmod numeric mode behavior and the 5-digit mode example for setting setuid/setgid exactly. Other parameters like path, recursive, and privileged are already well-described in the schema.

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?

States a specific verb and resource: changes permission bits of a file or directory. The parenthetical 'chmod' and the focus on permission bits clearly distinguish it from sibling tools like files/chown (ownership) and files/update (content/settings).

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 clearly conveys when to use the tool: when permission bits need changing, including recursive application. It does not explicitly name alternatives or exclusions, but the context is unambiguous enough for an agent to select it correctly.

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