Skip to main content
Glama
zhiqi-li

browser-mcp-cdp

by zhiqi-li

browser_evaluate

Execute JavaScript in the browser's current page context and retrieve the result. Optionally wait for async expressions to complete.

Instructions

Execute JavaScript in the current page context and return the result. Use await_promise=true (default) for async expressions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesJavaScript expression to evaluate
await_promiseNoSet to "false" to skip awaiting a returned Promise (default: true)
Behavior3/5

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

No annotations are provided, so the description must cover behavioral traits. It mentions execution in the current page context and the return of results, but does not disclose potential side effects like page state modification or security considerations. The await_promise default behavior is mentioned, adding some transparency.

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 sentences, no wasted words. The first sentence states the primary purpose, and the second provides a crucial usage detail. It is efficiently structured.

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 simple tool with only two parameters and no output schema. It covers the core purpose and the await_promise parameter behavior. However, it does not specify the return value format (e.g., serialized JSON or string), which could be useful. Still, given the tool’s simplicity, it is largely complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by explaining the default behavior of await_promise ('true' for async expressions), which is not obvious from the schema. For the expression parameter, no additional meaning is added beyond the schema, but the overall hint is useful.

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 verb 'Execute JavaScript in the current page context and return the result.' It specifies the resource as 'JavaScript in current page context', which distinctly separates it 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 Guidelines4/5

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

The description provides a clear usage hint: 'Use await_promise=true (default) for async expressions.' This guides the agent on parameter usage. However, it does not explicitly state when to use this tool versus alternatives or when not to use it, but the purpose is distinct enough that an agent can infer usage context.

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/zhiqi-li/browser-mcp-cdp'

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