FlexOrch
v0.1.2Classify documents, extract structured fields, mask PII, export JSONL/RAG datasets for AI agents.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
process_document
Submit a document for processing — this is always the first step (Step 1 of 5). Downloads the file from file_url, then submits it to FlexOrch for automatic classification, structured field extraction, PII detection/masking, and quality scoring. Processing is asynchronous — this tool returns immediately with a job_id. You MUST call get_job_status(job_id) every 3–5 seconds until status='completed' before calling get_extraction_result. Args: file_url: Publicly accessible URL of the document (http/https only, max 50 MB). Supported: PDF, DOC…
| Parameter | Type | Description |
|---|---|---|
file_url * | string | |
document_type | string | |
mask_pii | boolean |
get_job_status
Poll a job until it finishes — call this after process_document or build_dataset (Step 2). Call repeatedly every 3–5 seconds until status is 'completed' or 'failed'. For data_process jobs: the completed response includes execution_id — pass it to get_extraction_result. For dataset_build jobs: the completed response includes dataset_id — pass it to export_dataset. Args: job_id: Job ID returned by process_document or build_dataset.
| Parameter | Type | Description |
|---|---|---|
job_id * | integer |
get_extraction_result
Read structured fields extracted from a completed document (Step 3). Use the execution_id from a completed data_process job (get_job_status response). Returns document type, detected language, quality grade (A–D), PII summary, column list, and extracted field values. If no dataset has been built yet, the response includes a fields_hint guiding you to call build_dataset next. To retrieve all rows as a file, proceed to build_dataset → export_dataset. Note: Masked fields appear as [MASKED_TYPE] placeholders — raw PII is never returned. Note: execution_id comes…
| Parameter | Type | Description |
|---|---|---|
execution_id * | integer |
build_dataset
Package extracted records into a dataset for export (Step 4). Triggers an async dataset build from a completed execution. Returns a job_id immediately — poll with get_job_status until status='completed'. The completed response includes dataset_id, which you pass to export_dataset to retrieve all records as text. This step is required before calling export_dataset. Args: execution_id: Execution ID from a completed data_process job (from get_job_status or get_extraction_result). name: Dataset name. Auto-generated from the source filen…
| Parameter | Type | Description |
|---|---|---|
execution_id * | integer | |
description | string | |
name | string |
search_documents
Search across all indexed FlexOrch datasets by keyword or meaning. Use this to find specific documents or records without processing a new file. Requires at least one dataset to exist. Structured search works on all plans. Semantic and hybrid modes require a Pro plan — a clear upgrade message is returned if the plan is insufficient. mode='auto' picks structured on free plans, hybrid on Pro+. Args: query: Search query — natural language or keyword. Max 1000 characters. top_k: Number of results to return. Default: 5, max: 50. mode: Search strateg…
| Parameter | Type | Description |
|---|---|---|
query * | string | |
document_type | string | |
language | string | |
mode | string | |
quality_grade | string | |
top_k | integer |
export_dataset
Download all records from a built dataset as text (Step 5 — final step). Returns the complete dataset content as a UTF-8 string directly in the response — no file download or separate URL needed. Call get_job_status after build_dataset and wait for status='completed' before calling this tool. Use the dataset_id from that completed response. Format guide: jsonl = LLM fine-tuning, rag = LangChain/LlamaIndex chunks, csv = spreadsheets, md = human-readable, xml = structured interchange. Binary formats (parquet, hf) cannot be returned via MCP — export them from…
| Parameter | Type | Description |
|---|---|---|
dataset_id * | integer | |
format | string |