Skip to main content
Glama

Validate Next.js build

nextjs_build

Validate a Next.js project build by running next build and receiving structured TypeScript, module, and page errors, along with generated pages and their render types and sizes.

Instructions

Runs next build and returns structured errors (TypeScript, module, page-level) plus a list of generated pages with their render types and sizes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoExtra env vars for the build, e.g. { NEXT_PUBLIC_API_URL: '...' }
project_dirYesAbsolute path to the Next.js project root
timeout_secondsNo
Behavior2/5

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

Annotations are completely absent, so the description must disclose behavioral traits. It mentions running a build and returning errors, but omits side effects like the creation/modification of build artifacts (e.g., .next directory), potential long execution time (timeout parameter exists), and that a failed build may still return partial output. The description does not fully cover the tool's impact or failure modes.

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?

A single, concise sentence that front-loads the core command and lists key outputs with no filler. Efficiently communicates essential information.

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

Completeness3/5

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

The description provides some return-value detail (structured error types and page list) but lacks full context: no output schema, no mention of side effects, environment requirements, or how to interpret the results. It gives a reasonable overview but is incomplete for a tool that runs a full build without annotations.

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 covers 67% of parameters (env and project_dir have descriptions; timeout_seconds does not). The description adds no extra parameter context beyond what the schema provides, though the missing timeout parameter is self-explanatory. Since coverage is moderate but the description adds no value, a score of 3 is appropriate—adequate but not insightful.

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 clearly states the action ('Runs next build') and the specific outcomes (structured errors and generated pages list). It distinguishes itself from siblings like typecheck and npm_run by being Next.js-specific and producing build validation output. No ambiguity.

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?

There is no guidance on when to use this tool versus alternatives (e.g., typecheck, npm_run). It does not state prerequisites, like that a Next.js project must exist, or when it should be preferred over other validation tools. The agent is left to infer usage from the name and output description.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/briancox730/dev-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server