Skip to main content
Glama

dockerfile-cache-lint

Dockerfile build-cache and reproducibility lint — Parses a Dockerfile (continuations, escape directive, heredocs, flags, stages) and reports instruction orderings that defeat the layer cache or make rebuilds drift, for agents writing or reviewing container builds. Cache: COPY of the whole context before a dependency or package install, apt-get update in its own RUN, per-build ARG/ENV values (build date, git sha) declared before later RUN steps. R

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "dockerfile": "<dockerfile>"
    },
    "name": "dockerfile-cache-lint"
  }
}

Input Schema

NameRequiredDescriptionDefault
basePinNotag (default): flag only missing or :latest tags. digest: flag every base image not pinned by @sha256.
includeNoRule categories that decide the status. Default cache and reproducibility.
dockerfileYesDockerfile text, at most 5000 lines and 128 stages.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does usefully disclose parser coverage (continuations, escape directives, heredocs, flags, multi-stage) and enumerates concrete cache rules it flags, but it never states that the operation is read-only/non-mutating, never explains what a 'status' means or how findings are ranked, and the text is cut off mid-word ('R'), truncating the reproducibility rule list.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence is well front-loaded and dense with useful scoping detail, and the 'Cache:' prefix gives a readable rule-list structure. However, the definition terminates abruptly at 'R', leaving an incomplete sentence and an unfinished rule enumeration — wasted space that should have been either completed or trimmed.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three parameters, no annotations, and no output schema, the description needs to convey the result model and safety profile. It covers the input side well (what it parses, which rules) but the truncation removes the reproducibility rules and any indication of output shape, so an agent cannot predict what it gets back.

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?

Schema description coverage is 100%, so basePin, include, and dockerfile are already documented in structured form; baseline 3 applies. The description's rule examples loosely map to the 'cache' include category but do not explain how include selection changes results or how basePin's tag/digest modes behave.

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?

Names a specific verb+resource combination ('Dockerfile build-cache and reproducibility lint'), states that it parses a Dockerfile and reports instruction orderings that defeat the layer cache or cause rebuild drift. The parenthetical scope (continuations, escape directive, heredocs, flags, stages) and the audience note pin down exactly what class of problem it addresses, clearly distinct from siblings like http-cache-explain (HTTP semantics) or lockfile-merge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'For agents writing or reviewing container builds' implies the usage context but never states when to invoke it versus doing something else, nor any exclusions (e.g., only Dockerfiles, not Compose files or other build systems). The agent must infer that this is the right tool for a Dockerfile review task.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources