Skip to main content
Glama

container_archive_get_to_file

Extract a file or directory from a container as a tar archive directly to a host file, streaming to disk to avoid large base64 payloads.

Instructions

Retrieve a file or directory from a container as a tar archive written to a file on the server host.

File-writing variant of container_archive_get - prefer it for anything large, since in-band bytes are base64-encoded by MCP. For the whole filesystem use container_export. Streams straight to disk (no in-band byte cap). The file is written by the server's user; ~ is expanded and an existing file is refused unless overwrite=True.

Args: path: Path inside the container dest_path: Destination path on the server host for the tarball overwrite: Replace dest_path if it already exists

Returns: dict: {"path": , "bytes_written": int, "stat": dict}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
dest_pathYes
overwriteNo
id_or_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses key behaviors: it streams straight to disk with no in-band byte cap, the file is written by the server's user, `~` is expanded, and existing files are refused unless `overwrite=True`. These details are not available from annotations or schema and materially affect invocation and error handling.

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 compact and front-loaded, with the core purpose and variant distinction first, followed by inline argument definitions and a return structure. Each sentence adds useful information without filler or repetition.

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?

Even without an output schema, the description provides the return structure, destination handling details, overwrite behavior, and comparison to relevant siblings. This is complete enough for an agent to invoke the tool correctly in most situations.

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%, and the description compensates for most parameters by explaining `path`, `dest_path`, and `overwrite` semantics. It omits an explanation of `id_or_name`, though the schema marks it required and its meaning is inferable from the tool name. The return shape is also usefully described, but the missing parameter note prevents a perfect score.

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 states a specific action—retrieve a file or directory from a container as a tar archive written to a host file—with a clear destination. It also explicitly distinguishes itself from the sibling `container_archive_get` as the file-writing variant, so an agent can select it correctly.

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

Usage Guidelines5/5

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

The description gives explicit usage guidance: prefer this over `container_archive_get` for large payloads because in-band bytes are base64-encoded, and use `container_export` for the whole filesystem. This directly addresses when to choose this tool over alternatives.

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