explain_layers
Explains Dockerfile layer creation and estimated sizes, and identifies instruction-order issues that invalidate build cache or bloat images.
Instructions
Explain which Dockerfile instructions create image layers, with heuristic size hints (small/large and why), and list ORDER problems that invalidate the build cache or bloat the image (COPY . before dependency install, cleanup in a later layer, recursive chown after COPY, volatile build args before expensive steps). Sizes are estimates; nothing is built.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "explain_layers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |