ClicheFactory Document Intelligence
v0.6.0Extract structured JSON from PDFs, images, DOCX, XLSX, CSV, EML attachments, and DSPy pipelines.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
extract
Extract structured data from a document using a JSON schema or a saved config. Takes a document file (PDF, image, DOCX, XLSX, CSV, EML, etc.) and either a JSON schema describing the fields to extract or a config_id. Returns the extracted data as JSON. If extraction fails or returns a validation error, try: 1. Calling doctor to verify the ClicheFactory API key is configured. 2. Using to_markdown first to inspect the document, then adjusting the schema. 3. Using extraction_mode="fast" for simpler documents. Args: file: Absolute path to the document file. schema: Either an absolute fil…
| Parameter | Type | Description |
|---|---|---|
file * | string | |
artifact_id | ||
config_id | ||
extraction_mode | ||
include_cost | boolean | |
mode | ||
model | ||
model_api_key | ||
ocr_api_key | ||
ocr_model | ||
schema |
draft_model
Draft an extraction schema from a plain-language description of the fields. Use it when the user says what they want from their documents but has no schema. Then pass the returned json_schema to extract as `schema`. Service mode only (needs CLICHEFACTORY_API_KEY); one flat charge per draft, see balance. If a model and its key are configured (LLM_MODEL_NAME and LLM_API_KEY), the draft runs on them at the BYOK rate. The same request within 24 hours returns the same draft without a second charge. Args: description: What to extract, in any language, e.g. "From vehicle registration ph…
| Parameter | Type | Description |
|---|---|---|
description * | string | |
current_model | ||
language |
to_markdown
Convert a document to markdown text. Takes any supported document (PDF, image, DOCX, XLSX, CSV, EML, etc.) and returns its content as readable markdown. Use this to inspect a document before extraction, or when extract fails and you need to see the content to build a better schema. Args: file: Absolute path to the document file. mode: Client mode — "service" (default) or "local". Auto-detected from credentials when omitted. conversion_mode: Conversion mode (service mode only). Options: - omit for standard OCR + LLM conversion (most reliable). - "fast"  
| Parameter | Type | Description |
|---|---|---|
file * | string | |
conversion_mode | ||
mode | ||
model | ||
model_api_key | ||
ocr_api_key | ||
ocr_model |
doctor
Check ClicheFactory configuration, dependencies, and system binaries. Returns a diagnostic report showing: - Config file status and API key / model settings - Installed Python dependencies (core + local mode) - System binaries (tesseract, pandoc, LibreOffice) Call this tool first when extraction fails, or to verify the setup is correct.
balance
Show the ClicheFactory credit balance and how many pages it still buys. Call it before a large batch to check there is enough left. Service mode only: it reads the account of the configured CLICHEFACTORY_API_KEY. Returns: JSON with balance_credits, currency, free_extraction_pages_remaining (used before credits), and pages_remaining: for each extraction mode ("fast", "balanced", "robust", under "extract" and "extract_byok") and for "to_markdown", the credits_per_page and the pages the balance still buys (null when the rate is 0).