Skip to main content
Glama

map_compact

Read-only

Renders a compact one-line-per-element snapshot of the current page, preserving element state and optionally including bounding-box coordinates or filtering to actionable roles for efficient browser automation.

Instructions

One-line-per-element rendering of the snapshot (token-efficient): @eN role "name" [state…], preserving state ([checked]/[disabled]/[expanded]/[level=N]). interactive=only actionable roles; bbox=append real bounding_box() coords (bbox=x,y,w,h) — genuine layout geometry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNoAppend real-Chrome bounding-box coords per element.
depthNoLimit snapshot depth.
leaseNoOptional lease token to present if the target session is leased (0.7.0). Threaded per-call; never read from the server's env.
sessionNoOptional session name to target (omit for the shared 'default'). On a daemon shared with other agents, pass a UNIQUE name for stateful multi-step work (go→click→fill) so you don't collide on 'default'.
interactiveNoOnly actionable roles (button/link/textbox/checkbox/…).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, and the description adds valuable behavioral detail about output format, state preservation, and the meaning of `bbox` as real Chrome geometry. It does not contradict annotations and goes beyond the structured metadata.

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?

The description is a single dense sentence that front-loads the purpose and format, with no filler. It is efficient given the technical content, though slightly terse for a first-time reader.

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 no output schema, the description provides a format template and explains both flags' effects, which is sufficient for a read-only mapping tool. Minor gaps like empty-snapshot behavior or edge cases could be added but are not critical.

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

Parameters4/5

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

The schema covers all parameters at 100%, but the description enriches understanding of `interactive` and `bbox` with concrete examples and clarifies the output format. This adds value beyond the schema, exceeding the baseline for high coverage.

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 clearly states the tool renders a token-efficient snapshot with a specific per-element format, which distinguishes it from the generic `map` sibling. However, it does not explicitly name the alternative tool, leaving some differentiation to inference.

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 token-efficiency hint implies a use case, and the `interactive`/`bbox` flags suggest conditional outputs, but there is no explicit guidance on when to choose this over `map` or `diff_map`, nor mention of scenarios where it should be avoided or prerequisites.

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