Skip to main content
Glama

Dockerfile Linter

dockerfile-linter
Read-onlyIdempotent

Lint a Dockerfile against a rule-based subset of Hadolint checks: untagged or :latest base images, interactive or unpinned apt-get installs, apt list cleanup, apk cache, ADD for local files, shell-form CMD/ENTRYPOINT, running as root and a missing HEALTHCHECK. Lines joined with a trailing backslash count as one instruction, and each issue reports its line in the original file.

Input Schema

NameRequiredDescriptionDefault
dockerfileYesDockerfile content (full or partial), up to 8,192 characters.

Output Schema

NameRequiredDescriptionDefault
issuesYes
severityYes
next_stepYes
info_countYes
line_countYes
error_countYes
issue_countYes
next_step_urlYes
warning_countYes
why_follow_upYes
interpretationYes
affiliate_contextNo
computation_basisYes
instruction_countYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • changedInput schema / properties / dockerfile / description
      Previous value: -"Dockerfile content (full or partial)"New value: +"Dockerfile content (full or partial), up to 8,192 characters."
    • changedInput schema / properties / dockerfile / maxLength
      Previous value: -200000New value: +8192
    • addedOutput schema / properties / error_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / info_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / instruction_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / issues / items / properties / code
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / issues / items / properties / severity
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / issues / items / required
      Previous value: -[
      -  "issue",
      -  "line",
      -  "suggestion"
      -]New value: +[
      +  "code",
      +  "issue",
      +  "line",
      +  "severity",
      +  "suggestion"
      +]
    • addedOutput schema / properties / line_count
      Added value: +{
      +  "type": "number"
      +}
    • addedOutput schema / properties / warning_count
      Added value: +{
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "computation_basis",
      -  "interpretation",
      -  "issue_count",
      -  "issues",
      -  "next_step",
      -  "next_step_url",
      -  "severity",
      -  "why_follow_up"
      -]New value: +[
      +  "computation_basis",
      +  "error_count",
      +  "info_count",
      +  "instruction_count",
      +  "interpretation",
      +  "issue_count",
      +  "issues",
      +  "line_count",
      +  "next_step",
      +  "next_step_url",
      +  "severity",
      +  "warning_count",
      +  "why_follow_up"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / dockerfile / maxLength
      Added value: +200000
  3. Changed1 schema field changed
    • addedInput schema / properties / dockerfile / examples
      Added value: +[
      +  "example"
      +]
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "affiliate_context": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "affiliate": {
      +          "type": "string"
      +        },
      +        "cta_label": {
      +          "type": "string"
      +        },
      +        "disclosure": {
      +          "type": "string"
      +        },
      +        "framing": {
      +          "type": "string"
      +        },
      +        "posture": {
      +          "enum": [
      +            "secondary"
      +          ],
      +          "type": "string"
      +        },
      +        "slot_id": {
      +          "type": "string"
      +        },
      +        "url": {
      +          "type": "string"
      +        },
      +        "variant": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "affiliate",
      +        "cta_label",
      +        "disclosure",
      +        "framing",
      +        "posture",
      +        "slot_id",
      +        "url",
      +        "variant"
      +      ],
      +      "type": "object"
      +    },
      +    "computation_basis": {
      +      "type": "string"
      +    },
      +    "interpretation": {
      +      "type": "string"
      +    },
      +    "issue_count": {
      +      "type": "number"
      +    },
      +    "issues": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "issue": {
      +            "type": "string"
      +          },
      +          "line": {
      +            "type": "number"
      +          },
      +          "suggestion": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "issue",
      +          "line",
      +          "suggestion"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "next_step_url": {
      +      "type": "string"
      +    },
      +    "severity": {
      +      "type": "string"
      +    },
      +    "why_follow_up": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "computation_basis",
      +    "interpretation",
      +    "issue_count",
      +    "issues",
      +    "next_step",
      +    "next_step_url",
      +    "severity",
      +    "why_follow_up"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  6. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds substantive behavioral context beyond that: the specific rule set enforced, the backslash line-continuation parsing rule, and the fact that each issue is reported against its original line number.

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?

Front-loaded with the core action and scope before drilling into the rule list, and the second sentence covers parsing/reporting semantics. The dense rule enumeration is long but each item earns its place by telling the agent what will be flagged.

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?

An output schema exists, so return values needn't be detailed, yet the description still notes that issues carry original-file line numbers. Combined with annotations covering safety and a fully documented single parameter, the definition is complete for correct invocation; only the sibling-boundary guidance 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 the single parameter is documented as 'Dockerfile content (full or partial), up to 8,192 characters.' The description adds meaning the schema does not, clarifying that multi-line joined instructions count as one and that issues map back to original file lines. Baseline would be 3 at full coverage; the added parsing semantics lift it.

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 (lint), a specific resource (a Dockerfile), and the exact scope (a rule-based subset of Hadolint checks), then enumerates the rules checked. The Dockerfile resource inherently distinguishes it from the nearest sibling, kubernetes-manifest-linter, without the agent needing to open either schema.

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 purpose strongly implies when to reach for it (a Dockerfile you want checked), so usage is implied rather than stated. There is no explicit when-not guidance and no naming of adjacent siblings like kubernetes-manifest-linter or detect-secrets-scanner, so an agent must infer the boundary itself.

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