invoicelens_ingest_document
Ingest invoice PDFs and prepare them for semantic search. This tool parses documents, using hybrid chunking to separate tables, headers, and totals into discrete data units for FAISS indexing.
Instructions
Parse a PDF, split it with hybrid chunking (tables, header fields, totals and text kept as separate chunks), embed the chunks and store them in the FAISS index.
Ingesting the same file again replaces its previous version (doc_id is a content hash). Returns the doc_id plus chunk counts by type.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a PDF on the server's filesystem (local/stdio use only). | |
| filename | No | Display name, e.g. 'acme_march.pdf'. Defaults to the file name or PDF title. | |
| collection | No | Index to use, e.g. 'default' or a per-client name. Lowercase letters, digits, '-', '_'. | |
| pdf_base64 | No | The PDF file content, base64-encoded. Use this when the server is remote. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | Yes | ||
| chunks | Yes | ||
| doc_id | Yes | Stable id (content hash) — pass to search or extract | |
| embedder | Yes | ||
| filename | Yes | ||
| collection | Yes | ||
| chunks_by_type | Yes | ||
| replaced_existing | Yes | True if this exact file was already ingested and was re-indexed |