Skip to main content
Glama

wb_evaluate

Execute JavaScript in the active browser page to retrieve data or manipulate state, returning compact JSON output.

Instructions

Run JavaScript in the page. Prefer compact JSON.stringify returns. Wrap multi-call state in an IIFE.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
sessionNoPer-call session override (does not change the process default)
Behavior2/5

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

With no annotations, the description carries the full burden. It reveals preferred return style and state management through IIFE, but does not disclose execution context, side effects on the page, error handling, or permissions required. This is a significant gap for a code execution 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 extremely concise, front-loading the core purpose in the first sentence. The two additional tips are specific and actionable, with no fluff or wasted words. It is appropriately sized for the information it conveys.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a powerful code execution tool with no output schema and sparse annotations. The description covers basic usage tips but omits crucial context such as return value format, error behavior, execution environment, and whether results are captured. Given the tool's power, the description is incomplete for an agent to use it reliably.

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

Parameters2/5

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

Schema coverage is only 50% (session is described, code is not). The description adds no direct explanation of the 'code' parameter beyond 'run JavaScript,' and the session parameter is already explained in the schema. The guidance about returns and IIFE does not clarify parameter meanings or syntax.

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 'Run JavaScript in the page,' using a specific verb and resource. This distinguishes it from sibling browser automation tools like navigate, click, and fill, which perform different actions. The purpose is unambiguous.

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?

The description provides no guidance on when to use this tool over alternatives, nor does it mention exclusions or prerequisites. It offers coding tips (compact JSON.stringify, IIFE) but no context on selecting this tool versus another. Sibling tools are not referenced for differentiation.

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/Nimm0ny/kimi-webbridge-mcp'

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