Skip to main content
Glama

evaluate_on_call_frame

Evaluate JavaScript expressions within a paused call frame to inspect local variables and the call stack during debugging. Requires an active breakpoint; returns expression results with type and value.

Instructions

Evaluates JavaScript expressions within the scope of a paused call frame, accessing local variables and call stack. Side effects: read-only by default; can modify state if expression includes mutations. Prerequisites: requires debugger to be paused at a breakpoint with active call frame. Returns: expression result with type and value. Use this to inspect variables and call stack during debugging. Alternatives: 'evaluate_js' for global scope evaluation, 'step_over' to advance without evaluation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tab_idNoThe Tab ID of the target tab. Omit to use the active tab.
expressionYesJavaScript expression to evaluate in call frame scope. Constraints: valid JavaScript accessing local/closure variables. Interactions: requires active paused debugger session; has access to function parameters and local variables. Defaults to: None (required).
instance_idNoChrome instance id from open_instance/list_instances. Omit for the default instance.
Behavior4/5

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

With no annotations provided, the description carries the full burden and handles it well: it discloses side effects ('read-only by default; can modify state if expression includes mutations') and prerequisites. It could go further (e.g., error behavior, impact on debugger state) but is transparent about the key behavioral traits.

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?

The description is efficiently structured: purpose, side effects, prerequisites, return info, and alternatives are each covered in one sentence without repetition. Though slightly long, every sentence adds value and the key information is front-loaded.

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?

Given the tool's moderate complexity, the description covers purpose, side effects, prerequisites, return type, and alternatives. Without an output schema, it explains what the result contains ('type and value'). It doesn't elaborate on error messages or handling, but the essential information for correct invocation is present.

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

Parameters4/5

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

Schema coverage is 100%, so parameters are well-documented. The description adds semantic context that the schema lacks, such as 'in call frame scope' and access to local/closure variables, clarifying what the expression can reference and the evaluation context. This goes beyond the baseline.

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 a specific verb ('Evaluates') and resource ('JavaScript expressions within the scope of a paused call frame') and distinguishes itself from siblings like 'evaluate_js' and 'step_over'. It also gives a concrete use case ('inspect variables and call stack during debugging'), making its purpose unmistakable.

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 mentions the prerequisite ('requires debugger to be paused at a breakpoint with active call frame') and names alternatives with reasoning ('evaluate_js' for global scope, 'step_over' to advance without evaluation). This provides 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.

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/raultov/chrome-debug-mcp'

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