Skip to main content
Glama

browser_evaluate

Run JavaScript in the live page to read computed styles, framework state, or list lengths and return JSON without altering the page. For clicks, typing, or select changes, use the pointer and keyboard tools.

Instructions

READ from the page with JavaScript and get the result as JSON.

For what the other tools cannot see: a computed style, a value held in a framework's state, the length of a list.

Acting on the page is refused, and the refusal names the tool to use. Assigning to value, checked or selected, or calling click(), dispatchEvent(), submit() or requestSubmit(), changes the page without a real keystroke or pointer, and a page can tell. Use browser_click, browser_type or browser_select_option instead; they do the same thing through the pointer and the keyboard. Reading any of those properties is fine.

The refusal catches the obvious spellings, not every possible one. A script that slips past it is still the wrong way to do the thing: report it in your answer rather than using it.

browser is main unless you say support, and they share nothing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
browserNo
expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.43.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: it declares read-only enforcement, describes the refusal mechanism, names the mutating calls that trigger it, and even discloses the guard's limitation ('catches the obvious spellings, not every possible one') with guidance to report rather than exploit a bypass. This is unusually rich behavioral context for an unannotated tool.

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?

Purpose is front-loaded in the first line, followed by the differentiating examples. The refusal paragraph is slightly repetitive across its sentences, but each clause carries distinct guidance (what is refused, why, what to use instead, and the guard's limits), so it mostly earns its place.

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

Completeness5/5

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

Return values are covered by the output schema, and the description fills the remaining gaps: safety profile, alternative routing, the main/support browser distinction, and the guard's imperfection. For a 2-parameter unannotated read tool, nothing essential is 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 coverage is 0%, so the description must compensate. It documents `browser` well (defaults to main, support shares nothing), but `expression`'s format and expectations are only implied through prose about what the script should do, not explicitly specified.

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?

States a specific verb (read via JavaScript) and resource (the page), and immediately distinguishes itself from siblings by naming what it alone can see: 'a computed style, a value held in a framework's state, the length of a list.' An agent can tell it apart from browser_read_text, browser_read_html, and browser_snapshot without opening any schema.

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?

Gives explicit when-to-use ('for what the other tools cannot see') and when-not (acting on the page is refused), and names the exact alternatives for the write case: browser_click, browser_type, browser_select_option. Nothing about tool selection is left to inference.

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