Skip to main content
Glama

adb_file_stat

Retrieve detailed metadata for files or directories on an Android device, including size, permissions, ownership, timestamps, SELinux context, and file type via a read-only ADB operation.

Instructions

Get detailed file metadata: size, permissions, ownership, timestamps (access/modify/change), SELinux security context, and file type. Read-only operation.

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

Input Schema

NameRequiredDescriptionDefault
pathYesFile or directory path on device
rootNoUse root shell for protected paths
deviceNoDevice serial

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/5.0
Behavior4/5

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

The description clearly states it is a 'read-only operation,' which is a critical behavioral constraint absent in the annotations. It also informs the user of complex data points like SELinux context, adding behavioral depth.

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 extremely concise, front-loading the function and listing all major return types in a single, dense statement with no unnecessary fluff.

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?

Given the complexity (SELinux, multiple timestamps) and the lack of an output schema, the description is highly complete. It provides all the necessary high-level information for the agent to identify the correct tool for the job.

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?

Since the schema provides 100% coverage, the baseline score is 3. The description does not add specific semantic meaning to the parameters (path, root, device) beyond what is already defined in the schema.

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 uses a specific verb ('Get') and clearly defines the resource (detailed file metadata). By listing specific fields like SELinux context and timestamps, it differentiates this tool from basic file listing tools (like adb_ls).

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 defines what the tool captures (the positive use case) but does not explicitly guide the user on when to use it versus a similar tool. It implies usage but lacks explicit 'when/when-not' comparisons with siblings.

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