Skip to main content
Glama
snussik
by snussik

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
NameRequiredDescriptionDefault
argumentsYes

Implementation Reference

  • 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)}"
                )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/snussik/mcp_mistral_ocr_opt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server