Skip to main content
Glama

android_file_write

Destructive

Create or update files on Android using base64-encoded content via Storage Access Framework, with truncation for initial writes and offset support for subsequent blocks.

Instructions

Create or write a base64 block to a file inside a writable SAF root. Use truncate=true for the first replacement block, then offsets for later blocks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYes
pathYes
offsetNo
rootIdYes
mimeTypeNoapplication/octet-stream
truncateNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.1/5.0
Behavior5/5

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

The description aligns with the destructiveHint annotation by explaining truncation behavior for the first block. It transparently indicates that writing can replace content (via truncate) and that later writes use offsets. There is no contradiction with the annotations.

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 concise, consisting of two sentences that efficiently convey the core operation and key usage notes. No superfluous information is included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main write operation and chunking strategy but does not mention potential side effects (beyond truncation), error conditions, or whether parent directories are created. Given the absence of an output schema, some behavioral expectations remain implicit, though not critical for basic usage.

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?

With zero schema description coverage, the description must clarify parameters. It explains 'data' as a base64 block, 'truncate' for replacement, and 'offset' for positioning, but it does not explain 'rootId', 'path', or 'mimeType'. These are somewhat inferable from context but not explicitly described, leaving partial 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 clearly states the tool's purpose: to create or write a base64 block to a file within a SAF root. It uses a specific verb ('write') and identifies the resource (file in SAF root), distinguishing it from sibling file operations like read, copy, or delete.

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

Usage Guidelines3/5

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

The description provides parameter-level guidance (using truncate for the first block and offsets for subsequent blocks) but does not explicitly state when to use this tool versus alternatives. Since it is the only file-write tool among siblings, the absence of alternative comparison is acceptable, but the guidance focuses on how rather than when.

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