Skip to main content
Glama
lldartsll

browser-for-claude

by lldartsll

Evaluate JS

browser_evaluate

Evaluate a JavaScript expression in the current page and return its result, enabling custom scripts and dynamic data extraction during browser automation.

Instructions

Evaluate a JavaScript expression in the page context and return the result

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
Behavior2/5

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

With no annotations, the description carries the full burden for behavioral disclosure. It fails to mention that evaluating arbitrary JavaScript could have side effects (e.g., modifying the DOM), whether the execution is synchronous or asynchronous, or what happens if the script throws an error. The return format is also unspecified.

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?

The description is a single, concise sentence with front-loaded action and object. It contains no wasted words or redundant information.

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?

The tool is simple in terms of schema (one required string param) and there is no output schema. However, the description leaves out relevant behavioral context like side effects, return value details, and error behavior. For a browser evaluation tool, these are important gaps, making the description minimally viable but not fully complete.

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?

The description adds the meaning of the 'script' parameter as a JavaScript expression, which is a small clarification beyond the bare schema type. However, it does not explain details like whether the expression must return a value, how complex scripts are handled, or if the parameter accepts statements vs. only expressions. With 0% schema coverage, this partial compensation is adequate but limited.

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 action ('Evaluate') with a specific resource ('a JavaScript expression in the page context') and the outcome ('return the result'). This distinguishes it well from sibling tools like browser_click or browser_navigate.

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?

No guidance is provided on when to use this tool vs. alternatives. The description simply states what the tool does without mentioning exclusions or recommending other browser tools for specific scenarios. The agent gets no context for choosing this over, say, browser_get_text.

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/lldartsll/browser-for-claude'

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