Skip to main content
Glama

evaluate

evaluate

Run JavaScript in the page; returns JSON (5 s, 64 KiB). For data the snapshot lacks, not for clicking. No crypto.subtle on http pages (downloads give sha256).

Input Schema

NameRequiredDescriptionDefault
refNoelement passed as `el`
scriptYesJavaScript: an expression, or a function body with return; await allowed
secretYessession secret from create_session
session_idYessession id from create_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Adds real constraints beyond the annotations: a 5-second timeout, a 64 KiB return cap, and the crypto.subtle limitation on http pages with the workaround (downloads give sha256). The annotations declare readOnlyHint=false and destructiveHint=false, consistent with arbitrary JS execution that may mutate, and the description's 'not for clicking' framing reinforces the intent. It does not state what permissions the script runs under or how errors surface.

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?

Roughly 25 words carrying purpose, usage boundary, return type, timeout, size cap, and a platform caveat. Front-loaded with the action and result, with constraints after – nothing wasted and nothing buried.

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?

For a 4-parameter arbitrary-execution tool with no output schema, the description covers the return type, runtime limits, and a known platform restriction. It leaves open script sandboxing and error behavior, which an agent might want before running a script that fails or times out.

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 all four parameters are documented in the schema, including that `ref` is bound to `el` and that `script` is an expression or a function body with await allowed. The description adds no parameter-level detail beyond that, so the baseline of 3 applies.

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?

States a concrete verb and resource ('Run JavaScript in the page') and immediately pins down the return shape ('returns JSON'). The clause 'For data the snapshot lacks, not for clicking' distinguishes it from both `snapshot` and `act` without requiring the agent to open either schema.

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?

Gives an explicit inclusion ('for data the snapshot lacks') and exclusion ('not for clicking'), which routes the agent toward `snapshot`/`extract` for structured reads and `act` for interaction. It does not name `extract` as the alternative for bulk data extraction, so routing against that sibling is left implicit.

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.

Resources