Skip to main content
Glama

get_page_map

Map a web page's interactive elements, landmarks, and headings in one call to see what actions are available before clicking, with roles, names, states, and CSS selectors.

Instructions

Semantic page map in ONE call: every interactive element (links, buttons, inputs, custom controls) plus landmarks and headings, in document order — each with its ARIA role, accessible name, live state (disabled/checked/expanded/value), and a ready-to-use CSS selector. The fastest way to answer 'what can I do on this page?' — use it to orient before clicking instead of multiple get_page_elements calls. Interactive elements with no accessible name are flagged unnamed (an accessibility finding in itself). Output is compact: only truthy state fields, capped at max_nodes with an explicit truncated flag.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "session_id": "<session_id>"
    },
    "name": "get_page_map"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_nodesNoMax nodes to return (default: 150); 'total' reports how many exist
session_idYesSession ID
include_framesNoList the page's iframes (selector, url, name, cross_origin) with ready select_iframe selectors — the way into Stripe/hosted-checkout card fields (default: false; frame_count is always returned)
include_hiddenNoInclude invisible elements, flagged hidden (default: false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.12.0
    • addedInput schema / properties / include_frames
      Added value: +{
      +  "description": "List the page's iframes (selector, url, name, cross_origin) with ready select_iframe selectors — the way into Stripe/hosted-checkout card fields (default: false; frame_count is always returned)",
      +  "type": [
      +    "boolean",
      +    "string"
      +  ]
      +}
  2. Addedv0.10.0

TDQS

A4.1/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does substantial work: it discloses that unnamed interactive elements are flagged, that output is compact with only truthy state fields, and that results are capped at max_nodes with an explicit truncated flag. What it omits is whether the tool is strictly read-only or has side effects, and any note on cost or page-state assumptions.

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?

Three sentences, front-loaded with the core promise ('Semantic page map in ONE call') before enumerating contents and usage. The em-dash-heavy phrasing is dense but every clause carries information; slightly tighter wording would earn a 5.

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?

With four parameters, no annotations, and no output schema, the description must describe what comes back, and it does: element types, per-element fields, compactness, truncation, and the unnamed-element flag. Coverage is solid for an orientation tool; the main gap is that callers cannot tell whether the tool mutates or merely observes page state.

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 every parameter is already documented, and the description adds only a little beyond that, chiefly restating the max_nodes cap and truncation flag behavior. Baseline 3 is appropriate when the schema already does the heavy lifting.

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 ('Semantic page map in ONE call') and enumerates exactly what it returns: interactive elements, landmarks, headings, each with ARIA role, accessible name, live state, and CSS selector. It explicitly distinguishes itself from the sibling get_page_elements, so an agent can pick between the two without opening either 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 clear usage condition ('the fastest way to answer what can I do on this page?' and 'use it to orient before clicking') and names the alternative it replaces ('instead of multiple get_page_elements calls'). It does not spell out when-not cases, such as when a narrower per-element query is preferable, so it stops short of full routing guidance.

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