Skip to main content
Glama

image_history

Read-only

Inspect a Docker image's layer history to audit the commands that built each layer and diagnose size contributions. Returns layer entries with command, size, and timestamp.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.0.0
    • addedInput schema / properties / id_or_name
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / name
      Removed value: -{
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "name"
      -]New value: +[
      +  "id_or_name"
      +]
  2. First observedv1.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark this as read-only and non-destructive, so the description adds substantial behavioral detail beyond that: entries are returned newest first, imported layers are marked `<missing>`, `Created` is a unix timestamp, `Size` is bytes added, and the meaning of `CreatedBy`/`Comment` are explained. This gives the agent a clear model of what the call will return.

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 well-structured and front-loaded: purpose, use cases, return field semantics, and an alternative tool are presented without redundancy. The Args and Returns sections are compact and each sentence adds useful information.

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?

With a single parameter and no output schema, the description covers what is needed: what the parameter accepts, what the return value is, the order of entries, and the meaning of each field. It also names the relevant alternative for adjacent use cases, making the tool self-contained for an agent.

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 states that `id_or_name` is a required string with no explanation, so the description compensates by stating it accepts an image name with optional tag/digest or an image id. This is meaningful but could be even stronger with an example or clarification of id versus name resolution.

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 the tool 'Return the layer history of an image' and gives concrete use cases (auditing commands, diagnosing image size). It also distinguishes itself from the sibling `image_inspect` by explicitly directing users who need full image metadata elsewhere.

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 provides clear context: use it for auditing layer-building commands and diagnosing size, and explicitly names `image_inspect` as the alternative when full metadata is needed. It does not enumerate exclusions versus all other sibling tools, but it gives enough directional guidance for the main alternative.

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