Skip to main content
Glama

adb_file_checksum

Compute a file's SHA-256 hash on an Android device to verify firmware integrity, detect tampering, and compare files across devices; returns the hash and file size.

Instructions

Compute SHA-256 hash of a file on the device. Critical for firmware integrity verification, tamper detection, and comparing files across devices. Read-only operation. Reports file size alongside the hash.

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_file_checksum"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile path on device
rootNoUse root shell for protected paths
deviceNoDevice serial
algorithmNoHash algorithm (default: sha256)sha256

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

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full disclosure burden. It does state "Read-only operation" and that file size is reported alongside the hash, which is genuinely useful. It omits what happens for missing/unreadable files, the overhead of hashing large files, or what the root flag changes operationally.

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 short sentences, front-loaded with the operation and followed by use cases and the read-only/side-output facts. The phrase "Critical for..." is mildly promotional but still conveys intent, so only minor trimming is possible.

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 4-parameter, 100%-covered schema with no output schema, the description covers the operation, safety profile, and return content (hash plus file size), which is what an agent needs to invoke it. Only error behavior and the operational effect of the root flag remain unstated.

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 all four parameters (path, root, device, algorithm) are already documented, establishing a baseline of 3. The description adds no parameter-level meaning beyond the schema and even implies SHA-256 only, while the schema allows sha1/md5 selection.

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 names a specific verb and resource ("Compute SHA-256 hash of a file on the device") and is easily separable from siblings like adb_file_stat or adb_cat. It is slightly narrower than the actual tool, since the schema's algorithm enum also permits sha1 and md5, but the core purpose is unmistakable.

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?

It gives use-case contexts (firmware integrity verification, tamper detection, cross-device comparison), which implies when to reach for it. However, it never explicitly says when to use adb_file_stat or adb_cat instead, nor does it state prerequisites or exclusions, so the agent must infer the routing.

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