Skip to main content
Glama

console_evaluate

Run JavaScript in the page to read application state; on failure, receive detailed exception messages and stack traces.

Instructions

Run a JavaScript expression in the page and return its value. On failure returns the full exception detail (message, 1-based line and column, URL, stack). Use it to read app state; use debugger_evaluate_at_frame instead when you are paused and need a local variable.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
expressionYesJavaScript to evaluate in the page's main frame.
timeout_msNoAbandon the evaluation after this long.
await_promiseNoAwait the result if the expression returns a promise.
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose important behavior: success returns a value, and failure returns full exception detail (message, 1-based line/column, URL, stack). It does not explicitly warn about potential side effects of arbitrary JS execution, though the phrase 'read app state' implies a read-oriented intent. This is a minor omission, not a major gap.

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?

Three tight sentences, each earning its place: the action, the error behavior, and the usage alternative. The most important information is front-loaded in the first sentence. No fluff or repetition.

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?

No output schema exists, so the return value and error detail provided in the description are essential and well-covered. For a tool with 3 well-documented params, this is sufficient, though a note on promise behavior when await_promise is false and a warning about side effects would make it fully complete.

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 description coverage is 100%: every parameter already has a clear description. The tool description adds no parameter-level semantics beyond what the schema provides, so the baseline of 3 is appropriate.

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 specific action ('Run a JavaScript expression in the page and return its value') and distinguishes itself from the key sibling debugger_evaluate_at_frame by contrast ('use debugger_evaluate_at_frame instead when you are paused and need a local variable'). This makes it easy for an agent to select the right tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Explicitly gives a primary use case ('Use it to read app state') and names the alternative with a concrete condition ('use debugger_evaluate_at_frame instead when you are paused and need a local variable'). This is clear when-to-use and when-not-to-use guidance.

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

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/Dayananda-D/Devcdp'

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