Skip to main content
Glama

container_archive_get_to_file

Copy a file or directory from a container into a tar archive on the server host. Streams directly to disk, avoiding base64 encoding, ideal for large transfers.

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
Behavior4/5

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

Annotations include readOnlyHint=false and destructiveHint=false, and the description adds meaningful context beyond that: 'streams straight to disk (no in-band byte cap)', 'file is written by the server's user', '~ is expanded', and 'an existing file is refused unless overwrite=True.' This discloses key behavioral traits. It does not mention error cases or permission requirements, but given annotations and the detail provided, it is well-covered.

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 with a concise first sentence stating purpose, then a justification for using this variant, and then a clear list of parameters. Every sentence adds value; there is no fluff or repetition. The return type is also specified compactly.

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 complexity (4 params, no output schema), the description covers the main workflow, provides return value structure, and references related tools. It is complete enough for an agent to select and invoke the tool correctly without needing to consult external documentation.

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. It does: the 'args' section provides one-line explanations for all four parameters: id_or_name, path, dest_path, and overwrite. This is directly useful and goes beyond the bare names/types in the schema. It could be more detailed (e.g., formats for id_or_name), but it is sufficient.

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 clearly states the action: 'Retrieve a file or directory from a container as a tar archive written to a file on the server host.' This uses a specific verb (retrieve), resource (container file/directory), and target (host file). It also distinguishes itself from sibling tools by naming them: 'File-writing variant of container_archive_get' and 'For the whole filesystem use container_export.'

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?

Explicitly provides when-to-use guidance: 'prefer it for anything large, since in-band bytes are base64-encoded by MCP' and 'For the whole filesystem use container_export.' This clearly differentiates from alternatives and gives practical context for choosing this tool.

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