Skip to main content
Glama

Robot Actions — Remote Device Control

Device file stat

device_file_stat
Read-onlyIdempotent

Get metadata for one file or directory on the device — type, size and modification time. Counterpart of ios_file_stat. Returns { ok, remotePath, exists, isDir, size, modTime }. A missing path is NOT an error: it comes back with exists=false, so this is the cheap way to check for a file before pulling it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
udidYesDevice serial number (UDID)
remotePathYesAbsolute path on the device, e.g. /sdcard/Download/report.pdf

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the safety profile is covered. The description adds useful non-obvious behavior: a missing path is NOT an error and returns exists=false, which is exactly the kind of edge-case disclosure annotations cannot provide. It could have added more (relative vs absolute path handling, performance notes) but this is solid.

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?

Three tight sentences, front-loaded with the core action, then the return shape, then the key edge case. Every sentence earns its place with no filler.

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

Completeness5/5

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

For a read-only stat tool with rich annotations and a fully documented schema, the description covers the essential gaps: return field list and the exists=false non-error behavior. An agent has everything needed to call it correctly without an output schema.

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% – both udid and remotePath are documented in the schema with examples. The description adds no additional parameter meaning beyond what the schema already provides, so the baseline of 3 applies.

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?

States a specific verb ('Get metadata') and resource ('one file or directory on the device'), and names the exact fields returned (type, size, modification time). It also distinguishes itself from the sibling ios_file_stat by calling itself its counterpart, so an agent can pick the right platform variant immediately.

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

Usage Guidelines4/5

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

Gives a concrete when-to-use case: 'the cheap way to check for a file before pulling it' tells the agent to prefer stat over a pull for existence checks. It does not explicitly exclude alternatives (e.g., when to use device_file_find or device_file_list instead), so it stops short of a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources