extract_document_table
Extract structured table rows (line items, transactions, headers, document metadata, summary totals, Markdown table, and CSV) from a PDF or image (invoice, bank statement, credit card statement, receipt, timesheet, or scanned table). Works immediately on the free tier (2 free documents/day) or with an optional Smart OCR API key.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "extract_document_table"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| preset | No | Document preset: "invoice" for vendor invoices/bills, "bank_statement" for bank or credit card statements, "receipt" for retail/expense receipts, or "auto" to auto-detect. | |
| api_key | No | Optional Smart OCR API key from https://smartocr.dev (can also be sent via x-api-key header). If omitted, uses the free tier (2 free docs/day). | |
| file_url | No | Public HTTP/HTTPS URL to a PDF, PNG, JPG, WEBP, or TIFF document to extract. | |
| file_name | No | Optional filename with extension (e.g., "invoice.pdf", "statement.pdf", "receipt.png"). Defaults to "document.pdf". | |
| file_base64 | No | Base64-encoded document content (raw base64 or data:...;base64,... URI). Provide either file_url or file_base64. | |
| custom_headers | No | Optional list of custom column headers to extract (e.g., ["Date", "Description", "Amount", "Balance"]). |