Skip to main content
Glama

upgrade_nextjs_16

Upgrade Next.js to version 16 with codemod automation for async API changes, config migration, and React 19 compatibility, plus manual fixes for remaining issues.

Instructions

Guide through upgrading Next.js to version 16.

CRITICAL: Runs the official codemod FIRST (requires clean git state) for automatic upgrades and fixes, then handles remaining issues manually. The codemod upgrades Next.js, React, and React DOM automatically.

Covers:

  • Next.js version upgrade to 16

  • Async API changes (params, searchParams, cookies, headers)

  • Config migration (next.config changes)

  • Image defaults and optimization

  • Parallel routes and dynamic segments

  • Deprecated API removals

  • React 19 compatibility

The codemod requires:

  • Clean git working directory (commit or stash changes first)

  • Node.js 18+

  • npm/pnpm/yarn/bun installed

After codemod runs, provides manual guidance for any remaining issues not covered by the codemod.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathNo
Behavior4/5

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

Reveals key behavior: runs codemod first, requires clean git state, covers multiple upgrade aspects, and handles remaining issues manually. No annotations provided, so description carries burden adequately.

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?

Well-structured with bullet points for coverage and requirements. Front-loaded critical info like the codemod requirement. Slightly long but clear.

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

Completeness4/5

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

Given one parameter and no output schema, description covers the process, prerequisites, and scope of upgrade. Lacks explicit mention of output/result but is sufficient for understanding.

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

Parameters2/5

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

Input schema has one parameter 'project_path' with no description. The description implies it's the project path but does not explicitly explain its purpose or format. With 0% schema coverage, description should compensate but falls short.

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?

Clear verb 'Guide through upgrading' and specific resource 'Next.js to version 16'. Distinct from sibling tools which are for other Next.js operations or unrelated tasks.

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

Usage Guidelines4/5

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

Explicitly states when to use (upgrading Next.js to v16) and prerequisites (clean git state, Node 18+, package manager). Does not explicitly mention when not to use, but context makes it clear.

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/DaJo-Code/midnight-nextjs-mcp'

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