Once connected, your MCP client can browse files, build and edit workflows, run them, and iterate on results. Most clients list the tools automatically after connecting — ask your client to “build a workflow from this PDF” to get going.For the workflow model itself, see Workflows and Blocks.
The server exposes tools grouped under underscore-separated namespaces. Start with help — it returns Retab-specific guidance for whichever subsystem you’re about to use.
List recent files in the org, optionally filtered by workflow id or filename, with cursor pagination.
files_upload
Upload a file from a data URL or HTTP(S) URL and get back a durable file_id.
files_analyze
Analyze one document into a Document Blueprint (subdocuments, fields, recommended topology). Async — returns a job_id; poll with jobs_get.
files_grep
Search a literal string or Python regex in one file. Returns matches with a format-specific anchor (page+line for PDFs, line+char for text, sheet+cell for spreadsheets).
files_inspect
Render a specific region of a file — line range, spreadsheet/CSV range, PDF page, or image area — so you can verify a files_grep hit in context.
files_get_sources
Return per-leaf provenance for a completed extraction (each value wrapped as {value, source: {content, anchor}}). Supports path to drill into a subtree of big extractions.
Get a block’s type, label, config, position, parent container, connected edges, and available handles.
workflows_blocks_create
Add a block to a draft. Supports parent_id for placing inside for_each/while_loop containers, connect_from for auto-wired connections, and connections for explicit handle wiring on branching blocks (classifier, split).
workflows_blocks_update
Update a block’s label, config, position, size, or parent. For extract blocks supports surgical json_schema_patch (RFC 6902); for function blocks supports surgical code_patch (exact-string Edit-style). Pass replace=true to replace config entirely.
workflows_blocks_delete
Delete a block and all its connected edges from the draft.
workflows_blocks_simulate
Replay one or more historical run steps against the current draft config. Async — returns a job_id. Supports cohort replay via run_ids and consensus override via n_consensus.
Run a workflow against production, draft, or a pinned version id. Inputs map start block ids to file_id strings (or {download_url, filename}) and start_json block ids to JSON objects.
workflows_runs_list
List recent runs with lifecycle and timing, optionally filtered by status.
workflows_runs_get
Fetch a run’s lifecycle, timing, inputs, and step summaries. Waits up to 5s for in-progress runs.
workflows_runs_steps_list
List every step in a run with lifecycle, timing, errors, model, and the artifact ref.
workflows_runs_steps_get
Inspect a single step. For extract blocks, surfaces the top-level extraction_id so you can pipe it straight into files_get_sources. Supports path to drill into big payloads.
workflows_runs_steps_submit_hil_decision
Approve or reject a step parked at waiting_for_human. Optional modified_data overrides the extracted JSON; optional command_id makes the call idempotent.
Dereference a step’s {operation, id} artifact ref into the canonical persisted record. Use this to inspect why a conditional branch matched (evaluations, matched_condition_ids, selected_handles) or to read invocation artifacts.
workflows_artifacts_list
List and dereference every artifact produced in one run, optionally filtered by operation or block_id.
Attach a consensus experiment to a supported block (extract, split, classifier, split-by-key for_each). Defines a document set; does not run metrics — call experiments_runs_create after.
experiments_list
List experiments on a workflow with the latest run’s status, score, is_stale flag, and merkle-based schema_drift.
experiments_update
Update an experiment’s document set, name, or n_consensus (3 / 5 / 7). Changing any of these invalidates metrics — re-run after.
experiments_delete
Delete an experiment and all its runs.
experiments_runs_create
Refresh an experiment for the current draft config. Reuses fresh successful jobs and recomputes failed, missing, or stale ones. Async — returns a job_id.
experiments_runs_get
Inspect the document jobs and canonical artifacts produced by an experiment run.
experiments_get_metrics
Read consensus likelihoods across four views: summary (overall + diagnostics), by_document, by_target, and votes (consensus rows with voter values). Errors when stale — re-run first.