Skip to main content
Glama

chrome_evaluate

Destructive

Run JavaScript in a Chrome tab's page context via the debugger by passing an expression, and receive the JSON-serializable result for browser automation and page inspection.

Instructions

Run JavaScript in a tab's page context (via the debugger). Pass an expression; the JSON-serializable result is returned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNoChrome tab id (default: active tab)
expressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior3/5

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

Annotations already declare this is non-read-only, destructive, open-world, and non-idempotent. The description adds the useful 'via the debugger' context and the fact that the result must be JSON-serializable, but says nothing about what can be mutated, error/timing behavior, or the consequences of running arbitrary code.

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?

Two short sentences, front-loaded with the action and scope, zero filler. Every clause earns its place.

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?

No output schema exists, so the description reasonably covers the return ('the JSON-serializable result is returned'), and annotation coverage handles the safety profile. However, for a tool that executes arbitrary code, the lack of any note on error handling, async/promise handling, or scope limits leaves real gaps.

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 50%: tabId is documented in the schema (default active tab) while expression has no schema description. The description compensates partially by stating an expression must be passed and that its result must be JSON-serializable, but adds no format or syntax detail beyond that.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource — run JavaScript in a tab's page context — and notes the mechanism (via the debugger). It is clearly distinguishable from retrieval siblings like chrome_get_text or chrome_console, though it does not explicitly contrast itself with browser_evaluate or chrome_console.

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 when-to-use guidance, no prerequisites, and no naming of alternatives such as chrome_console or browser_evaluate. The only hint is the procedural 'Pass an expression', which is invocation mechanics rather than selection guidance.

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