Extract document
extract_documentExtract the text of one document of this tenant (OCR for images, direct read for text files, best-effort for PDF) and optionally pull structured fields. Persists the text on the document so it becomes searchable after the next reindex.
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": {
"document_id": "<document_id>"
},
"name": "extract_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| schema | No | Optional field list/JSON schema to extract, e.g. {invoice_no, date, total} | |
| document_id | Yes | Id of the documents row | |
| target_tenant_id | No | Platform super-admins only: operate on this tenant instead of your own. |