Skip to main content
Glama

get_page_map

Retrieves a page's structural map (headings, tables, figures, formulas, captions) to locate elements by ID and region for text extraction or image retrieval.

Instructions

The structure of one page: headings, tables, figures, formulas and captions. Gives one line for each element: its ID (for example p7.T1), its type, its region [x0, y0, x1, y1] in pt (origin at the top left of the page) and its text or caption. Use the IDs with get_element_text and get_page_image. The element map of a large new document can take minutes to build. Until it is complete, the result tells so: then use get_index, search_text and get_page_image with a page or a region.

Input Schema

NameRequiredDescriptionDefault
pageYesThe page number, from 1, as get_index and search_text give it.
documentYesThe document: its reference from list_documents, project_status or add_document (the first 12 characters of its SHA-256). A longer SHA-256 prefix or the numeric document ID also works.
all_elementsNoTrue: also list each text element (paragraph, list item); else they are only counted.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the most important trait: a large new document's map can take minutes to build, and the result self-reports incompleteness along with the workaround. It does not cover caching, permissions, or result-size limits, which keeps it short of a 5.

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?

Content is front-loaded — what is returned, the line format, ID reuse, then the latency caveat and fallback. It is dense but a couple of clauses (the region/coordinate explanation) could be tightened without losing meaning.

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?

An output schema exists, yet the description still usefully sketches the per-element line format, and it covers the non-obvious async/latency behavior with an explicit fallback path. For a read-only structural tool it is essentially complete, with only caching and size limits unaddressed.

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 coverage is 100%, so all three parameters (document, page, all_elements) are already documented in the schema, including the document reference format and the fact that text elements are only counted unless all_elements is true. The description adds the ID/region output format but no additional parameter semantics beyond the schema, so baseline 3 applies.

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 resource (the structural map of one page: headings, tables, figures, formulas, captions) and exactly what each returned line contains (ID, type, region, text). It implicitly separates itself from get_element_text and get_page_image by explaining that the map's IDs are the inputs to those tools. A crisper leading verb would push this to a 5.

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 explicitly routes the agent: use the returned IDs with get_element_text and get_page_image, and if the map is not yet built, fall back to get_index, search_text and get_page_image with a page or region. That is a concrete when-to-use / when-not-to-use statement naming the alternatives.

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