Skip to main content
Glama

eval

Runs JavaScript in the League of Legends client page and returns JSON results, including awaited promises and Riot plugin APIs, for inspecting or controlling client state.

Instructions

Runs JavaScript in the client page and returns the JSON result. Wrap statements in an async IIFE or just write an expression; promises are awaited. rcp.get("rcp-fe-lol-<plugin>") returns Riot plugin APIs.

Input Schema

NameRequiredDescriptionDefault
codeYes
timeoutMsNoDefault 30000.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotation only declares readOnlyHint=false, and the description is consistent with that (arbitrary JS execution is not read-only). It adds genuinely useful behavioral context — promises are awaited and the result is JSON — but omits side-effect warnings, what happens on timeout (error vs partial result), and any execution-context restrictions. For an arbitrary-code tool that is a notable 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 short sentences, front-loaded with what the tool does, then input format, then the plugin-API affordance. No filler and every clause carries information an agent can act on.

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

Completeness3/5

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

With no output schema, the description does state the return is a JSON result, which covers the basics. But for a high-power eval tool with a mutating annotation and no sibling differentiation, it should also cover timeout/error behavior and clarify its relationship to `script`; those omissions matter given the tool's blast radius.

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?

At 50% schema coverage, `code` is undocumented in the schema, and the description compensates well by explaining the accepted forms (expression or async IIFE) and that promises resolve. The second parameter, `timeoutMs`, is covered only by a terse schema default and gets no mention in the description, leaving the coverage gap half-closed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ("Runs JavaScript in the client page") plus the return shape ("returns the JSON result"), so the agent knows exactly what the tool does. It does not, however, distinguish itself from the sibling tool `script`, which plausibly overlaps — an agent must guess which one to reach for.

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

Usage Guidelines3/5

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

It gives useful authoring guidance — "Wrap statements in an async IIFE or just write an expression; promises are awaited" — which tells the agent how to format input. But it never says when to prefer this over `script`, `query`, `state`, or `lcu`, nor when to avoid it, so the selection decision is left implicit.

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