Skip to main content
Glama

agent_files

List files in an agent sandbox and optionally download them to a local output directory, supporting recursive folder search and a configurable file limit.

Instructions

List files in an agent sandbox and optionally download them to OUTPUT_DIR/agent/<environment_id>/.

path: folder or file inside the workspace ("" = root). recursive: include subfolders. download: save the listed files locally (at most max_files, <=200).

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": {
      "environment_id": "<environment_id>"
    },
    "name": "agent_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
downloadNo
max_filesNo
recursiveNo
environment_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv6.0.0

TDQS

A3.6/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 burden. It does disclose useful behavior: downloads write to OUTPUT_DIR/agent/<environment_id>/ and are capped at max_files (<=200). It omits error behavior for invalid paths, whether listing is truncated or paginated, and what happens when the sandbox does not exist.

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 summary sentence is front-loaded, and the remaining lines are compact per-parameter notes with no filler. Every clause carries information, and the terse 'name: meaning' format is easy to scan.

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

Completeness3/5

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

There are five parameters, no annotations, and no output schema, so the description should say more about what a listing returns (names only? sizes? metadata?) and how truncated results look. Parameter behavior is covered, but return-value expectations are not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/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, and it documents four of five parameters: path (with '' meaning root), recursive, download, and max_files with its 200 ceiling. Only environment_id is left implicit; it is easy to infer from the destination template but never explained.

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 files in an agent sandbox') and adds the optional download behavior with its destination path. It is clearly distinct from the agent_run/agent_status siblings, though it does not name any alternative explicitly.

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 narrow scope: inspect a sandbox after a run, and optionally pull artifacts. There is no explicit when-to-use/when-not guidance, no note that environment_id comes from agent_run, and no advice on when downloading is preferable to listing.

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