Skip to main content
Glama
GWShield Image Builder

GWShield Image Builder

Official
by gwshield

generate_dockerfile

Generates hardened multi-stage Dockerfiles from a service name, version, and build family so users can create container images aligned with the 15 GWShield pillars.

Instructions

Generate a hardened Dockerfile following all 15 GWShield pillars

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": {
      "serviceName": "<serviceName>",
      "serviceVersion": "<serviceVersion>",
      "family": "<family>"
    },
    "name": "generate_dockerfile"
  }
}

Input Schema

NameRequiredDescriptionDefault
familyYesImage build family
profileNoImage profile variantstandard
volumesNoVolume mount points (e.g., ["/data"])
sourceUrlNoURL to download the source tarball
descriptionNoImage description for OCI labels
exposePortsNoPorts to expose (e.g., [6379])
runtimeDirsNoRuntime directories to create (e.g., ["/data", "/var/log/redis"])
serviceNameYesService name (e.g., 'redis', 'traefik')
sourceFilesNoF-5: Explicit source files/dirs to COPY (go-static, rust-static only). Generates a layer-caching pattern (manifests first, then source). Omit for c-musl/c-glibc — those families build from tarball in-container. Example for Go: ['go.mod', 'go.sum', 'main.go', 'pkg/', 'internal/']
extraBuildDepsNoAdditional Alpine build dependencies
serviceVersionYesService version (e.g., 'v7.4.8', 'v3.6.9')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden, and it discloses almost nothing: not the return form (string, file path, or artifact), whether anything is written to disk, or what 'hardened' and '15 pillars' concretely entail. It does signal that output is opinionated/safety-oriented, which is the only real behavioral information conveyed.

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?

A single front-loaded sentence with no filler or redundancy. It is efficient, though its brevity is closer to under-specification than to disciplined concision.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter generation tool with no annotations and no output schema, one sentence is inadequate: the agent gets no guidance on required-vs-optional intent, how family/profile interact, or what it receives back. The rich schema compensates for parameter meaning but not for workflow or output context.

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 description coverage is 100%, so all 11 parameters including the two enums (family, profile) are already documented in the schema. The description adds no meaning beyond that, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and artifact ('Generate a hardened Dockerfile') plus a distinguishing qualifier ('following all 15 GWShield pillars'). An agent can tell this apart from validate_dockerfile (validation) or generate_dockerignore (ignore file) by the resource name. It stops short of an explicit sibling callout, and 'GWShield pillars' is unexplained jargon.

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

Usage Guidelines2/5

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

The description gives no when-to-use context, no preconditions, and no routing to alternatives such as validate_dockerfile or suggest_runtime_base. An agent must infer that this is the first step in a workflow from the tool name alone.

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