Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.retab.com/llms.txt

Use this file to discover all available pages before exploring further.

Retab exposes its workflow and document tools through an MCP server, so you can build and run document pipelines directly from an MCP client.
SettingValue
Server nameretab
Transportstreamable-http
Server URLhttps://mcp.retab.com/mcp
AuthenticationOAuth or an Api-Key header, depending on the client
Grab an API key from Settings → API Keys in the dashboard before you start.

Install

claude mcp add --transport http retab https://mcp.retab.com/mcp
Claude Desktop (paid plan required): Settings → Connectors → Add custom connector, name retab, URL https://mcp.retab.com/mcp, complete OAuth.

What you get

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.

Tool reference

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.

Files

ToolUse it to
files_listList recent files in the org, optionally filtered by workflow id or filename, with cursor pagination.
files_uploadUpload a file from a data URL or HTTP(S) URL and get back a durable file_id.
files_analyzeAnalyze one document into a Document Blueprint (subdocuments, fields, recommended topology). Async — returns a job_id; poll with jobs_get.
files_grepSearch 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_inspectRender 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_sourcesReturn 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.

Workflows

ToolUse it to
workflows_createCreate an empty workflow scaffold with a default start block.
workflows_listList workflows in the org, most-recently-updated first, with cursor pagination.
workflows_getFetch a workflow’s full graph (blocks, configs, positions, handles, edges). In MCP clients that support widgets, this renders an interactive graph.
workflows_diagnoseCheck a draft for structural errors and warnings — missing start, dangling edges, unreachable blocks, type mismatches, cycles.

Workflow blocks

ToolUse it to
workflows_blocks_getGet a block’s type, label, config, position, parent container, connected edges, and available handles.
workflows_blocks_createAdd 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_updateUpdate 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_deleteDelete a block and all its connected edges from the draft.
workflows_blocks_simulateReplay 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.

Workflow edges

ToolUse it to
workflows_edges_listList draft edges, optionally filtered by source or target block.
workflows_edges_createConnect a source block’s output handle to a target block’s input handle. Use workflows_blocks_get first to discover handle names.
workflows_edges_deleteDelete a draft edge.

Workflow runs

ToolUse it to
workflows_runs_createRun 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_listList recent runs with lifecycle and timing, optionally filtered by status.
workflows_runs_getFetch a run’s lifecycle, timing, inputs, and step summaries. Waits up to 5s for in-progress runs.
workflows_runs_steps_listList every step in a run with lifecycle, timing, errors, model, and the artifact ref.
workflows_runs_steps_getInspect 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_decisionApprove or reject a step parked at waiting_for_human. Optional modified_data overrides the extracted JSON; optional command_id makes the call idempotent.

Workflow artifacts

ToolUse it to
workflows_artifacts_getDereference 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_listList and dereference every artifact produced in one run, optionally filtered by operation or block_id.

Workflow tests

ToolUse it to
workflows_tests_createCreate a block test with one input source (manual handle inputs or a captured run step), one output handle target, and one assertion.
workflows_tests_listList tests with rollups: passed, failed, blocked, error, cancelled, not_run, and schema_drifted.
workflows_tests_getGet a test’s definition, stored inputs, assertion, validation status, and cached latest-run summary.
workflows_tests_updateUpdate a test’s source and/or assertion.
workflows_tests_deleteDelete a test and its run history.
workflows_tests_executeRun one test, all tests for a workflow, or all tests for a block. Async — returns a job_id; result includes per-test status counts.

Experiments

ToolUse it to
experiments_createAttach 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_listList experiments on a workflow with the latest run’s status, score, is_stale flag, and merkle-based schema_drift.
experiments_updateUpdate an experiment’s document set, name, or n_consensus (3 / 5 / 7). Changing any of these invalidates metrics — re-run after.
experiments_deleteDelete an experiment and all its runs.
experiments_runs_createRefresh 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_getInspect the document jobs and canonical artifacts produced by an experiment run.
experiments_get_metricsRead 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.

Utilities

ToolUse it to
helpGet Retab-specific guidance before touching an unfamiliar subsystem. Topics: default, files, workflows, workflows_runs, workflow_blocks (with optional block_type), tests, experiments, human_review.
jobs_getPoll async jobs from files_analyze, workflows_blocks_simulate, workflows_tests_execute, and experiments_runs_create. Waits up to 5s before returning.

Prompts

The server also exposes two MCP prompts (clients with prompt support surface these alongside tools):
PromptPurpose
workflow_assistantRetab workflow assistant prompt for building, configuring, testing, and debugging workflows.
workflow_agentFull workflow-agent system prompt for external MCP clients.