run_document_step
Run ONE analysis step on one or more documents — the point being that a document that failed at one stage does not have to be put through all of them again. Required: step ('extract_text' | 'vision_ocr' | 'analyze' | 'split_rag' | 'vectorize' | 'graph_ingest'), and document_ids OR entity + entity_id. 'vision_ocr' sends the file itself to a vision model and is the expensive one — it is only offered for files WITHOUT a usable text layer (a scan, a photo PDF); on a text PDF use 'extract_text', which is free, exact, and better. Text from OCR is marked as such on the document, because a number read off an image can be misread and one read from a text layer cannot. Optional: force (default false; re-running a finished step is allowed but has to be asked for). Returns per document what happened, or why it was skipped. Nothing is written for a document the step cannot run on.
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": {
"step": "<step>"
},
"name": "run_document_step"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | Yes | Step to run: extract_text, vision_ocr, analyze, split_rag, vectorize or graph_ingest | |
| force | No | Re-run the step even if already finished (default false) | |
| entity | No | Record type whose documents to process, used with entity_id | |
| entity_id | No | ID of the record | |
| document_ids | No | List of IDs (document) |