check_batch_status
Monitor batch processing job status for OCR document extraction, enabling users to track progress and retrieve results from Mistral AI-powered text and table conversion operations.
Instructions
Check the status of a batch processing job.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arguments | Yes |
Implementation Reference
- src/mcp_mistral_ocr_opt/main.py:520-540 (handler)The handler function `check_batch_status` in `src/mcp_mistral_ocr_opt/main.py` implements the tool logic to check the status of a batch processing job using the `get_batch_processor` utility.
@app.tool("check_batch_status") async def check_batch_status(arguments: Dict[str, Any]) -> List[TextContent]: """Check the status of a batch processing job.""" job_id = arguments.get("job_id") if not job_id: raise McpError(ErrorData(code=INVALID_PARAMS, message="job_id is required")) try: batch_proc = await get_batch_processor() status = await batch_proc.get_job_status(job_id) return [ TextContent( type="text", text=json.dumps(status, indent=2, ensure_ascii=False) ) ] except Exception as e: raise McpError( ErrorData( code=INTERNAL_ERROR, message=f"Error checking batch status: {str(e)}" )