Docs · 2 credits
PDF layout extract
Give agents page geometry, not just a flat text dump — so tables, columns, and citations stay grounded.
What it does
Call this tool (id: pdf_layout_extract) to extract PDF text with spatial layout from base64. Returns per-page lines and words with bounding boxes (x,y,width,height + yFromTop).
Example use cases
- Citation grounding with page + bbox hits.
- Table and column reconstruction before CSV export.
- Routing scanned pages via pdf_complexity, then layout extract on text pages.
How it works in Toolporten
Allowlist pdf_complexity → pdf_layout_extract / pdf_to_markdown → pdf_page_screenshot for vision. Keep the toolbox under a handful of PDF tools.
MCP call example
{
"name": "pdf_layout_extract",
"arguments": {
"base64": "<base64-pdf>",
"maxPages": 10
}
}