Skip to main content
Glama

adb_rm

Delete files or directories on Android devices, with depth-protected recursive removal and hard blocks for critical system paths to prevent unsafe deletes.

Instructions

Delete a file or directory on the device. Recursive deletion uses depth-based protection: refuses at depth ≤ 2 from root (blocks rm -rf /system or /sdcard but allows /sdcard/project/build/). Symlinks are resolved before depth checks to prevent traversal bypasses. Hard-blocks /dev, /proc, /sys. For recursive deletes, reports a pre-flight file count.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile or directory path to delete
rootNoUse root shell for protected paths
deviceNoDevice serial
recursiveNoDelete directory recursively (-rf). 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.2/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does so well: it discloses depth thresholds with concrete allowed/blocked examples, symlink resolution before depth checks, hard-blocked system paths (/dev, /proc, /sys), and a pre-flight file count for recursive deletes. What it omits is equally important context for a destructive operation - that deletion is irreversible, what an error response looks like, and whether root is required for protected paths.

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?

Front-loaded with the one-line purpose, then progressive safety detail in short declarative sentences. The parenthetical examples ('blocks rm -rf /system ... allows /sdcard/project/build/') earn their space by making the threshold concrete, and there is no redundant wording.

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 destructive, unannotated filesystem tool, the definition covers the safety-critical behavior an agent needs to avoid catastrophic calls, including what is refused and how symlink traversal is handled. It stops short of describing irreversibility, permissions, or return/error shape, which matters for a delete operation with no output schema.

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 coverage is 100%, so path, root, device, and recursive are already documented in the schema. The description adds real meaning about how recursive interacts with depth checks, but does not explain the root or device parameters beyond what the schema already says, so the baseline of 3 applies.

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 ('Delete a file or directory on the device') and the depth-protection rules confirm the scope is raw filesystem paths, which keeps it distinct from siblings like adb_uninstall or adb_clear_data that operate on app packages and app data.

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?

Clearly implies when recursive mode applies and what it will refuse ('refuses at depth <= 2 from root'), giving an agent concrete conditions for use versus failure. It does not explicitly name an alternative tool to pick instead when the target is an app or app data, so routing between siblings is left partly to inference.

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