Skip to main content
Glama
ademdeniz
by ademdeniz

get_page_state

Retrieve the current page state — title, URL, visible text, interactive elements, and console errors — to understand what is on screen before deciding the next action.

Instructions

Get the current state of the page — title, URL, visible text, interactive elements, and console errors. Use this to understand what is on screen before deciding the next action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoScope to a specific element — returns only that element's state
includeHtmlNoInclude truncated outer HTML of the body (default: false)
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses what the tool returns (title, URL, visible text, etc.) and mentions truncated HTML, which gives useful context. However, it does not explicitly state that the tool is non-mutating or describe any side effects, permissions, or limitations beyond truncation.

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?

The description is two concise sentences. The first states what it does and what it returns; the second provides usage guidance. There is no redundancy or extraneous detail.

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

Completeness4/5

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

For a simple read tool with no output schema, the description lists the main return components and usage context. It could be more explicit about response structure or the meaning of 'interactive elements', but it is sufficiently complete for an agent to select and invoke the tool 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?

Both parameters have 100% schema coverage, so the baseline is 3. The description does not add significant meaning beyond the schema; it only mentions the tool's overall output, not how the parameters affect the result. The schema already explains selector and includeHtml.

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 clearly states the tool gets the current page state and enumerates specific components (title, URL, visible text, interactive elements, console errors). This is more specific than just 'get state' and distinguishes it from siblings like screenshot (visual) and evaluate (JavaScript).

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?

The description explicitly advises to use this tool to understand what is on screen before deciding the next action, providing a clear context. It does not explicitly name alternatives or exclusions, but the instruction is enough to guide appropriate use.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ademdeniz/playwright-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server