Self-hostable MCP server for Roshan AI's Alefba (الفبا) OCR service. Provides tools to read documents/images (Persian, Arabic, English) from URLs or local uploads, poll async jobs, list and inspect documents, check status, and export the original file or a searchable PDF/Word/Excel.
Strong tool naming (verb_noun pattern, clear actions) and comprehensive parameter schemas with types and descriptions. All 17 tools have non-empty descriptions (avg ~150 chars, within baseline 34-392 range). Input schemas are well-structured with proper JSON Schema types. However, output schemas are not documented, LLMs cannot predict response structure. Error handling lacks recovery guidance. Some parameter descriptions could be more prescriptive about constraints (e.g., priority 1-4 range not enforced in schema). Tool composition is sound: single responsibility, chainable IDs (document_url flows through tools). Security: no exposed secrets in parameters; instance selection is server-side. Naming consistency strong across alefba_* prefix.
Delete a previously uploaded document and its results.
Fetch full detail for a document: thumbnail, thumbnails[], page_urls[], pages[] and document_type (may start processing remaining pages).
List the page URLs that make up a previously uploaded document.
Report processing progress for one or more document URLs: per-URL {analyzed, processed_pages, all_pages}.
Download the analyzed document as Excel (.xlsx). Requires the document to have been processed with type=excel.
Get a signed, short-lived (~30s) download_link for a document's original source file (already-processed local files only).
Output schemas not documented. LLMs cannot predict response structure (e.g., what fields alefba_list_documents returns, what alefba_read_document yields). Descriptions mention 'returns {status, message}' for healthcheck but omit field types and nested structures for other tools.
Error handling lacks recovery guidance. No tool description explains what to do if a document is not found, processing fails, or a callback URL is unreachable. LLMs receive no actionable next steps.
Numeric constraints not enforced in schema. priority (1-4) and quality (0-100) are described as ranges but lack minValue/maxValue in JSON Schema. LLMs may pass invalid values (priority=5, quality=150) without validation feedback.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 58 | <=2025-11-25 | v2 |
Download the analyzed document as a searchable PDF (quality 0-100, color toggle, img_format png|jpg).
Download the analyzed document as a Word (.docx) file; optional save_path streams the bytes to disk.
Fetch / poll the result of an async read using its task_id; set wait=true to block until the task completes.
List documents (paginated via page=N): returns results[] with url, thumbnail, processed_pages, page_count, analyzed, type, filename, and num_pages for iteration.
Read a document from a URL. Blocks until analyzed by default (wait=true); set wait=false for async processing returning task ids. Options: type (general|ID-card|excel), fix_orientation, word_positions, priority 1-4, optional task_id.
Start processing a document and receive the result via webhook (callback_url) instead of polling; returns {state:processing}.
Upload a local file (multipart field 'document') and read it as a document, with the same options as alefba_read_document.
Read specific pages, each given as a document URL with an @page=N suffix; returns the same structured result as alefba_read_document.
Check that an Alefba instance is up and ready. بررسی سلامت سرویس الفبا. Calls Alefba's GET /api/healthcheck/ readiness probe and returns {status, message}, e.g. {"status": "ok", "message": "Server is up and ready"}. Optional name of the configured Alefba instance to target. Omit to use the default instance.
List the configured Alefba instances (names and base URLs only). فهرست نمونههای پیکربندیشده الفبا. Useful for discovering which 'instance' values the other tools accept. Returns {default_instance, instances:[{name, base_url, verify_ssl}]}. Tokens are NEVER returned.
Return documentation about Alefba (الفبا) OCR and these MCP tools. راهنمای سرویس الفبا و ابزارهای این سرور. Use this to learn what the server does, which tools exist, and where to read the official docs (https://docs.roshan-ai.ir) before calling other tools. Pass an optional topic to filter to one tool or doc link.
Enum constraints missing for type parameter. alefba_read_document accepts type='general|ID-card|excel' but schema does not declare enum. LLMs may hallucinate invalid types like 'passport' or 'invoice'.
Destructive tool (alefba_delete_document) lacks confirmation or dry-run pattern. No description warns of irreversibility or suggests a confirmation step. Agents may delete documents without safeguards.