Skip to main content
Glama
Next.js DevTools MCP

Next.js DevTools MCP

Official
by vercel

browser_eval

Sets up agent-browser CLI and guides you to run commands for opening pages, clicking, typing, screenshots, and capturing console errors in a real browser.

Instructions

Set up and use browser automation for this project via the agent-browser CLI.

This tool does NOT drive the browser itself. It points you at agent-browser — a fast, native browser-automation CLI built for agents (https://github.com/vercel-labs/agent-browser) — and tells you how to install it (if needed) and where to start. You then run its commands directly (you have shell access), which is faster and more capable than proxying automation through MCP.

Call this when you need to open pages, click, type, screenshot, or capture console errors in a real browser.

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": "browser_eval"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskNoOptional: what you want to do in the browser (e.g. 'open localhost:3000 and check for console errors'). Used only to tailor the guidance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.4.2
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / task / description
      Added value: +"Optional: what you want to do in the browser (e.g. 'open localhost:3000 and check for console errors'). Used only to tailor the guidance."
  2. Changed20 schema fields changedv0.4.0
    • removedInput schema / properties / action
      Removed value: -{
      -  "description": "The action to perform using browser automation",
      -  "enum": [
      -    "start",
      -    "navigate",
      -    "click",
      -    "type",
      -    "fill_form",
      -    "evaluate",
      -    "screenshot",
      -    "console_messages",
      -    "close",
      -    "drag",
      -    "upload_file",
      -    "list_tools"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / browser
      Removed value: -{
      -  "enum": [
      -    "chrome",
      -    "firefox",
      -    "webkit",
      -    "msedge"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / button
      Removed value: -{
      -  "enum": [
      -    "left",
      -    "right",
      -    "middle"
      -  ],
      -  "type": "string"
      -}
    • removedInput schema / properties / doubleClick
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / element
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / endElement
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / endRef
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / errorsOnly
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / fields
      Removed value: -{
      -  "items": {
      -    "properties": {
      -      "selector": {
      -        "type": "string"
      -      },
      -      "value": {
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / files
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / fullPage
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / headless
      Removed value: -{
      -  "type": "boolean"
      -}
    • removedInput schema / properties / modifiers
      Removed value: -{
      -  "items": {
      -    "type": "string"
      -  },
      -  "type": "array"
      -}
    • removedInput schema / properties / ref
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / script
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / startElement
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / startRef
      Removed value: -{
      -  "type": "string"
      -}
    • addedInput schema / properties / task
      Added value: +{
      +  "type": "string"
      +}
    • removedInput schema / properties / text
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / url
      Removed value: -{
      -  "type": "string"
      -}
  3. First observedv0.3.10

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose the non-obvious behavior: the tool returns install/startup guidance rather than performing automation, requires shell access to act on that guidance, and links the upstream project. It does not specify how automatic any installation is or what the response body looks like, which is the main remaining gap for a tool with zero annotation coverage.

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 key constraint (it does not drive the browser) is front-loaded in the second sentence, and the call condition is placed last where an agent looks for it. Some wording is promotional ('fast, native browser-automation CLI built for agents') plus a raw URL, which is slightly more than strictly needed, but each part still serves routing or setup.

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?

For a zero-required-parameter tool with no output schema, the description covers the essentials: what it does, what it does not do, the prerequisite (shell access), and roughly what it returns (install guidance and a starting point). The exact shape of the returned guidance is left unspecified, which is a minor omission given the tool's simplicity.

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% for the single optional 'task' parameter, so the schema already explains it. The description never mentions the parameter at all, adding no meaning beyond what is structured. Basline 3 applies when the schema does the work.

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 opens with a specific verb and resource ('Set up and use browser automation ... via the agent-browser CLI') and immediately draws the crucial boundary that it does NOT drive the browser itself but instead points the agent at the CLI. That negative framing is exactly what prevents the agent from misreading the tool as a page-driving action, and it distinguishes this tool from the nextjs_* siblings.

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?

It gives a concrete trigger list: 'Call this when you need to open pages, click, type, screenshot, or capture console errors in a real browser.' It also contrasts the recommended path (running CLI commands directly because you have shell access) with the slower alternative of proxying automation through MCP. It stops short of explicit when-not-to-use conditions, so it is clear context rather than a full routing rule.

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

Deploy Server

Other Tools