Skip to main content
Glama

list_files

List files and directories on an Android device via ADB, returning names, sizes, permissions, and type flags. Supports root access and dereferences symlinked directories.

Instructions

List a device directory: [{name, size, is_dir, is_link, perms}]. as_root uses su -c ls on rooted devices. Symlinked dirs (e.g. /sdcard on Samsung) are dereferenced so their contents are listed, not the link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
serialNo
as_rootNo
remote_dirYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does add real value: it discloses that as_root shells out via `su -c ls` and that symlinked directories are dereferenced rather than returned as links. However it omits permissions required, behavior when the directory does not exist, and whether traversal is recursive.

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?

Front-loaded with the operation and its output shape, followed by two focused behavioral notes. Every sentence earns its place; only the slight informality of the second sentence keeps it from a 5.

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?

An output schema exists, so the description need not document return values, yet the behavioral notes about root execution and symlink dereferencing add context an agent would otherwise lack. Missing error/permission behavior is a minor gap for a read-only list tool.

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 0%, so the description must compensate across three parameters. It explains as_root's mechanism well, but says nothing about what `serial` selects (target device) or the format/scope of `remote_dir`, leaving two of three parameters undocumented in both schema and description.

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?

States a specific verb+resource ('List a device directory') and even specifies the return shape, which separates it from single-file siblings like stat_file or file_exists. It does not explicitly name or contrast with those siblings, so it stops short of a 5.

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?

Usage is implied by the verb and the directory scope, but there is no explicit guidance on when to prefer this over stat_file, file_exists, or read_file, nor any prerequisites (e.g. device connection state). Adequate but with a clear gap.

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