get_extraction_status
Retrieve the extraction status of a document within a sift, indicating queued, running, completed, or failed.
Instructions
Check extraction status for a document on a sift.
Args:
document_id: The document identifier
sift_id: The sift identifier
Returns:
{"status": "queued|running|completed|failed", "error": "..." (on failure)}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | ||
| sift_id | Yes |
Implementation Reference
- code/mcp/sifter_mcp/server.py:242-256 (handler)The async function `get_extraction_status` that implements the tool logic. Decorated with @mcp.tool(), it takes `document_id` and `sift_id` parameters, creates a client via `_get_client()`, gets the sift handle, calls `handle.extraction_status(document_id)`, and returns the status.
@mcp.tool() async def get_extraction_status(document_id: str, sift_id: str) -> dict: """Check extraction status for a document on a sift. Args: document_id: The document identifier sift_id: The sift identifier Returns: {"status": "queued|running|completed|failed", "error": "..." (on failure)} """ async with _get_client() as client: handle = await client.get_sift(sift_id) status = await handle.extraction_status(document_id) return {"status": status} - code/mcp/sifter_mcp/server.py:242-242 (registration)The `@mcp.tool()` decorator on line 242 registers `get_extraction_status` as an MCP tool with the FastMCP server instance `mcp` (created on line 41).
@mcp.tool()