Skip to main content
Glama

lint_dockerfile

Lint a Dockerfile using Hadolint to identify best-practice and style issues such as unpinned base image versions, missing --no-install-recommends flags, and improper use of ADD or sudo.

Instructions

Lints a Dockerfile with Hadolint for best-practice and style issues — unpinned package/base image versions, missing --no-install-recommends, use of ADD instead of COPY, sudo usage, missing WORKDIR before relative paths, and similar. Complements scan_dockerfile (Trivy), which focuses on security misconfigurations rather than style/best-practice rules. Requires the hadolint CLI installed and on PATH (https://github.com/hadolint/hadolint).

Args: dockerfile_path: full path to an existing Dockerfile on this machine. Accepts either a Windows path ("C:\path\Dockerfile") or a Git Bash style path ("/c/path/Dockerfile").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dockerfile_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description assumes the behavioral disclosure burden. It appropriately discloses the external hadolint CLI requirement and implies a non-mutating check by using the verb 'lints'. It does not explicitly state that the Dockerfile is not modified, but the wording makes the read-only style behavior reasonably clear.

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 compact yet informative, starting with the core action, then issue examples, sibling distinction, prerequisite, and parameter details. Each sentence adds value, and the example rule list is illustrative rather than filler.

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, read-only lint tool, the description covers purpose, scope, alternative tooling, installation requirement, and path conventions. Since an output schema exists, the description does not need to explain return structure, and nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter, dockerfile_path, receives detailed treatment: it must be a full path to an existing Dockerfile, and both Windows-style and Git Bash-style paths are explicitly supported. Since the schema description coverage is 0%, this parameter information is essential and fully supplied by the description.

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 opens with a specific verb and resource: 'Lints a Dockerfile with Hadolint' and elaborates on best-practice issue types. It explicitly names the sibling scan_dockerfile and marks the distinction, so an agent can tell this tool apart without inspecting other definitions.

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?

It provides clear context for when to prefer this tool over scan_dockerfile by stating that scan_dockerfile focuses on security misconfigurations rather than style/best-practice rules. It also documents the hadolint CLI prerequisite. It does not offer explicit when-not-to-use conditions for other siblings, but the guidance is sufficient.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Chandrakant1988/https-github.com-Theo-Gkisis-mcpdockery'

If you have feedback or need assistance with the MCP directory API, please join our Discord server