Skip to main content
Glama

adb_file_write

Create or overwrite text files on an Android device via ADB shell, ideal for configs, scripts, test fixtures, and small data files; use adb_push for large or binary files.

Instructions

Create or overwrite a text file on the device. Content is delivered via shell heredoc — suitable for config files, scripts, test fixtures, and small data files. For large or binary files, use adb_push instead. Shell buffer limits content to approximately 128KB.

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

Input Schema

NameRequiredDescriptionDefault
pathYesDestination file path on device
rootNoUse root shell for protected paths
appendNoAppend to existing file instead of overwriting
deviceNoDevice serial
contentYesFile content to write

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.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 behavioral burden and discloses key traits: it overwrites existing files, uses shell heredoc delivery, and is limited to about 128KB. It does not cover error behavior, permissions, or whether parent directories must exist, but the essential mutation and size constraints are stated.

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 compact and front-loaded, immediately stating the primary action. Every sentence adds value: use cases, the large/binary alternative, and the size limit.

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 text file write tool with no output schema and no annotations, the description covers the main operational concerns: overwrite behavior, text suitability, heredoc delivery, and size limits. Minor gaps remain around permissions, parent-directory requirements, and append-mode interaction, but the definition is largely complete for correct invocation.

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 description coverage is 100%, so path, root, append, device, and content are already documented in the schema. The description adds useful meaning about content delivery via heredoc and the 128KB buffer limit, but it does not explain the other parameters beyond what the schema provides, matching the baseline for high schema coverage.

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 states a specific verb and resource: create or overwrite a text file on the device. It also distinguishes the tool from adb_push for large or binary files, so an agent can identify its niche among many adb file tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It gives concrete use cases such as config files, scripts, test fixtures, and small data files. It also explicitly names the alternative adb_push for large or binary files, making the when-to-use and when-not-to-use boundary clear.

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