Skip to main content
Glama
vercel

Next.js DevTools MCP

Official
by vercel

nextjs_call

Call a specific MCP tool on a running Next.js dev server. Provide the server port and tool name. Use nextjs_index first to discover available tools, servers, and input schemas.

Instructions

Call a specific MCP tool on a running Next.js development server.

REQUIREMENTS:

  • Port number of the target Next.js dev server

  • Tool name to execute

  • Optional arguments object (if the tool requires parameters)

Use 'nextjs_index' first to discover available servers, tools, and their input schemas. If 'nextjs_index' auto-discovery fails, ask the user for the port and call 'nextjs_index' again with the 'port' parameter.

IMPORTANT: When calling tools:

  • The 'args' parameter MUST be an object (e.g., {key: "value"}), NOT a string

  • If a tool doesn't require arguments, OMIT the 'args' parameter entirely - do NOT pass {} or "{}"

  • Check the tool's inputSchema from 'nextjs_index' to see what arguments are required

Common Next.js MCP tools include:

  • Error diagnostics (get compilation/runtime errors)

  • Route information (list all routes)

  • Build status (check compilation state)

  • Cache management (clear caches)

  • And more (varies by Next.js version)

Example usage:

  1. Call 'nextjs_index' to see servers and tools

  2. Call 'nextjs_call' with port=3000, toolName="get_errors" to get errors from server on port 3000

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoPort number of the Next.js dev server (required).
toolNameNoName of the Next.js MCP tool to call (required). Use 'nextjs_index' first to discover available tool names.
argsNo
Behavior3/5

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

No annotations are provided, so the description carries the full burden. However, the description focuses on usage instructions (how to call) rather than behavioral traits like idempotency, side effects, or error handling. It does not reveal what happens when a tool fails or whether it is read-only. This leaves gaps in transparency.

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?

The description is well-structured with headers (REQUIREMENTS, IMPORTANT, Common tools, Example usage) and front-loads the core purpose. It is slightly verbose due to the list of common tools and repeated examples, but every sentence adds value. A minor trim could improve conciseness.

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 3 parameters, no output schema, and no annotations, the description covers prerequisites (port, toolName, args), how to discover tools, and parameter formatting. It lacks details on output format or error responses, but for a tool that delegates to other tools, this is acceptable. Overall, it is nearly complete.

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

Parameters4/5

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

Schema coverage is 67%, with the 'args' parameter lacking a description in schema. The description compensates by explaining that 'args' must be an object (not a string) and should be omitted if not needed. This adds significant meaning beyond the schema, though some parameter details (like type constraints for port) are already clear from schema.

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 tool's verb 'call' and resource 'MCP tool on a Next.js dev server'. It distinguishes from siblings like 'nextjs_index' by specifying that this tool executes a call rather than discovering tools. The purpose is specific and unambiguous.

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

Usage Guidelines5/5

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

The description provides explicit when-to-use guidance: requires a port, tool name, and optional args; instructs to use 'nextjs_index' first for discovery. It includes important notes on args formatting and example usage. This fully informs the agent on correct invocation.

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/vercel/next-devtools-mcp'

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