Skip to main content
Glama

page_state

Read-only

Reads the live state of an interactive page—what users added, edited, or checked off—and returns the state, stateRevision, and eventCursor, optionally for a specific path.

Instructions

Read the live state of an interactive page: what the user has actually added, edited, or checked off. Returns the state (or, with path, just that part), stateRevision, and eventCursor (pass it to page_wait to wait for events after this read). Works whether or not the tab is focused, closed, or the browser is open. On a page with large arrays, read one part: path "cards/num=12", or path "cards" with where. Images on a single card or todo are attached so you can see them; a whole-board read does not inline every cover. Pages with template actions often have a cheaper list action. Do not poll this tool while waiting for the user — use page_wait.

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": "page_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoTab id, e.g. t_ab12cd34.
keyNoPage key, e.g. scribe:sprint-notes.
pathNoReturn only the value at this path. "/"-separated: a key on an object; on an array an item's id ("cards/c_12ab"), a field=value match ("cards/num=31"), or "#<index>". Same paths as page_update ops.
guideNoInclude the page's template guide even if it was already sent in this session.
whereNoWith a path to an array: only the items whose fields equal these values, e.g. path "cards", where { col: "col_ab12" }.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true; the description adds substantial behavioral context beyond that — the read works regardless of tab focus, closed tab, or browser state, large arrays should be sliced via path/where, images are inlined only for single cards/todos and not for whole-board reads, and eventCursor must be carried into page_wait. These are non-obvious operational traits an agent could not derive from the schema alone.

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?

It is dense but front-loaded: purpose and return shape come first, then scoping tactics, then the anti-pattern warning. Almost every sentence carries operational value, though the closing clauses about template list actions and image inlining read as packed asides that could be trimmed or separated for scanability.

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?

With no output schema and five optional parameters, the description still explains what is returned, how to narrow the return, the eventCursor handoff, and the environment conditions under which the read succeeds. Nothing an agent needs to call this correctly — or to avoid the common polling mistake — is missing.

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 path, where, guide, id, and key are already documented with examples, making 3 the baseline. The description restates the path/where usage pattern ("cards/num=12", path "cards" with where) but adds little syntax or format detail that the schema does not already carry.

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 opens with a specific verb and resource — 'Read the live state of an interactive page' — and narrows scope to what the user actually changed ('added, edited, or checked off'). It also names the return fields (state, stateRevision, eventCursor), so an agent knows exactly what it gets back without opening anything else.

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?

It gives explicit when-to-use guidance (read one part via path on large-array pages; use where to filter array items) and a clear prohibition with the alternative named: 'Do not poll this tool while waiting for the user — use page_wait.' It also hints that template pages may expose a cheaper list action, so the agent has a routing signal rather than a bare instruction.

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