Skip to main content
Glama
xrntkk
by xrntkk

evaluate_in_renderer

Run JavaScript code in an Electron renderer page via CDP. Obtain page IDs from list_pages.

Instructions

Evaluate a JavaScript expression in a renderer page via CDP. Use list_pages to find page ids.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesPage id from list_pages.
sessionIdYesSession id returned by launch_app.
expressionYesJavaScript expression to evaluate (returned by value).
awaitPromiseNoAwait the result if it is a promise (default true).
Behavior2/5

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

No annotations are provided, and the description gives minimal behavioral details beyond the basic action. It does not disclose potential side effects, error conditions, or whether the expression is awaited (though the awaitPromise parameter hints at this). The description carries the full burden but fails to provide sufficient 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?

The description is extremely concise with two sentences. The first sentence clearly states the purpose, and the second provides a crucial prerequisite. No redundant information.

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?

While the description covers the basic purpose and a prerequisite, it lacks differentiation from similar sibling tools (e.g., evaluate_in_main, evaluate_on_call_frame) and does not describe the return value or error behavior. Given the tool's complexity and no output schema, more context would be beneficial.

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%, so the baseline is 3. The description adds minimal context beyond what is already in the schema (e.g., pageId from list_pages, sessionId from launch_app). It does not provide new semantic meaning for the parameters.

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 evaluates a JavaScript expression in a renderer page via CDP. It uses specific verbs and resources, and implicitly distinguishes from sibling tools like evaluate_in_main or evaluate_in_worker.

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 prerequisite: 'Use list_pages to find page ids.' This guides the agent on what information is needed. However, it does not explicitly state when not to use this tool or compare it to alternatives like evaluate_in_main for main frame execution.

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/xrntkk/debugtron-mcp'

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