Skip to main content
Glama

adb_file_chown

Change Android file or directory ownership through ADB by specifying user:group IDs; root is required, and recursive mode includes depth protection.

Instructions

Change file ownership on the device. Requires root. Supports both numeric UID:GID (e.g., '10150:10150') and symbolic user:group (e.g., 'system:system'). Recursive mode uses depth-based protection: refuses at depth ≤ 2 from root. Note: sdcardfs/FAT32 ignore ownership changes.

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>",
      "owner": "<owner>"
    },
    "name": "adb_file_chown"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile or directory path
ownerYesOwner in user:group format (e.g., '0:0', 'system:system', '10150:10150')
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.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does substantial work: root requirement, a concrete recursive guard threshold, and a filesystem caveat where the operation silently does nothing. It does not say what is returned or whether a refusal raises an error versus a partial success, which is the main remaining gap for a mutation tool.

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?

Four short sentences, each carrying a distinct fact (purpose, prerequisite, input formats, guard rail, caveat), with the purpose front-loaded and zero filler.

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 file operation with no annotations and no output schema, the description covers prerequisites, accepted input forms, safety limits, and known no-op filesystems. Only failure/return semantics remain unaddressed.

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 baseline is 3, but the description adds genuine meaning beyond it by confirming both numeric and symbolic owner formats are accepted and by spelling out the depth-protection rule that the schema only labels as "Depth-protected." The device parameter is left entirely to the schema.

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?

"Change file ownership on the device" is a specific verb+resource pair, and the owner-format detail makes it clearly the chown counterpart to adb_file_chmod. It never names adb_file_chmod explicitly, so sibling differentiation is implied by resource semantics rather than stated.

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 states the key precondition ("Requires root") and two conditions under which the call is pointless or blocked (sdcardfs/FAT32, depth ≤ 2 in recursive mode). It stops short of pointing to adb_file_chmod or adb_shell as the alternative when root is unavailable.

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