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
| Name | Required | Description | Default |
|---|---|---|---|
| dest_path | No | ||
| max_bytes | No | ||
| overwrite | No | ||
| id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |