Skip to main content
Glama

Map a datasheet (deterministic index)

datasheetvend_extract_document_map
Read-onlyIdempotent

Build the Document Map of a datasheet PDF: a deterministic, machine-readable index of WHERE the topics live (pinout, package, mechanical, electrical, timing, thermal, absolute_max, registers, cautions …) and WHAT each page physically looks like (table / prose / vector_drawing / raster_image / blank / honest unknown), including a per-page geometry census (vector paths, ruling lines, raster coverage). No LLM is involved — the same document yields the same map, cached by SHA-256, so repeat calls are served from the cache. USE IT FIRST, before reading any page of a datasheet: read the candidate pages it recommends and pick your tool per page from anatomy.dominant_form. The result is wrapped as { contractVersion, documentRef, review, map }; inside map it names map.document.total_pages (the physical page count) and, per topic, map.module_targets[].primary_pages — so it answers 'how many pages' and points to the pages likely to hold the absolute-max ratings / pinout / package drawing (a primary page can miss, so read the candidates and check the warnings). Do NOT use it to get pin names, dimensions, or ratings — it contains no extracted values (use datasheetvend_extract_pinout for pins). Page numbers are physical 1-based PDF pages, not printed labels. Check review.required and the warnings before trusting a degraded map.

Input Schema

NameRequiredDescriptionDefault
documentPathYeshttps:// URL to the datasheet PDF. The remote /api/mcp endpoint accepts ONLY https:// URLs (it downloads them); a local filesystem path works solely in local stdio mode (npm run mcp:serve)..

Output Schema

NameRequiredDescriptionDefault
mapYesThe versioned Document Map agent delivery envelope (document_map_agent_v1): document.{total_pages,sha256}, module_targets[], toc[], page_grid_summary, warnings. The top-level envelope also carries `cached` (true on a repeat call for the same document).
cachedYesTrue when served from the deterministic SHA-256 cache
reviewYes
documentRefYesEcho of the documentPath/URL that was mapped
contractVersionYesContract schema identifier: dmap_evidence_v1

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/destructive=false, and the description adds substantive behavior beyond them: deterministic with no LLM, SHA-256 keyed caching for repeat calls, physical 1-based page numbering versus printed labels, and a review.required/warnings degradation path. It also describes the { contractVersion, documentRef, review, map } envelope and where total page count lives.

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 critical routing instruction is front-loaded and the anatomy vocabulary plus output paths are enumerated compactly. It is dense and runs long with parentheticals and a warning clause, but nearly every sentence carries operational information rather than restating the name.

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-parameter indexing tool with an output schema and full annotations, the description covers determinism, caching, output envelope, page-count semantics, primary-page unreliability, and degraded-map handling. Nothing needed to call it correctly or interpret the result is missing.

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% and the single documentPath parameter is fully documented in the schema, including the https-only constraint for the remote endpoint. The description adds no syntax or format detail about the parameter itself; its extra clarification concerns output page numbering rather than the input. Baseline 3 applies.

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 — 'Build the Document Map of a datasheet PDF' — and enumerates exactly what the map contains (topic locations plus per-page physical form and geometry census). It is unmistakable against siblings like extract_pinout or inspect_document_page.

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?

Gives explicit ordering ('USE IT FIRST, before reading any page'), an explicit exclusion ('Do NOT use it to get pin names, dimensions, or ratings — use datasheetvend_extract_pinout'), and a follow-on routing rule ('pick your tool per page from anatomy.dominant_form'). When-to-use, when-not, and alternatives are all present.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources