Skip to main content
Glama

check_dockerignore

Validates .dockerignore files against Docker's matching rules to detect missing exclusions for .git, node_modules, or .env, nested node_modules gaps, and patterns that break Dockerfile COPY steps.

Instructions

Check the .dockerignore for a Dockerfile (or a directory): missing file, patterns that do not exclude .git, node_modules or .env files, nested node_modules the root-anchored patterns miss, and patterns that exclude files the Dockerfile COPYs (the build would fail or silently omit them). Uses Docker's matching rules (root-anchored, last match wins, ** crosses dirs).

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 supplied, the description carries the full burden and largely succeeds: it names the matching semantics used (root-anchored, last match wins, ** crosses dirs) and explains the real consequence of a bad ignore file ("the build would fail or silently omit them"). What it does not state is whether the tool is purely read-only and whether a missing path is reported as a finding or an error.

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?

One dense sentence front-loads the resource and the failure modes, then a second sentence supplies the matching rules. Every clause carries information, though the parenthetical list is long enough that a reader must parse carefully; a short bulleted breakdown would scan faster.

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?

An output schema exists, so return values need no explanation, and the description covers the check surface, the matching semantics, and the stakes of a bad result. For a single-parameter read-check tool this is effectively complete.

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

Parameters3/5

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

Schema coverage is 0% — the only parameter is titled "Path" with no description. The description partly compensates by clarifying that the path may be a Dockerfile or a directory, which is genuinely useful disambiguation, but it does not say whether relative paths are resolved from cwd or how a directory is located/disambiguated.

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 the .dockerignore") and enumerates exactly the four classes of problem it detects: missing file, missing .git/node_modules/.env exclusions, nested node_modules missed by root-anchored patterns, and patterns that exclude COPY'd files. This is clearly distinct from siblings like lint_dockerfile or dockerfile_overview, which operate on the Dockerfile itself.

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 description implies the context of use ("for a Dockerfile (or a directory)") and hints at the build-failure consequence that motivates running it, but it never states when to prefer this tool over lint_dockerfile or fix_preview, nor any prerequisites. Usage is inferable rather than directed.

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