Skip to main content
Glama

container_export

Export a container's filesystem as a tar archive to a host file or return it in band. Supports overwrite and size limits.

Instructions

Export a container's filesystem as a tar archive: to a file on the server host, or in band.

With dest_path the archive streams straight to disk (no byte cap), so it handles large containers — the file is written by the server's user, ~ is expanded, and an existing file is refused unless overwrite=True. Without dest_path the tar bytes are returned in band, capped at max_bytes (default 32 MiB) because MCP base64-encodes them — a fallback for when no writable host path exists (e.g. a containerized server without a bind mount).

args: id_or_name - The container id or name dest_path - Destination path on the server host; omit to return the bytes in band overwrite - Replace dest_path if it already exists (default False) max_bytes - In-band mode: abort with ValueError beyond this many bytes (default 32 MiB) returns: bytes | dict - the tar bytes (in band), or {"path": , "bytes_written": int}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dest_pathNo
max_bytesNo
overwriteNo
id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate a write operation (readOnlyHint=false) and non-destructive (destructiveHint=false). Description adds beyond annotations: details on dest_path overwrite behavior, ~ expansion, in-band byte cap, return types. Missing permission requirements or compression details, but sufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with a concise summary then parameter details. Slightly verbose but front-loaded and each sentence adds information.

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 both modes, edge cases, return types, and interaction with MCP (base64 encoding). Missing details on compression or synchronous nature, but overall complete for a two-mode export tool with output schema.

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?

All four parameters are meaningfully described: id_or_name, dest_path, overwrite, max_bytes. Explains default values and behavior (e.g., default max_bytes 32 MiB, overwrite default false). This adds significant value over the schema which has 0% description coverage.

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 it exports a container's filesystem as a tar archive, with two distinct modes based on dest_path. This distinguishes it from sibling tools like container_archive_get or image_save.

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

Usage Guidelines4/5

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

Provides explicit guidance on when to use file mode vs in-band mode (based on host path availability). Does not mention alternatives like container_archive_get for partial exports, but the usage context is clear.

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