Skip to main content
Glama

page_state

Read-onlyIdempotent

Capture a current page snapshot with URL, title, viewport, interactable elements, and form fields to inspect what changed after browser actions without screenshots; optionally include a text summary.

Instructions

[Agent Browser] Get comprehensive current page state snapshot. Returns: URL, title, viewport size, visible interactable elements, and form fields. Use this after actions to understand what changed without taking a screenshot. Set include_text=True to also get a text summary of the page content (headings, key text).

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
include_textNo

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: this is a post-action diff-inspection snapshot rather than a visual capture, and the include_text flag expands the payload to page content. It does not warn about payload size or context cost, which keeps it out of the top band.

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?

Four short, front-loaded lines with a clear shape: purpose, return contents, usage trigger, parameter hint. The 'Returns:' enumeration is partly duplicative given an output schema exists, but it still aids tool selection and costs only one line.

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?

For a one-optional-parameter read tool with full annotations and an output schema, the description covers purpose, payload scope, when to invoke, and the only parameter. Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the single parameter is fully explained: 'Set include_text=True to also get a text summary of the page content (headings, key text).' That compensates entirely for the schema gap, telling the agent what the flag adds, its type via example, and the default-off behavior implied by the conditional phrasing.

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 ('Get comprehensive current page state snapshot') and then enumerates exactly what the snapshot contains (URL, title, viewport size, interactable elements, form fields). It also explicitly distinguishes itself from the screenshot sibling, so an agent can pick it without opening another 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 a concrete usage trigger: 'Use this after actions to understand what changed without taking a screenshot,' which names the main alternative and the condition favoring this tool. It stops short of exhaustive when-not guidance (e.g., versus text or get_page_markdown when page content rather than structure is needed).

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