Skip to main content
Glama

container_archive_get_to_file

Export a file or directory from a Docker container as a tar archive directly to the server host's filesystem, avoiding in-band byte limits.

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?

Discloses file writing behavior (server user, ~ expansion, overwrite refusal by default) and return format. Annotations are consistent (readOnlyHint=false, destructiveHint=false) but description adds significant context beyond annotations.

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?

Well-structured: first line states purpose, then usage guidelines, then behavioral notes, then parameter list. Every sentence adds value without redundancy.

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?

Covers all aspects: purpose, usage, parameters, behavior, return format. Lacks mention of error conditions (e.g., missing file inside container), but no output schema exists, so return description compensates.

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?

Despite 0% schema coverage, the description explains each parameter meaning (id_or_name, path, dest_path, overwrite) with details like dest_path is destination for tarball and overwrite behavior. Adds value beyond schema, but could include 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?

Clearly states the verb 'retrieve', resource 'file/directory from container', and output 'tar archive written to a file on host'. Distinguishes from siblings by naming alternatives and their purposes (container_archive_get for in-band, container_export for whole filesystem).

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 states when to prefer this tool over container_archive_get (large files due to base64) and container_export (whole filesystem). Also describes behavioral details like streaming to disk, no byte cap, path expansion, and overwrite behavior.

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/GavinLucas/docker-mcp'

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