Skip to main content
Glama

Build a Next.js Dockerfile

build_nextjs_dockerfile
Read-onlyIdempotent

Generate a production Dockerfile, dockerignore, compose file, and next.config snippet for a Next.js app. Defaults match a pnpm standalone image.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "build_nextjs_dockerfile"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoslim
nodeNo22
portNo
turboNo
prismaNo
migrateNo
healthPathNo/api/health
publicEnvsNo
standaloneNo
cacheMountsNo
healthcheckNo
packageManagerNopnpm
telemetryDisabledNo

Output Schema

NameRequiredDescriptionDefault
imageYes
composeYes
commandsYes
dockerfileYes
nextConfigYes
dockerignoreYes
estimatedSizeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and openWorldHint=false, so the safety profile is covered. The description adds that four artifacts are produced and that defaults target a pnpm standalone image, but it does not say whether files are written to disk or returned as text, nor how the many flags interact.

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?

Two short sentences, front-loaded with the generated artifacts and followed by the default-profile note. No filler or restatement of the title.

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?

With 13 undocumented parameters and an output schema that covers only return values, the description is far too thin to tell an agent what each flag changes in the generated artifacts. The essentials of a correct invocation, especially flag interactions and whether file output happens, are missing.

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 0% across 13 parameters, so the schema supplies names, enums, and defaults but no meaning. The description compensates only partially, clarifying the packageManager default (pnpm) and standalone (true) while leaving base, node, turbo, prisma, migrate, healthPath, publicEnvs, cacheMounts, healthcheck, and telemetryDisabled unexplained, including dependencies such as migrate requiring prisma.

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?

The description names a specific verb ("Generate") and enumerates the concrete artifacts produced: Dockerfile, dockerignore, compose file, and next.config snippet, scoped to Next.js apps. That is precise enough for an agent to know exactly what it gets back, though there is no explicit differentiation from any sibling tool.

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 word "production" hints at the context (not dev-time images), but there is no statement of when to use this versus hand-writing a Dockerfile, no prerequisites, and no exclusion conditions. An agent must infer usage from the artifact list alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.