Skip to main content
Glama
497187419

TraeBridge MCP Server

by 497187419

Evaluate JavaScript

browser_evaluate

Execute custom JavaScript in the active page context and return JSON-serializable values for debugging, scraping, or automation.

Instructions

Evaluate arbitrary JavaScript code in the context of the current page and return the result (JSON-serializable values only).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe JavaScript code to evaluate in the page context

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
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 discloses one useful trait (returns JSON-serializable values only), but says nothing about whether the code runs in the page's main world, whether it can mutate the DOM/state, async/timeout behavior, or sandboxing/security implications of executing arbitrary code.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence with no filler; the key constraint (JSON-serializable return) is placed at the end efficiently. It is tight and earns its length.

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

Completeness3/5

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

For a one-parameter tool with full schema coverage and no output schema, the description is adequate but thin: it hints at the return type but not its structure, and omits mutation/security context that matters for arbitrary code execution.

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 coverage is 100% for the single 'code' parameter, so the schema already documents it fully. The description adds nothing beyond what the schema provides, which is the expected baseline when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (Evaluate) and resource (arbitrary JavaScript in the current page context), so the agent knows exactly what it does. It is reasonably distinct from siblings like browser_click/browser_snapshot, though it doesn't explicitly position itself against the potentially overlapping browser_cdp.

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?

There is no guidance on when to use this tool versus alternatives such as browser_cdp or the DOM-specific siblings, nor any mention of prerequisites. The agent must infer that this is the escape hatch for arbitrary script execution.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.