Skip to main content
Glama
ImYourBoyRoy

web-scraper-server

by ImYourBoyRoy

browser_evaluate

Execute JavaScript on the current page to extract data, inspect page state, or trigger actions, then return the result.

Instructions

Run a JavaScript expression on the current page and return the result. Useful for extracting data, checking page state, or triggering actions. Example: browser_evaluate("document.querySelectorAll('a').length")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
js_expressionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

No annotations are provided, so the description carries the burden of behavioral disclosure. It honestly states that the tool executes JavaScript and can 'trigger actions', implying side effects. However, it does not elaborate on potential risks, page mutation, execution context, or error/return behavior beyond the basic 'return the result' statement. This adds some value but leaves gaps for a powerful tool.

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 two sentences plus an example, all of which add value. It is front-loaded with the main action, provides practical use cases, and a concrete illustration. No wasted words.

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 the tool's moderate complexity, the description covers the main use cases (data extraction, state checking, actions) and supplies an example. An output schema exists, so not explaining return values is acceptable. However, it could more thoroughly address behavior in the context of a browser automation suite, such as interaction with page lifecycle or security restrictions, which prevents a 5.

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 schema has only 'js_expression' with 0% description coverage, so the description must compensate. It provides an example that clarifies the expected input ('document.querySelectorAll(\'a\').length'), but does not explain return value serialization, limitations (e.g., async, main frame), or what constitutes a valid expression. The example adds meaning, but the compensation is only partial.

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 runs a JavaScript expression on the current page and returns the result, using a specific verb ('run') and resource ('JavaScript expression on the current page'). It includes a concrete example and distinguishes itself from sibling browser tools like 'browser_click' and 'browser_type' by focusing on arbitrary JS execution.

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?

The description provides clear context on when to use the tool ('extracting data, checking page state, or triggering actions'), but does not explicitly mention when not to use it or name alternatives. This is clear context without exclusions, fitting a 4 rather than a 5.

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/ImYourBoyRoy/WebScraperToolkit'

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