Skip to main content
Glama

files/chown

Change a file's or directory's owner and group, with recursive option. Skips symlinks and requires root privileges for ownership changes.

Instructions

Changes a file's or directory's owner and/or group (chown). Never follows symbolic links: a path containing a symlink in any component is refused, and recursive changes skip symlinks and report them. Changing the owner requires privileged: true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path
ownerYesuser, user:group, :group, or user: (the user's login group); names or numeric ids
recursiveNoAlso apply to everything below a directory (symlinks are skipped, never followed)
privilegedNoRun as root - required to change ownership

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden. It discloses the critical symlink policy (refusing paths with symlinks, skipping and reporting recursive symlinks) and the privileged requirement. This goes well beyond a bare statement of purpose and covers the most likely failure/edge cases for a chown operation.

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 three sentences with no filler. It front-loads the core action, then states the critical symlink policy and the privilege requirement. Every sentence contributes useful information.

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 mutation tool with no annotations and no output schema, the description covers the essential operational context: purpose, privileges, and symlink handling. It does not describe return values or error handling beyond symlink reporting, but for a typical filesystem command this is sufficient to call it correctly.

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?

The schema description coverage is 100%, so the schema already documents all parameters, including the owner format and recursive behavior. The description mostly restates the symlink behavior already present in the schema and does not add substantial new meaning to individual parameters. A baseline of 3 is appropriate.

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 verb 'Changes' and the resource 'file's or directory's owner and/or group', calling out 'chown' directly. This differentiates it from sibling tools like files/chmod (permissions) and files/update (content), so an agent can easily select it.

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 usage context: it warns that symbolic links are never followed and that changing the owner requires privileged: true. These are important prerequisites and behavioral constraints. It doesn't explicitly mention when to prefer this over files/chmod, but the operation is distinct enough that this is not a major gap.

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