Skip to main content
Glama

read_page_variable

Read a value from a page's own JavaScript without executing page code; getters and proxies are identified, not opened. Use only when Secret Layer is off.

Instructions

A value from the page's own JavaScript, such as window.__APP_STATE__.cart, read without running any of the page's code: getters and proxies are named, never opened. Only with the Secret Layer off.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "read_page_variable"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose a genuinely non-obvious behavior: values are read without executing page code, and getters/proxies are 'named, never opened', which tells the agent reads have no side effects. It does not say what happens when the path is absent or missing, but the key safety trait is covered.

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?

A single dense sentence with no filler, and the core action is front-loaded ahead of the example. The colon-clause construction is slightly convoluted but every segment contributes information.

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?

For a tool with no annotations, no output schema, and no parameters, the description leaves essential mechanics unexplained: how the agent designates which variable to read, and what is returned on success or when the path does not exist. The behavioral note about getters is helpful but does not compensate for these gaps.

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?

The schema declares zero parameters, which would normally set the baseline at 4. But the description's example implies a target path must be supplied somehow, and it never explains how the variable is selected with no input fields — leaving a real ambiguity about invocation despite the empty schema.

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 gives a specific verb and resource: reading a value out of the page's own JavaScript, illustrated with a concrete path (`window.__APP_STATE__.cart`). It is clear what the tool does, but it never names or contrasts itself with plausible siblings such as `evaluate_script` or `read_value`, so the agent must infer the boundary between them.

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?

The trailing clause 'Only with the Secret Layer off' is a real gating condition, which is more than most definitions offer. However, there is no explicit routing guidance (when to prefer this over `evaluate_script` or `read_value`, or what to do when the page has no such state), so usage is only implied.

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