Skip to main content
Glama

lint_compose

Lint Docker Compose files for unpinned images, privileged mode, docker.sock mounts, exposed ports, and missing healthchecks. Returns line-numbered findings and fixes without a Docker daemon.

Instructions

Lint a docker-compose / compose.yaml file (rule IDs DC2001-DC2014): unpinned or :latest images, privileged, host network, docker.sock mounts, secrets in environment (values never echoed), ports published on all interfaces, missing restart/healthcheck, depends_on without a condition, broad bind mounts (/, home), obsolete version: key, and env_file paths that do not exist. Uses yaml.safe_load only. Suppress with # dockerlint-ignore: DC2008 above a line or service.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it states that secret values are never echoed, that parsing uses yaml.safe_load only (no execution risk), and that findings can be suppressed via a '# dockerlint-ignore: DCxxxx' comment. It does not describe failure behavior for a missing or unreadable path, which is the remaining gap.

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 verb and resource are front-loaded, and the long rule enumeration is genuinely scoping information rather than filler, followed by a compact suppression hint. It is dense but every clause carries content; only the rule list could arguably be trimmed.

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 need not be explained, and the description covers safety posture, rule coverage, and suppression. What is missing is the meaning of the required 'path' argument and any error-handling note, which matters for a single-required-param tool.

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

Parameters2/5

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

Schema description coverage is 0% — the single 'path' parameter has no description in the schema — and the tool description never clarifies it either. An agent cannot tell whether 'path' means the compose file itself or a directory to scan, nor whether relative or absolute paths are accepted, so the description fails to compensate for the coverage gap.

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 ('Lint a docker-compose / compose.yaml file') and then enumerates the exact rule set (DC2001-DC2014) it applies. This makes it immediately distinguishable from the sibling 'lint_dockerfile', which targets a different artifact.

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?

The scope is clearly bounded to compose.yaml files and the enumerated checks tell an agent what situations the tool covers, so the choice versus lint_dockerfile is inferable from the resource named. It stops short of explicitly stating when not to use it or naming alternatives, which keeps it out of 5 territory.

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