Skip to main content
Glama

Web Eval

web_eval
Destructive

Runs arbitrary JavaScript in a web session and returns the last expression's value. Always active. Disabled when LMCP is in read-only mode. POWER-USER tool — a page could feed malicious code, so prefer web_find / web_read / web_extract for normal use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsYesJavaScript to evaluate on the page; the last expression's value is returned.
sessionNoSession name (default 'default').

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the risk profile is partly covered; the description still adds non-derivable context — the read-only-mode gate and the security rationale ('a page could feed malicious code'). It stops short of saying what 'arbitrary JS' can mutate or whether execution is sandboxed.

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 short sentences, front-loaded with what the tool does, then operating constraint, then the routing advice to safer siblings. No filler or redundancy.

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

Completeness5/5

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

There is no output schema, and the description covers the return value ('last expression's value'), the availability condition, and the safety caveat — the three things an agent needs to decide and invoke correctly.

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%, so both 'js' and 'session' are already documented, and the description adds no syntax, scoping, or default details beyond them. Baseline 3 applies when the schema carries the parameter burden.

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 specific verb and resource ('Runs arbitrary JavaScript in a web session') plus the return semantics ('returns the last expression's value'). It also differentiates itself from the normal-use siblings web_find, web_read, and web_extract, so an agent can place it without opening the schema.

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?

Explicit when-not guidance: it is a POWER-USER tool and normal use should prefer web_find / web_read / web_extract, plus an environmental precondition ('Disabled when LMCP is in read-only mode'). Both the alternative and the selecting condition are named.

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