Skip to main content
Glama

container_archive_get

Read-only

Retrieve a file or directory from a container as a tar archive, with a byte cap to avoid oversized in-band transfers.

Instructions

Retrieve a file or directory from a container as a tar archive, returned in band.

In-band bytes are capped (default 32 MiB) because MCP base64-encodes them; container_archive_get_to_file streams to a host path instead.

Args: path: Path inside the container max_bytes: Abort with ToolInputError if the archive exceeds this many bytes (defaults to 32 MiB)

Returns: dict: Mapping with archive (bytes) and stat (dict) keys

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
max_bytesNo
id_or_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true and destructiveHint=false, and the description adds meaningful behavioral context: the in-band size cap, the MCP base64 encoding rationale, the ToolInputError abort condition, and the return shape. It doesn't fully describe the contents of the `stat` dict, which is a minor transparency gap.

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?

The structure is scannable: purpose first, then explanation of why in-band is limited, then Args and Returns. The default 32 MiB is stated twice (once in the prose and once in the Args block), but the overall length is still reasonable and the extra explanation earns its place.

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?

With no output schema present, the description appropriately documents the return keys (`archive` and `stat`) and explains the error cap behavior and the size constraint. The main completeness gap is again the undocumented required `id_or_name` parameter, so it falls just short of fully complete.

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

Parameters3/5

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

The Args block gives useful semantics for `path` and `max_bytes`, including the default and error behavior. However, schema_description_coverage is 0% and the required `id_or_name` parameter is missing from the Args section entirely, leaving the parameter documentation incomplete.

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 opening sentence uses a specific verb and resource ('Retrieve a file or directory from a container as a tar archive') and clearly communicates the in-band return mode. It also differentiates this tool from its sibling `container_archive_get_to_file` by explicitly noting the streaming alternative.

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?

The description gives practical guidance on choosing between this tool and `container_archive_get_to_file`: it explains that in-band bytes are capped to a default of 32 MiB and that the sibling streams to a host path instead. It stops short of an explicit 'use X when Y, do not use when Z' structure, so not a 5, but the usage context is clearly present.

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

Deploy Server

Other Tools