extract_tables
Extracts tables from PDF pages and returns each as rows of cell text, using line- or alignment-based detection to support structured data parsing.
Instructions
Find tables on all pages or a page spec (e.g. "1-3,7") and return each as rows of cell text (empty and merged cells are ""). strategy "lines" finds tables drawn with lines between cells; "text" finds tables laid out by alignment only (rougher). Returns up to max_tables (1-200; 50,000 cells in all; 1,000 characters per cell); truncated means there are more (complete is then still true). Pages that can't be read safely (too much content, lines too dense to analyse, damaged, or too slow) are listed in pages_skipped with the reason; complete is false if the 60 s limit per call stopped it before every page was read. Scanned pages have no text to read. To save tables as CSV, use export_tables. Needs the owner password if the PDF forbids copying.
Any password argument can be "ask": the user then types it on a local page, so it never passes through the chat.
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": {
"input_path": "<input_path>"
},
"name": "extract_tables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | ||
| password | No | ||
| strategy | No | lines | |
| input_path | Yes | ||
| max_tables | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| tables | Yes | ||
| complete | Yes | ||
| truncated | Yes | ||
| pages_skipped | Yes | ||
| pages_searched | Yes |