Skip to main content
Glama

audit_dockerfile

Runs a combined audit of a Dockerfile using Trivy security scanning and Hadolint style checks, returning a unified report with findings and raw file content.

Instructions

Runs a full pre-build Dockerfile audit: Trivy's security misconfiguration scan plus Hadolint's best-practice/style lint, combined into one report, plus the raw Dockerfile content. Use this for a general "check/review/audit my Dockerfile" request when the user hasn't specified security vs. style specifically. For a narrower, single-tool check, use scan_dockerfile (security only) or lint_dockerfile (style only) instead — those return findings only, not the raw content, so they're cheaper when a rewrite isn't needed. Requires both trivy (https://trivy.dev) and hadolint (https://github.com/hadolint/hadolint) installed and on PATH.

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"). severity: comma-separated Trivy severities to include (default "CRITICAL,HIGH")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
severityNoCRITICAL,HIGH
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.8/5.0
Behavior4/5

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

With no annotations, the description carries full responsibility for disclosing behavior. It mentions that the tool combines two scanners, returns a report plus raw content, and requires both trivy and hadolint to be installed. However, it does not explicitly state whether the operation is read-only or if it has any side effects, which for an audit tool is likely inferred but not stated. That minor gap prevents a perfect score.

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 well-structured and appropriately concise. It leads with the main function, then provides usage guidance, alternatives, and requirements in a logical order. Every sentence contributes value, and it does not include irrelevant details.

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?

Given the tool's moderate complexity (two scanners, multiple parameters), the description covers all necessary aspects: purpose, usage, parameter details, and prerequisites. The existence of an output schema handles return format, so the description does not need to repeat that information. It is complete for an agent to decide when and how to use it correctly.

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 description goes beyond the schema by explaining the dockerfile_path parameter accepts both Windows and Git Bash style paths, and that severity is a comma-separated list of Trivy severities with a default of 'CRITICAL,HIGH'. This adds meaningful context that is not present in the bare schema.

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 clearly states the tool's purpose: it runs a full pre-build Dockerfile audit combining Trivy security scanning and Hadolint linting, and includes the raw Dockerfile content. It also explicitly distinguishes it from narrower tools like scan_dockerfile and lint_dockerfile, making its role unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: 'Use this for a general check/review/audit my Dockerfile request when the user hasn't specified security vs. style specifically.' It also names alternatives (scan_dockerfile, lint_dockerfile) and explains when those are more appropriate (i.e., when only one aspect is needed and a cheaper check is desired).

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