Skip to main content
Glama

list_files

Read-only

Lists files in an app instance's staging folder to confirm downloads arrived and flag in-progress partial files before you open them in apps.

Instructions

The instance's staging folder (files// under the install dir) and its contents.

Returns {"ok", "instance", "dir", "count", "truncated", "files": [{name, bytes, modified, is_dir, partial}, …]} (capped at 200 entries, newest first). "partial": true marks an in-progress browser download (.crdownload/.part/.tmp) — wait for it to disappear before using the file. Drop files there (or reference any host path you can read) to open in apps via open_file() or an app's Open dialog; launch_app browser instances also download / 'save as' into it — call this after a download to confirm the file arrived. Browser uploads still go through upload_file(). Fails (isError) if the folder cannot be read.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
instanceNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint; the description adds the meaningful behavior: capped at 200 entries, newest-first ordering, a "truncated" signal, the "partial" flag semantics for in-progress downloads (.crdownload/.part/.tmp) with the instruction to wait for it to disappear, and isError failure when the folder is unreadable. That is exactly the operational context annotations cannot carry.

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 resource definition, then the return shape, then the partial-flag warning and the routing advice, so the most decision-relevant facts come first. It is dense rather than padded, though restating the full return object duplicates the output schema and costs a line.

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?

Rich for a read tool: an output schema covers return values, annotations cover safety, and the description covers truncation, ordering, partial downloads, error behavior, and next steps for the listed files. The remaining hole is the instance parameter's meaning and provenance, the one thing an agent might still get wrong.

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?

There is one optional parameter (instance) with 0% schema description coverage, and the description only indirectly maps it via "files/<N>/" and "the instance's staging folder." It never states what an instance ID is, how to discover one (e.g. via list_instances), or what the default of 1 means, so the schema gap is only partially compensated.

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 resource and its exact location: "The instance's staging folder (files/<N>/ under the install dir) and its contents." An agent immediately knows this enumerates files in a per-instance sandbox, and the description names the adjacent tools it is not (open_file, upload_file, put_file).

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 two concrete usage conditions: "call this after a download to confirm the file arrived" and drop-a-file-then-open via open_file() or an app's Open dialog, plus routes uploads away with "Browser uploads still go through upload_file()." It lacks any explicit exclusion for other listing tools (e.g. list_instances) or guidance on calling order before launch_app, but the alternatives it does name come with their triggering condition.

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