Skip to main content
Glama

adb_file_chmod

Change file or directory permissions on an Android device using an octal mode, with optional recursive, depth-protected application and root shell support.

Instructions

Change file permissions on the device. Mode must be a valid octal string (e.g., '755', '644', '600'). Recursive mode uses depth-based protection: refuses at depth ≤ 2 from root. Note: sdcardfs/FUSE ignores Unix permissions — file access on /sdcard is controlled by Android's package ownership model.

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": "adb_file_chmod"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYesOctal permission mode (e.g., '755', '644', '0600')
pathYesFile or directory path
rootNoUse root shell (typically required for chmod)
deviceNoDevice serial
recursiveNoApply recursively to directory contents. Depth-protected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changedv1.1.3
    • removedInput schema / additionalProperties
      Removed value: -false
  3. First observedv1.1.1

TDQS

A4/5.0
Behavior4/5

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

No annotations exist, so the description carries the full behavioral burden and does meaningful work: it discloses a safety guard ('refuses at depth ≤ 2 from root') and a silent-failure filesystem caveat (/sdcard, sdcardfs/FUSE). It doesn't describe the failure/return shape on permission errors or that root is typically required, leaving some behavioral gaps.

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?

Three sentences, front-loaded with the core action, then the mode constraint, then the recursive guard and the filesystem caveat. The mode sentence duplicates the schema pattern/examples and is the one line that doesn't fully earn its place.

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 mutating 5-parameter tool with no annotations and no output schema, the description covers the format constraint, recursive safety semantics, and the environment caveat where the operation silently does nothing. Remaining gaps — root requirement and error behavior — are either in the schema or minor for a chmod operation.

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 earns an extra point by supplying concrete octal examples and, more importantly, explaining that `recursive` triggers a depth-based refusal at depth ≤ 2 from root — a constraint the schema only hints at with 'Depth-protected.'

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 opens with a specific verb+resource ('Change file permissions on the device') that clearly distinguishes it from siblings like adb_file_chown, adb_file_stat, and adb_file_touch. It never names an alternative explicitly, but the operation 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It implicitly tells the agent when NOT to bother: on /sdcard the chmod is a no-op because sdcardfs/FUSE ignores Unix permissions. It also warns that recursive mode is depth-protected. It stops short of naming alternatives (e.g., adb_file_chown for ownership) or stating the root prerequisite, which the schema carries instead.

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

Deploy Server

Other Tools