Ingest Document
ingest_documentIndexes a document from the library into the retrieval index, supporting PDF, DOCX, Markdown, and plain text. Returns a document ID while indexing continues in the background.
Instructions
Index a file from the library into the retrieval index. PDF, DOCX, Markdown and plain text are ingestible in this build; EPUB, PowerPoint, HTML and legacy binary Office (.doc) are recognised and refused with a reason naming the remedy. Scanned PDFs are detected and OCR'd automatically — expect those to index slowly, a few seconds per page. Format is decided by content rather than extension, which is why a mislabelled file is still routed correctly. Returns immediately with a document_id while indexing continues in the background — poll get_document_outline with that id to watch chunk_count rise and see when status becomes 'ready'. Re-ingesting an identical file is a no-op and returns the existing document_id.
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": {
"path": "<path>"
},
"name": "ingest_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path relative to the library root | |
| title | No | Overrides the title detected from the file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| format | Yes | ||
| reused | Yes | ||
| status | Yes | ||
| warning | Yes | Set when known content was skipped; the index is incomplete | |
| document_id | Yes | ||
| locator_count | Yes |