Skip to main content
Glama

eval_interface

Evaluate a JavaScript expression inside an interface node's iframe. Use this to interact with rendered interfaces: click buttons, type in inputs, read DOM state, call functions, or test that the UI works correctly. The expression runs in the iframe's context with full DOM access. Returns the eval result plus any SDK calls and console logs that occurred within 100ms after execution (captures async side effects).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
node_idNo
expressionYes
workflow_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

The description discloses key behavioral traits: execution context ('runs in the iframe's context'), access level ('full DOM access'), and return value plus side effects ('captures async side effects'). This goes beyond the annotations, which only indicate readOnly and destructive flags.

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 two sentences long, front-loaded with the core action, and then provides relevant examples and output details. No unnecessary words, and the structure logically guides from purpose to use to expected behavior.

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

Completeness2/5

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

While the description covers what the tool does and what it returns, it omits crucial context about the parameters (especially the optional node_id and workflow_id) and does not address potential errors or limitations. An agent may not know how to specify the target interface or workflow.

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

Parameters1/5

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

The schema has 0% description coverage, and the description does not mention any of the three parameters (node_id, expression, workflow_id). Without explanation, an agent cannot infer their meanings or relationships, so the description fails to compensate for the lack of schema detail.

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's purpose with a specific verb ('evaluate') and resource ('interface node's iframe'), and provides concrete examples of usage. It distinguishes itself from sibling tools like get_node or update_interface by focusing on direct DOM interaction.

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 explicitly says when to use it ('Use this to interact with rendered interfaces') and gives specific use cases like clicking buttons, typing, and reading DOM. It does not explicitly contrast with alternatives, but the examples make the intended scope clear.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.