Skip to main content
Glama

container_archive_get_to_file

Retrieve a file or directory from a Docker container as a tar archive, writing directly to a host file to avoid base64 overhead for large data. Set overwrite to replace existing files.

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: id_or_name - The container id or name path - Path inside the container dest_path - Destination path on the server host for the tarball overwrite - Replace dest_path if it already exists (default False) returns: dict - {"path": , "bytes_written": int, "stat": dict}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
dest_pathYes
overwriteNo
id_or_nameYes
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses important behavioral details: streams straight to disk with no in-band byte cap, file written by the server's user, '~' expansion, and refusal of existing files unless overwrite=True. This adds meaningful context not present in structured data.

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 well-structured: it starts with a direct purpose statement, then gives rationale for use, then lists parameters in an organized block. Every sentence adds value—no filler or redundancy—striking an excellent balance between completeness and efficiency.

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?

Given the tool's moderate complexity and lack of output schema, the description covers all critical aspects: what it does, when to use it, behavior around file overwrites and path expansion, and the return value structure. It is self-sufficient for an agent to invoke correctly.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description fully compensates by providing clear one-line meanings for each parameter: id_or_name, path, dest_path, and overwrite (including default behavior). This gives the agent complete understanding of expected inputs beyond bare schema types.

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 begins with a clear verb ('Retrieve') and specific resource ('file or directory from a container as a tar archive written to a file on the server host'). It immediately distinguishes itself from sibling tools by noting it is the 'File-writing variant of container_archive_get' and contrasts with 'container_export' for whole filesystem use.

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 explicitly states when to use this tool: 'prefer it for anything large, since in-band bytes are base64-encoded by MCP'. It also provides a clear alternative for a different use case: 'For the whole filesystem use container_export'. This gives decisive guidance on selection among related tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/L337-org/docker-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server