Skip to main content
Glama

container_diff

Read-only

Audit filesystem changes a container made against its image. Compare the writable layer to identify modified, added, or deleted files before committing or archiving, aiding in debugging unexpected writes.

Instructions

List filesystem changes a container has made relative to its image.

Use it to audit what a container wrote before container_commit or container_archive_get, or to debug unexpected writes. Only the writable container layer is compared - files in volumes and bind mounts never show up.

Returns: list: Dicts of {"Path", "Kind"}; Kind 0=modified, 1=added, 2=deleted

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.9.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false. The description adds valuable behavioral details beyond that: it limits comparison to the writable container layer, excludes volumes/bind mounts, and defines the return structure (list of {'Path','Kind'} with Kind meanings). These are meaningful clarifications that help the agent anticipate results and limitations, without contradicting annotations.

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 exceptionally concise: a clear lead sentence, two practical usage sentences, and a compact return-format note. Every sentence earns its place, with no redundancy or filler. The most critical information (what it lists and its scope) is front-loaded, and the return format is presented in a scannable block. This is model clarity.

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 simple read-only tool with one parameter and no output schema, the description covers everything necessary: purpose, usage guidance, behavioral scope (writable layer only), and the exact output format. It also implicitly handles edge cases (volumes/bind mounts) and gives enough context to decide when to use it. There is no gap that would prevent an agent from correctly invoking it.

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 schema has 0% description coverage for the single parameter 'id_or_name', and the description does not explicitly explain it. However, the parameter's meaning is self-evident from the tool's name and context (a container identifier). The description focuses on behavior and return format, and while it does not add explicit parameter semantics, the triviality of 'id_or_name' makes this an acceptable baseline. A 3 is fair because the description could have clarified acceptable formats (e.g., name vs. ID) but does not.

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 states a specific verb-resource pair: 'List filesystem changes a container has made relative to its image.' It clearly defines the tool's output (the diff) and its scope (writable layer only). This is distinct from sibling tools like container_inspect or container_commit, and the description's explicit boundary (volumes/bind mounts excluded) further sharpens its purpose.

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 concrete use cases: 'audit what a container wrote before container_commit or container_archive_get, or to debug unexpected writes.' It also warns that files in volumes and bind mounts never appear, which implicitly tells the agent when this tool is not appropriate. It does not name alternative tools explicitly, but the guidance is clear and actionable.

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