Skip to main content
Glama

Lint a Dockerfile for security and size issues: check a Dockerfile for security problems and image size issues

dockerfile_lint
Read-only

Check a Dockerfile (up to 8,000 characters) for common security and image-size problems: unpinned or :latest base images, running as root, piping downloads into a shell, sensitive values baked into ENV or ARG, ADD from URLs, apt and pip cache left in layers, sudo, chmod 777 and an exposed SSH port. Returns each finding with its line, a severity and a fix, plus a score. Use before building or shipping an image. Example: dockerfile=FROM node:latest COPY . /app CMD node /app/server.js. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

Input Schema

NameRequiredDescriptionDefault
dockerfileYesDockerfile contents (up to 8,000 characters)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/destructive=false, but the description goes further: it states the 8,000-character input cap, the shape of the response (line, severity, fix, plus a score, which matters since there is no output schema), and the billing model including 'failed calls free' and that repeats are charged, which meaningfully explains the idempotentHint=false. Behavior is fully disclosed beyond structured fields.

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?

Purpose and the full check list are front-loaded, with the response shape, usage timing, and pricing at the end. Slightly bloated by the pricing/credits sentence and an inline multi-line example that disrupts the sentence flow, but nearly every sentence carries 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?

For a single-parameter tool with no output schema, the description supplies the input limit, the finding structure, severity and score, cost per call, and failure billing. Nothing an agent needs to invoke or interpret the result is missing.

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?

Schema coverage is 100% and there is only one required parameter, so the baseline would be 3. The description adds value by restating the 8,000-character limit and supplying a concrete example value that shows the expected raw-text format for the dockerfile field.

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?

States a specific verb and resource ('Check a Dockerfile') and then enumerates the exact classes of findings (unpinned base images, root user, curl|bash, secrets in ENV/ARG, ADD from URLs, cache retention, sudo, chmod 777, SSH port). An agent knows precisely what this does and that it is distinct from the many unrelated siblings.

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?

'Use before building or shipping an image' gives a clear trigger point in the workflow. There are no near-alternative siblings to disambiguate against, so explicit exclusions are not needed, but it also does not say when not to use it (e.g., for non-Dockerfile configs).

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.