Skip to main content
Glama
Sept-7-Qi

BrowserPilot MCP

by Sept-7-Qi

evaluate_script

Execute JavaScript in the browser page and retrieve the serialized output. Use this tool to run custom scripts that return JSON-serializable values for data extraction or page manipulation.

Instructions

Evaluate JavaScript on the page via chrome.scripting.executeScript. The script runs with extension execution semantics and must return a JSON-serializable value; returnByValue is accepted for API compatibility but the extension always returns the serialized result value.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoOptional page/tab ID to use
scriptYesThe JavaScript to evaluate
returnByValueNoAccepted for compatibility only. The extension currently always returns the serialized result value.
Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses important behaviors: runs with extension execution semantics, requires a JSON-serializable return value, and explains that returnByValue is accepted but ignored. This provides meaningful context beyond a simple operation statement.

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 concise, with two sentences covering purpose, execution semantics, and return constraints. It is front-loaded with the primary action and contains no fluff.

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?

The description is adequate for a script execution tool: it explains the action, execution context, and return value expectations. While error handling isn't mentioned, the core behavior is covered, especially given the limited schema and no output schema.

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%, and the description does not add new parameter semantics. The note about returnByValue in the description duplicates the schema's text. No extra value is provided beyond the structured fields.

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's action: 'Evaluate JavaScript on the page via chrome.scripting.executeScript.' It specifies the resource (page JavaScript) and the mechanism, making it distinct from sibling tools like click, type, or navigate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use when needing to run custom JavaScript, but it does not explicitly state when to use this tool over alternatives or provide exclusions. With sibling tools like click and type_text, no direct comparison is offered.

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/Sept-7-Qi/BrowserPilot-MCP'

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