evaluate
Evaluate JavaScript in the page context. Use return for values or an expression.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |
Evaluate JavaScript in the page context. Use return for values or an expression.
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes |
Changes observed during successful MCP inspections. Dates show when Glama detected each change.
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description does not disclose side effects or behavioral nuances beyond the annotations. Since readOnlyHint=false indicates non-read-only behavior, the agent knows it can mutate state, but the description adds no additional context like page modification risks, network access, or execution context. openWorldHint=true is also not elaborated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is exceptionally concise: two short sentences that are front-loaded. The first sentence states the core purpose, and the second adds a key usage detail. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For an arbitrary code execution tool, the description is under-specified. It does not explain what the tool returns (e.g., the evaluated value, its type, or serialization), error handling, or potential side effects on the page. With no output schema and sparse annotations, this is a significant gap for an agent to use it safely.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It meaningfully explains that the `script` parameter should contain JavaScript evaluated in the page context and clarifies how to produce values (using `return` or an expression). This goes beyond the bare schema and gives practical guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool evaluates JavaScript in the page context with a specific verb and resource, distinguishing it from sibling tools that perform specific actions (e.g., click, type_text). It is immediately obvious what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides only a syntax hint ('Use `return` for values or an expression') but no guidance on when to use this tool vs alternatives, nor any exclusions or prerequisites. It lacks context for choosing evaluate over other browser automation tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.
Each tool targets a specific browser automation action with no meaningful overlap. For example, fill_form handles multiple fields while type_text handles a single input, and extract_table/get_text/get_links/get_html are clearly distinct extraction modes.
All tool names use lowercase snake_case and mostly follow a verb_noun pattern (e.g., get_text, set_cookies, select_option). The only minor inconsistency is page_pdf, which is a noun_noun construction rather than a verb-prefixed name.
With 17 tools, the server covers navigation, interaction, extraction, cookies, screenshots, and PDF generation. This is slightly above the ideal 3-15 range but still well-scoped for a browser automation server, so it feels reasonable rather than bloated.
The tool set covers the core page lifecycle: navigate, interact (click/type/select/scroll), wait, extract content, and capture output (screenshot/PDF). Missing advanced features like back/forward or frame handling, but these are minor gaps that can be worked around.