Skip to main content
Glama

fix_preview

Preview a unified diff of safe automatic Dockerfile fixes without writing the file, and list findings that still need manual changes.

Instructions

Show a unified diff of the safe automatic fixes for a Dockerfile (add -y and --no-install-recommends to apt-get install, --no-cache-dir to pip, --no-cache to apk, apt -> apt-get, ADD -> COPY, shell-form CMD -> exec form, MAINTAINER -> LABEL, apt lists cleanup). Never writes the file: apply the diff yourself. Lists the findings that need manual changes.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and mostly succeeds: it explicitly declares the tool is non-mutating ('Never writes the file') and describes exactly which transformations will appear in the diff. It also discloses a secondary output (findings that need manual changes), though it does not cover failure behavior, e.g. what happens if path does not exist or is not a Dockerfile.

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 non-mutation guarantee is stated up front and the fix list is compactly parenthesized. The enumeration is long but each item earns its place by telling the agent what the diff will contain; only slight tightening would improve it.

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?

For a single-argument tool with an output schema, the description covers purpose, mutation safety, and output nature (diff plus manual findings) adequately. The one material hole is the ambiguity of 'path', which is unaddressed in both schema and description.

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?

Only one parameter exists, 'path', and the schema gives it zero description coverage. The description never clarifies whether it is a path to a Dockerfile, to a directory, or to a compose/Dockerfile pair, so it adds no meaning beyond the bare schema field.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: it shows a unified diff of safe automatic fixes for a Dockerfile, and enumerates the exact fix categories (apt-get flags, ADD->COPY, MAINTAINER->LABEL, etc.). The scope is unmistakable, but it never names or contrasts itself with the closest sibling, lint_dockerfile, which also reports Dockerfile problems.

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?

The description implies the workflow ('Never writes the file: apply the diff yourself') and hints at a two-stage process by saying it also lists findings needing manual changes. However, it gives no explicit when-to-use versus lint_dockerfile or when-not guidance, leaving the agent to infer that lint_dockerfile diagnoses and fix_preview produces a patch.

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