Skip to main content
Glama

image_history

Read-only

Retrieve the layer history of a Docker image, revealing each layer's command and size to audit builds and diagnose image bloat.

Instructions

Return the layer history of an image.

Useful for auditing what commands built each layer and diagnosing image size. Each entry includes Id (layer digest or "" for imported layers), Created (unix timestamp), CreatedBy (the Dockerfile command that produced the layer, e.g. a RUN or COPY), Size (bytes added by that layer), and Comment. For full image metadata use image_inspect instead.

args: id_or_name - Image name (with optional tag/digest) or id returns: list - Layer history entries, newest first

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safe read nature is covered. The description adds behavioral details beyond that: it lists the exact fields returned (`Id`, `Created`, `CreatedBy`, `Size`, `Comment`), explains the meaning of `<missing>` Ids, and notes the result is ordered newest first. This gives the agent a clear picture of the output without overstating.

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 compact and front-loaded with the core purpose. Each sentence adds value: use-case justification, field details, an alternative tool pointer, and a terse args/returns summary. There is minimal redundancy and no filler.

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?

For a tool with a single parameter and no output schema, the description provides complete contextual information: what the parameter accepts, what the return type is, the fields included, ordering, and edge-case behavior (`<missing>` for imported layers). It also positions itself against `image_inspect`, making its role within the toolset clear.

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?

The schema only provides a bare string parameter with no description (coverage 0%). The description compensates by explaining 'id_or_name - Image name (with optional tag/digest) or id', which defines the acceptable input format. This is sufficient for one parameter and clearly aids correct invocation.

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 starts with 'Return the layer history of an image', using a specific verb and resource that clearly states the tool's function. It also distinguishes from siblings by explicitly directing users to `image_inspect` for full metadata, making its unique scope apparent.

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?

It provides clear usage context ('Useful for auditing what commands built each layer and diagnosing image size') and explicitly names an alternative ('For full image metadata use `image_inspect` instead'), making it obvious when to use this tool versus a sibling.

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