Skip to main content

miDataworks MCP contract

Every tool the miDataworks MCP server (feature 010) registers, its category, the backend route it calls and, when an agent calls it, the approval it waits for. Derived from the live registry by backend/src/mcp_server/contract.py.

Agents: call dataworks_howto first; it carries the workflow and the result shapes.

Every tool carries a title and two hints from one table (backend/src/mcp_server/annotations.py): read-only (it changes nothing, starts no job or model call, files no approval, spends nothing), or not; and destructive (it deletes, purges, clears or cancels, overwrites a secret, or changes a setting that enables later deletion). A client may run a read-only tool without asking. The same table, with each tool's REST calls, is published as docs/mcp-annotations.json.

Categories are switched by MCP_TOOL_CATEGORIES; all 13 are on by default. A category whose owning feature has not served its routes yet registers no tools (ADR-027); the route ledger in backend/tests/support/mcp_ledger.py lists each pending tool with its feature.

233 tools in 13 categories.

233 of 233 tools publish an output schema (typed; 0 generic) and answer structuredContent; no tool is generic. Each schema is generated from the answer contract docs/schemas/midataworks-answers-v1.json: the route's answers, the pending approval and unavailable.

The answer contract covers every operation: 273 typed (13 union bodies, 6 referencing a published document), 0 untyped, 6 excluded (no JSON body).

core (11)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_healthHealthGET /api/healthyesnoyesThe backend's health: overall status and each dependency (PostgreSQL, Redis, the data volume, miServer, miWorkbench) with a reason when it is down.
dataworks_howtoHow-tonone (served by the MCP server)yesnoyesGuidance for agents: the workflow, the three result shapes (resource, pending approval, unavailable), the approval actions, jobs and secrets.
dataworks_list_jobsList jobsGET /api/v1/jobsyesnoyesList jobs (imports, builds, publishes, exports) with state and progress, newest first.
dataworks_job_statusJob statusGET /api/v1/jobs/{job_id}yesnoyesOne job's state, progress, result reference and error.
dataworks_cancel_jobCancel jobPOST /api/v1/jobs/{job_id}/cancelnoyesyesRequest a cooperative stop of a running or queued job.
dataworks_dismiss_jobDismiss jobPOST /api/v1/jobs/{job_id}/dismissnonoyesHide a failed or cancelled job from the failed-operations list.
dataworks_run_selftestRun selftestPOST /api/v1/jobs/selftestnonoyesStart the job pipeline's self-test: a short synthetic job with no data, no GPU work and no paid call.
dataworks_list_approvalsList approvalsGET /api/v1/approvalsyesnoyesList approval requests: action, who asked, status, expiry, and the result once run.
dataworks_get_approval_statusGet approval statusGET /api/v1/approvals/{approval_id}yesnoyesOne approval: pending, executing, executed (with result_kind and result_id), failed (with error), rejected (with reason) or expired.
dataworks_archive_approvalArchive approvalPOST /api/v1/approvals/{approval_id}/archivenonoyesArchive a rejected or expired approval: hide it from the default list.
dataworks_unarchive_approvalUnarchive approvalPOST /api/v1/approvals/{approval_id}/unarchivenonoyesUnarchive an approval: list it again.

datasets (48)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_search_hf_datasetsSearch HF datasetsPOST /api/v1/sources/hf/searchnonoyesSearch the Hugging Face Hub for datasets: repository, licence, size category, downloads, gating and tasks for each, most downloaded first.
dataworks_profile_sourceProfile sourcePOST /api/v1/sources/{source_id}/profileyesnoyesWhole-split statistics of an imported source before building a version: rows, nulls per column, value shares of the columns named, text length distribution.
dataworks_preview_hf_datasetPreview HF datasetPOST /api/v1/sources/hf/previewnonoyesPreview an HF dataset before importing it: configurations, splits, columns, sample rows, licence and size.
dataworks_import_hf_datasetImport HF datasetPOST /api/v1/sources/hfnonoyesImport an HF dataset as a source.
dataworks_upload_fileUpload fileGET /api/v1/sources/meta
POST /api/v1/sources/uploads
nonoyesUpload one Parquet, JSONL or CSV file (at most the operator's upload limit, and 10 MiB over MCP) as a source.
dataworks_get_upload_urlGet upload URLPOST /api/v1/sources/upload-urlnonoyesA signed, single-use URL to upload one large file as a source, so its bytes never pass through MCP.
dataworks_create_index_sourceCreate index sourcePOST /api/v1/sources/indexnonoyesMake a source of N rows from nothing - one integer column, start..start+rows-1 - to drive a generator such as synth_identifier; no file upload.
dataworks_list_sourcesList sourcesGET /api/v1/sourcesyesnoyesList imported sources with state, licence and size.
dataworks_get_sourceGet sourceGET /api/v1/sources/{source_id}yesnoyesOne source: origin, pinned revision, splits, columns, licence, annotations.
dataworks_get_source_rowsGet source rowsGET /api/v1/sources/{source_id}/rowsyesnoyesRead a page of a source's rows.
dataworks_annotate_sourceAnnotate sourcePOST /api/v1/sources/{source_id}/annotationssource_annotatenonoyesAnnotate a source's licence, terms or detection result.
dataworks_delete_sourceDelete sourceDELETE /api/v1/sources/{source_id}noyesyesDelete a source and its files.
dataworks_get_source_metaGet source metaGET /api/v1/sources/metayesnoyesSource limits and options: upload cap, large-import threshold, accepted formats.
dataworks_get_dataset_metaGet dataset metaGET /api/v1/datasets/metayesnoyesDataset options: target types and their descriptions.
dataworks_list_datasetsList datasetsGET /api/v1/datasetsyesnoyesList datasets with their latest version.
dataworks_create_datasetCreate datasetPOST /api/v1/datasetsnonoyesCreate an empty dataset.
dataworks_get_datasetGet datasetGET /api/v1/datasets/{dataset_id}yesnoyesOne dataset with its versions.
dataworks_update_datasetUpdate datasetPATCH /api/v1/datasets/{dataset_id}nonoyesChange a dataset's description or target type.
dataworks_archive_datasetArchive datasetPOST /api/v1/datasets/{dataset_id}/archivenonoyesArchive a dataset: hide it and its versions from default lists and pickers.
dataworks_unarchive_datasetUnarchive datasetPOST /api/v1/datasets/{dataset_id}/unarchivenonoyesUnarchive a dataset: list it again.
dataworks_build_versionBuild versionPOST /api/v1/versionsagent_label_rowsnonoyesBuild a new immutable version from a recipe revision and inputs.
dataworks_plan_buildPlan buildPOST /api/v1/versions/planyesnoyesDry run of dataworks_build_version; writes nothing.
dataworks_list_versionsList versionsGET /api/v1/versionsyesnoyesList versions.
dataworks_get_versionGet versionGET /api/v1/versions/{version_id}yesnoyesOne version: its dataset (id and name; numbers repeat across datasets), recipe hash, inputs, splits, row counts, state, and its sensitivity NOW (authoritative: re-read it before the data reaches an external model).
dataworks_get_wsp_partitionsGet WSP partitionsGET /api/v1/versions/{version_id}/wsp-partitionsyesnoyesA version's weight-space programming (WSP) partitions: practice sets a caller may fit on and held-out sets it may only evaluate on, each with its set kind, rows, text column, character floor and lengths, and the version's sensitivity now.
dataworks_get_build_manifestGet build manifestGET /api/v1/versions/{version_id}/manifestyesnoyesThe version's internal build manifest (steps, operator versions, counts).
dataworks_get_version_crosstabGet version crosstabGET /api/v1/versions/{version_id}/crosstabyesnoyesRow counts per split per combination of up to four columns, through DuckDB over every row: for reading a label against plan columns.
dataworks_get_version_rowsGet version rowsGET /api/v1/versions/{version_id}/rowsyesnoyesRead a page of a version's rows, optionally only the named columns.
dataworks_get_split_download_urlGet split download URLPOST /api/v1/versions/{version_id}/splits/{split}/download-urlyesnoyesA signed, expiring URL that downloads one whole split (optionally only some columns) with a plain HTTP GET, no token needed.
dataworks_explain_rowExplain rowGET /api/v1/versions/{version_id}/rows/historyyesnoyesA row's history through the build: which steps kept, changed or dropped it, and why.
dataworks_get_drop_logGet drop logGET /api/v1/versions/{version_id}/drop-logyesnoyesRows each step dropped, counted by reason.
dataworks_list_row_eventsList row eventsGET /api/v1/versions/{version_id}/eventsyesnoyesList the version's row events (drops and changes) with filters.
dataworks_get_lineageGet lineageGET /api/v1/versions/{version_id}/lineageyesnoyesThe version's lineage: inputs back to sources, with recipe revisions.
dataworks_compare_versionsCompare versionsGET /api/v1/versions/{version_id}/compareyesnoyesCompare two versions: rows added, removed and changed, and distribution shifts.
dataworks_verify_rebuildVerify rebuildPOST /api/v1/versions/{version_id}/verify-rebuildnonoyesRebuild the version from its recipe and inputs and check the row keys match.
dataworks_delete_versionDelete versionDELETE /api/v1/versions/{version_id}version_deletenoyesyesDelete a version (it becomes a tombstone).
dataworks_list_recipesList recipesGET /api/v1/recipesyesnoyesList recipes.
dataworks_save_recipeSave recipePOST /api/v1/recipesnonoyesCreate a recipe with its first revision.
dataworks_resolve_behaviourResolve behaviourGET /api/v1/behaviours/{behaviour_key}/resolveyesnoyesRead a behaviour's definition from miWorkbench's catalogue now (017): verified with its version, positive and negative meaning and target FPR; or "not in the catalogue"; or "not verified against a catalogue" when miWorkbench is absent or did not answer (then supply the definition yourself).
dataworks_get_behaviour_statusGet behaviour statusGET /api/v1/behaviours/{behaviour_key}/statusyesnoyesWhere a behaviour's dataset stands (017): its objects found by their behaviour_key (rule sets, templates, recipes, runs, versions, label runs, review queues, sets, sends) with what each last said; the ordered journey, each step with the tool to call; the next missing step; and every approval the remaining steps may need.
dataworks_get_clone_differenceGet clone differencePOST /api/v1/differencesyesnoyesWhat a clone changed (017): every difference from a to b over the behaviour key and the body ({op, path, old, new}; JSON Pointers), so a clone made with substitutions reads back exactly those fields.
dataworks_get_result_pageGet result pageGET /api/v1/results/{kind}/{id}yesnoyesOne page of a large result table (017): a version's carrier census (kind census), a version's held-out proof values (proof), a label run's agreement by stratum (agreement; shaped by column, positive_value and by), each worst first; or a label run's scores by row key (labels).
dataworks_get_result_download_urlGet result download URLPOST /api/v1/results/{kind}/{id}/download-urlyesnoyesA signed, expiring link to a whole result table as JSON Lines (017): the rows every page of dataworks_get_result_page would give, in the same order.
dataworks_get_recipeGet recipeGET /api/v1/recipes/{recipe_id}yesnoyesOne recipe with its revisions and the canonical body of each.
dataworks_revise_recipeRevise recipePOST /api/v1/recipes/{recipe_id}/revisions
POST /api/v1/recipes/{recipe_id}/revisions/lower-floor
nonoyesAdd a revision to a recipe.
dataworks_clone_recipeClone recipePOST /api/v1/recipes/{recipe_id}/clonenonoyesCopy a recipe (one revision) into a new recipe.
dataworks_validate_recipeValidate recipePOST /api/v1/recipes/validateyesnoyesCheck a recipe without saving: operators exist and are allowed, parameters are valid, the step order is legal and it has at most 64 steps (limits states every limit).
dataworks_archive_recipeArchive recipePOST /api/v1/recipes/{recipe_id}/archivenonoyesArchive a recipe: hidden from lists, still readable, its versions unchanged.

operators (9)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_list_operatorsList operatorsGET /api/v1/operatorsyesnoyesList operators (the steps a recipe can use) with provider, kind and state.
dataworks_list_operator_versionsList operator versionsGET /api/v1/operators/{name}yesnoyesThe versions of one operator, one page with the total.
dataworks_get_operatorGet operatorGET /api/v1/operators/{name}/{version}yesnoyesOne operator version's manifest, including its parameter schema.
dataworks_validate_operator_paramsValidate operator paramsPOST /api/v1/operators/{name}/{version}/validateyesnoyesCheck parameters against the operator's schema without running it.
dataworks_preview_operatorPreview operatorPOST /api/v1/operators/{name}/{version}/previewnonoyesRun an operator on a sample of a version, a step's output or a source, and show kept, changed and dropped rows.
dataworks_get_operator_previewGet operator previewGET /api/v1/operators/previews/{preview_id}yesnoyesA preview's state and result: running, done with the result, or failed with the worker's own error (a Data Designer or Data-Juicer refusal is stored, not lost).
dataworks_preview_thresholdPreview thresholdPOST /api/v1/operators/{name}/{version}/statisticsnonoyesThe distribution of an operator's score on a sample, to choose a threshold.
dataworks_get_allowlistGet allowlistGET /api/v1/operators/allowlistyesnoyesThe operator allowlist (installed plug-in operators allowed to run).
dataworks_plan_recipe_upgradePlan recipe upgradePOST /api/v1/operators/upgrade-planyesnoyesWhich steps of a recipe have newer operator versions, and what changes.

curation (18)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_run_profileRun profilePOST /api/v1/versions/{version_id}/profilenonoyesProfile a version: counts, nulls, lengths, duplicates, clusters; figures that cannot be computed say why.
dataworks_run_version_checkRun version checkPOST /api/v1/versions/{version_id}/checksnonoyesRun a check operator over EVERY row of a version, with no sample cap, and write nothing.
dataworks_get_profileGet profileGET /api/v1/versions/{version_id}/profileyesnoyesThe newest stored profile of a version (404 profile_not_run when none).
dataworks_run_shortcut_auditRun shortcut auditPOST /api/v1/versions/{version_id}/shortcut-auditnonoyesRun the shortcut audit: does any metadata column predict the label on held-out folds, above chance and a permuted-label control? Omit label_column to use the labeler's.
dataworks_get_shortcut_auditGet shortcut auditGET /api/v1/versions/{version_id}/shortcut-audityesnoyesThe stored audit with its warnings evaluated against the level in force now.
dataworks_get_shortcut_cellsGet shortcut cellsGET /api/v1/versions/{version_id}/shortcut-audit/cellsyesnoyesSeeded sample rows of one (value x label) cell of the audit.
dataworks_run_leakage_checkRun leakage checkPOST /api/v1/versions/{version_id}/leakagenonoyesFind exact, near (MinHash) and group leakage across the version's splits, and with against_version_ids against other versions' splits.
dataworks_get_leakage_reportGet leakage reportGET /api/v1/versions/{version_id}/leakageyesnoyesThe newest stored leakage report: crossing pairs counted per split pair.
dataworks_get_leakage_pairsGet leakage pairsGET /api/v1/versions/{version_id}/leakage/pairsyesnoyesOne page of the leakage report's crossing pairs, with excerpts.
dataworks_run_contamination_checkRun contamination checkPOST /api/v1/versions/{version_id}/contaminationnonoyesMeasure word n-gram overlap with benchmarks imported at pinned revisions.
dataworks_get_contaminationGet contaminationGET /api/v1/versions/{version_id}/contaminationyesnoyesThe newest stored contamination report.
dataworks_validate_trlValidate TRLPOST /api/v1/versions/{version_id}/trl-validationyesnoyesCheck a version against the TRL trainer's column contract; rules that could not be evaluated are listed as not checked, never as passed.
dataworks_get_warning_levelsGet warning levelsGET /api/v1/settings/shortcut-levelyesnoyesThe global shortcut warning level and its history.
dataworks_request_warning_levelRequest warning levelPUT /api/v1/datasets/{dataset_id}/shortcut-levelwarning_level_writenonoyesAsk the operator to set a dataset's shortcut-audit warning level (P-09 as amended 2026-11-07).
dataworks_request_warning_level_clearRequest warning level clearDELETE /api/v1/datasets/{dataset_id}/shortcut-levelwarning_level_writenoyesyesAsk the operator to clear a dataset's warning level, so it takes the global default again.
dataworks_request_global_warning_levelRequest global warning levelPUT /api/v1/settings/shortcut-levelwarning_level_writenonoyesAsk the operator to set the global shortcut-audit warning level, which every dataset without its own takes.
dataworks_get_dataset_warning_levelGet dataset warning levelGET /api/v1/datasets/{dataset_id}/shortcut-levelyesnoyesA dataset's effective warning level, its source and its override history.
dataworks_list_benchmarksList benchmarksGET /api/v1/curation/benchmarksyesnoyesThe benchmark catalogue (T-14): pinned revisions and whether each is imported.

settings (5)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_get_settingsGet settingsGET /api/v1/settingsyesnoyesEvery setting an agent may read.
dataworks_propose_endpoint_rolePropose endpoint roleGET /api/v1/endpoint-roles/{role}
PUT /api/v1/endpoint-roles/{role}
config_writenonoyesPropose a change to an endpoint role (its model, server, protocol, Use setting or price) for the operator to approve: files a config_write approval and returns {"approval_id", "status": "pending", "approval": {...}, "next_steps": [...]}; poll dataworks_get_approval_status.
dataworks_get_environmentGet environmentGET /api/v1/settings/environmentyesnoyesEvery environment setting with the value in force, the environment's value, where the value comes from (env or override), when a change takes effect, and whether an agent may change it; plus the last 50 changes.
dataworks_set_environmentSet environmentPUT /api/v1/settings/{key}config_writenoyesyesChange a runtime environment setting (group runtime, agent_writable true).
dataworks_reset_environmentReset environmentDELETE /api/v1/settings/{key}config_writenoyesyesReturn a runtime environment setting to its environment value (removes the override).

labeling (29)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_list_endpoint_rolesList endpoint rolesGET /api/v1/endpoint-rolesyesnoyesThe four endpoint roles (classifier, judge, generation, embeddings) with protocol, URL and model.
dataworks_fetch_modelsFetch modelsGET /api/v1/endpoint-roles/{role}/modelsyesnoyesList the models the role's server serves (OpenAI /v1/models, or TEI /info).
dataworks_list_templatesList templatesGET /api/v1/decision-templatesyesnoyesList decision templates (the prompt and answer tokens a classifier run uses).
dataworks_save_templateSave templatePOST /api/v1/decision-templatesnonoyesCreate a decision template.
dataworks_get_templateGet templateGET /api/v1/decision-templates/{template_id}yesnoyesOne decision template and its body.
dataworks_clone_templateClone templatePOST /api/v1/decision-templates/{template_id}/clonenonoyesCopy a decision template as a new version, optionally with a changed body.
dataworks_list_rubricsList rubricsGET /api/v1/rubricsyesnoyesList rubrics (what a judge run scores against), optionally only one behaviour's.
dataworks_save_rubricSave rubricPOST /api/v1/rubricsnonoyesCreate a rubric.
dataworks_set_rubric_behaviourSet rubric behaviourPATCH /api/v1/rubrics/{rubric_id}nonoyesSet or clear the behaviour key of a rubric no label run has used (frozen once used: clone it instead).
dataworks_get_rubricGet rubricGET /api/v1/rubrics/{rubric_id}yesnoyesOne rubric and its body.
dataworks_clone_rubricClone rubricPOST /api/v1/rubrics/{rubric_id}/clonenonoyesCopy a rubric as a new version, optionally with a changed body or behaviour key.
dataworks_test_endpoint_roleTest endpoint rolePOST /api/v1/endpoint-roles/{role}/testnonoyesSend one test request to the role's endpoint and report what it can do (logprobs, allowed tokens, structured output).
dataworks_request_endpoint_overrideRequest endpoint overridePOST /api/v1/endpoint-overridesexternal_endpoint_overridenonoyesAsk the operator to let ONE refused run send rows of a version marked private_only or sensitive to an external endpoint (ENH-011 Q2b).
dataworks_label_sampleLabel samplePOST /api/v1/labeling/samplenonoyesLabel a few rows now and show each verdict, to check a template or rubric before a run.
dataworks_preview_bandPreview bandPOST /api/v1/labeling/keep-sharenonoyesEstimate the share of rows each threshold band would keep, on a sample.
dataworks_get_keep_shareGet keep shareGET /api/v1/labeling/keep-share/{job_id}yesnoyesA keep-share preview's result: kept share per band, on its sample.
dataworks_plan_label_runPlan label runGET /api/v1/label-runs/planyesnoyesWhat a label run would do before starting it: rows to score, rows reused from cache, the agent rows already in the 24-hour window, whether it would wait for approval and which approvals its start files (approval_actions; one paid approval covers both), and (classifier and judge runs) its cost: paid or not, price per call, estimate, the per-run cap, the ceiling and what paid runs have spent.
dataworks_start_label_runStart label runPOST /api/v1/label-runsagent_label_rowsnonoyesStart a label run on a version.
dataworks_list_miserver_probesList miServer probesGET /api/v1/labeling/probesyesnoyesThe probes imported in miServer that a probe-verdict run can score with: what each was fitted on, its bar and evidence rung, and whether it fits miServer's loaded model.
dataworks_list_label_runsList label runsGET /api/v1/label-runsyesnoyesList label runs with state, counts and who started them.
dataworks_archive_label_runArchive label runPOST /api/v1/label-runs/{run_id}/archivenonoyesArchive a finished label run: hide it from default lists and pickers.
dataworks_unarchive_label_runUnarchive label runPOST /api/v1/label-runs/{run_id}/unarchivenonoyesUnarchive a label run: list it again.
dataworks_get_label_runGet label runGET /api/v1/label-runs/{run_id}yesnoyesOne label run: configuration, progress, counts per outcome, error, and what it spent (spent_usd: rows scored less rows reused x price; 0 when unpaid).
dataworks_get_label_run_labelsGet label run labelsGET /api/v1/label-runs/{run_id}/labelsyesnoyesA page of a run's labels: row key, verdict, probability and outcome.
dataworks_get_label_run_agreementGet label run agreementGET /api/v1/label-runs/{run_id}/agreementyesnoyesCompare a label run with a label column its data already has (the run's target_column when none is named): confusion counts, agreement, each side's positive share, AUROC from the run's score, and a plain note.
dataworks_review_disagreementsReview disagreementsPOST /api/v1/label-runs/handoffs/{handoff_id}/reviewnonoyesOpen label-review queues over exactly the rows where the hand-off's runs disagree with their compared column: at most 5,000 rows a queue, every stratum in the first, refused over REVIEW_MAX_QUEUES_PER_HANDOFF.
dataworks_resume_label_runResume label runPOST /api/v1/label-runs/{run_id}/resumepaid_classifier_runnonoyesResume a stopped or failed label run from its last chunk.
dataworks_rederive_label_runRederive label runPOST /api/v1/label-runs/{run_id}/rederivenonoyesRe-derive a classifier run's labels from its stored probabilities with new thresholds.
dataworks_aggregate_judgesAggregate judgesPOST /api/v1/label-runs/aggregatenonoyesCombine several judge runs on one version into one verdict per row.

calibration (11)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_import_calibration_setImport calibration setPOST /api/v1/calibration-sets/importnonoyesCreate a calibration set from an imported version's human-label column (FR-006.2 b).
dataworks_build_calibration_setBuild calibration setPOST /api/v1/calibration-sets/from-reviewnonoyesCreate a calibration set from a calibration-labeling queue.
dataworks_list_calibration_setsList calibration setsGET /api/v1/calibration-setsyesnoyesCalibration sets with their counts, licence class and provenance.
dataworks_get_calibration_setGet calibration setGET /api/v1/calibration-sets/{set_id}yesnoyesOne calibration set.
dataworks_get_calibration_label_agreementGet calibration label agreementPOST /api/v1/calibration-sets/{calibration_set_id}/label-agreementyesnoyesRead-only: on the rows of a version a calibration set labelled, how often the human and a label column agree, overall and per stratum (lowest first), split by the column's yes and no rows, each with counts and a 95% Wilson interval; and how many labelled rows the version does not hold.
dataworks_compute_calibrationCompute calibrationPOST /api/v1/calibration-recordsnonoyesStart a calibration job (AUROC with its 95% CI, the held-out rater ceiling, pairs, reliability, checks and the gate verdict).
dataworks_list_calibration_recordsList calibration recordsGET /api/v1/calibration-recordsyesnoyesCalibration records, newest first, each with checks and verdict.
dataworks_get_calibrationGet calibrationGET /api/v1/calibration-records/{record_id}yesnoyesOne calibration record: metrics with sample sizes, every check, the verdict and its numbers.
dataworks_get_gate_verdictGet gate verdictGET /api/v1/calibration-statusyesnoyesThe latest calibration verdict for a labeler (passes, fails, invalid, insufficient), or none_recorded.
dataworks_get_calibration_targetsGet calibration targetsGET /api/v1/calibration-targetsyesnoyesThe operator's gate target for a question and its history; none means the default (C3: CI lower bound 0.70 when no held-out rater ceiling exists).
dataworks_set_calibration_targetSet calibration targetPUT /api/v1/calibration-targetsgate_target_writenonoyesAsk to change the gate target for a question.

review (10)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_preview_calibration_mappingPreview calibration mappingPOST /api/v1/calibration-sets/previewyesnoyesWhat a calibration mapping yields on a version (counts, sorted-ratings warning, sample rows).
dataworks_list_review_queuesList review queuesGET /api/v1/review-queuesyesnoyesReview queues with kind, state, size, progress and creator.
dataworks_create_review_queueCreate review queuePOST /api/v1/review-queuesnonoyesCreate a label-review or calibration-labeling queue with its sampled items.
dataworks_get_review_queueGet review queueGET /api/v1/review-queues/{queue_id}yesnoyesOne review queue with its progress.
dataworks_close_review_queueClose review queuePOST /api/v1/review-queues/{queue_id}/closenonoyesClose a review queue you created: it leaves the reviewer's list and takes no more decisions; its decisions are kept.
dataworks_get_review_rowsGet review rowsGET /api/v1/review-queues/{queue_id}/itemsyesnoyesA page of a queue's items with row text and the latest decision.
dataworks_review_decideReview decidePOST /api/v1/review-items/{item_id}/decisionsnonoyesAccept the model's label or flag the row for the operator.
dataworks_get_review_decisionsGet review decisionsGET /api/v1/review-items/{item_id}/decisionsyesnoyesAn item's decision history, oldest first, with who decided and why.
dataworks_draw_auditDraw auditPOST /api/v1/versions/{version_id}/auditnoyesyesDraw a version's audit sample (supersedes one in progress).
dataworks_get_audit_statusGet audit statusGET /api/v1/versions/{version_id}/audityesnoyesA version's audit: none, in_progress or complete, with its result.

generation (21)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_list_generation_templatesList generation templatesGET /api/v1/generation-templatesyesnoyesList generation templates (expand: seed row → new prompt; respond: prompt → answer).
dataworks_save_generation_templateSave generation templatePOST /api/v1/generation-templatesnonoyesCreate a generation template (version 1).
dataworks_get_generation_templateGet generation templateGET /api/v1/generation-templates/{template_id}yesnoyesOne generation template, its body, hash and placeholders.
dataworks_clone_generation_templateClone generation templatePOST /api/v1/generation-templates/{template_id}/clonenonoyesCopy a generation template as the next version, optionally with a changed body or substitutions into it (JSON Pointers, in order).
dataworks_plan_generationPlan generationPOST /api/v1/generation-runs/planyesnoyesDry-run a generation run: held-out status, counts, identities and every refusal.
dataworks_start_generationStart generationPOST /api/v1/generation-runsnonoyesStart a generation run from a version with a held-out split: standard, or a carrier mode over a carrier plan (017; slot carriers holding the slot token zero or twice are dropped and counted).
dataworks_start_steered_pairsStart steered pairsPOST /api/v1/generation-runsnonoyesStart a steered-pair run: two settings differing on exactly ONE SAE feature, the same prompt and seed per pair; a pair is kept only when miServer reports both settings applied.
dataworks_list_generation_runsList generation runsGET /api/v1/generation-runsyesnoyesList generation runs, newest first.
dataworks_archive_generation_runArchive generation runPOST /api/v1/generation-runs/{run_id}/archivenonoyesArchive a finished generation run: hide it from default lists and pickers.
dataworks_unarchive_generation_runUnarchive generation runPOST /api/v1/generation-runs/{run_id}/unarchivenonoyesUnarchive a generation run: list it again.
dataworks_get_generation_runGet generation runGET /api/v1/generation-runs/{run_id}yesnoyesOne generation run: state, counts by outcome, snapshots, identities, pinning, timing (queued, started, finished, durations), the behaviour it is for, its dataset and templates by name, and the candidate versions built from it.
dataworks_get_generation_recordsGet generation recordsGET /api/v1/generation-runs/{run_id}/recordsyesnoyesA page of generation records: requested and reported steering, check, seed, reason, the text, and on a slot carrier whose token was repaired the copies as written (slot_repaired_from).
dataworks_get_generation_breakdownGet generation breakdownGET /api/v1/generation-runs/{run_id}/breakdownyesnoyesA run's records counted by outcome (generated = kept, discarded, skipped, with each reason) per template and per value of one input column, with kept_share.
dataworks_get_generation_pairsGet generation pairsGET /api/v1/generation-runs/{run_id}/pairsyesnoyesA page of the steered pairs a run kept (both sides matched).
dataworks_resume_generationResume generationPOST /api/v1/generation-runs/{run_id}/resumenonoyesResume a cancelled or failed run with a new job; committed chunks are kept.
dataworks_preview_generationPreview generationPOST /api/v1/generation-runs/previewnonoyesGenerate for up to 5 prompts or seed rows now (no lease, refuse-load) and show each response with miServer's reported steering.
dataworks_compare_steering_settingsCompare steering settingsPOST /api/v1/steering-settings/compareyesnoyesResolve two steering settings and report which SAE feature indices differ.
dataworks_check_judge_independenceCheck judge independencePOST /api/v1/generation-runs/independence-checkyesnoyesCompare the judge's identity with the generator's (model, revision, steering hash).
dataworks_build_generation_candidateBuild generation candidatePOST /api/v1/generation-runs/{run_id}/candidate-buildnonoyesBuild candidate version C = the input version plus every generated row (no model is called; the build binds the run).
dataworks_get_diversityGet diversityGET /api/v1/versions/{version_id}/diversityyesnoyesThe version's newest diversity report: figures, controls, verdict, method_version.
dataworks_run_diversity_reportRun diversity reportPOST /api/v1/versions/{version_id}/diversitynonoyesStart a diversity report against the version's reference (a falling verdict warns and refuses nothing).

exports (21)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_build_version_filesBuild version filesPOST /api/v1/versions/{version_id}/publish-buildsnonoyesBuild the files a publish uploads (Parquet, card, manifest) and their hashes.
dataworks_get_publish_buildGet publish buildGET /api/v1/publish-builds/{build_id}yesnoyesA publish build's state, files and hashes.
dataworks_run_publish_checksRun publish checksPOST /api/v1/versions/{version_id}/publish-checksnonoyesRun the publish checks (licence, terms, personal data, size) for a build and target.
dataworks_get_publish_checksGet publish checksGET /api/v1/publish-check-runs/{check_run_id}yesnoyesA publish-check run: each check green, amber or red, with the reason.
dataworks_get_card_draftGet card draftGET /api/v1/versions/{version_id}/card-draftyesnoyesThe dataset card a publish would push, generated from the version's provenance.
dataworks_publish_versionPublish versionPOST /api/v1/publisheshub_pushnonoyesPublish a version's build to the Hugging Face (HF) Hub; with miforge_set_kind, as a miForge set in a private repository (FR-008.68).
dataworks_push_cardPush cardPOST /api/v1/publishes/{publish_id}/cardhub_pushnonoyesPush an updated dataset card to a published repository.
dataworks_verify_hub_hashesVerify hub hashesPOST /api/v1/publishes/{publish_id}/reverifynonoyesRe-read the published files from the Hub and compare their hashes with the build.
dataworks_list_publishesList publishesGET /api/v1/publishesyesnoyesList publishes with state and verified (every file matched the Hub: true; any did not: false; not compared yet: null).
dataworks_get_publishGet publishGET /api/v1/publishes/{publish_id}yesnoyesOne publish: repository, commit, files with hashes and per-file match, and verified over them.
dataworks_get_version_manifestGet version manifestGET /api/v1/publish-builds/{build_id}
GET /api/v1/versions/{version_id}/handoff-manifest
POST /api/v1/versions/{version_id}/publish-builds
nonoyesThe handoff manifest (midataworks.dataset-version/v1) that miWorkbench and miForge read.
dataworks_export_trlExport TRLPOST /api/v1/exportsnonoyesExport a version as a TRL training set (local files).
dataworks_export_miforge_setExport miForge setPOST /api/v1/exportsnonoyesExport a version as a miForge set (local files).
dataworks_export_reward_bundleExport reward bundlePOST /api/v1/exportsnonoyesExport a reward bundle for TRL's GRPO trainer from a version (the prompt set it serves): reward.py (standard library), the rubric, a config naming the judge, a README and the manifest.
dataworks_list_exportsList exportsGET /api/v1/exportsyesnoyesList exports with state and files.
dataworks_get_exportGet exportGET /api/v1/exports/{export_id}yesnoyesOne export: target, state, files and manifest hash.
dataworks_get_licence_tableGet licence tableGET /api/v1/licence-tableyesnoyesThe licence table: which licences permit a public push, private only, or forbid.
dataworks_get_model_termsGet model termsGET /api/v1/model-terms/{model_id}yesnoyesA model's terms notes: whether training on its outputs is permitted.
dataworks_save_config_versionSave config versionPOST /api/v1/config-versionsnonoyesSave a new numbered config version (a selector or grader for miForge sets).
dataworks_list_config_versionsList config versionsGET /api/v1/config-versionsyesnoyesList config versions, one page with the total.
dataworks_get_config_versionGet config versionGET /api/v1/config-versions/{config_id}yesnoyesOne config version and its body.

detector_sets (30)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_create_detector_setCreate detector setPOST /api/v1/detector-setsnonoyesCreate a detector set: training rows, an in-distribution test, out-of-distribution evaluations and calibration negatives bound to version splits; or a training-only set that borrows a sibling's evaluation roles (borrows_from_set_id, for an A/B arm that differs only in training rows).
dataworks_list_detector_setsList detector setsGET /api/v1/detector-setsyesnoyesDetector sets with their role summary, last send state and last result rung.
dataworks_get_detector_setGet detector setGET /api/v1/detector-sets/{set_id}yesnoyesOne detector set: roles, length profiles, sends.
dataworks_update_detector_setUpdate detector setPATCH /api/v1/detector-sets/{set_id}nonoyesChange a set.
dataworks_reread_behaviour_definitionReread behaviour definitionPOST /api/v1/detector-sets/{set_id}/behaviour-definition/rereadnonoyesRe-read the set's behaviour definition from miWorkbench's catalogue now (ENH-006 G20): the set takes the current definition and its positive meaning; the one it replaces is kept in behaviour_definition.reread.replaced, with who asked.
dataworks_archive_detector_setArchive detector setPOST /api/v1/detector-sets/{set_id}/archivenonoyesArchive a set.
dataworks_unarchive_detector_setUnarchive detector setPOST /api/v1/detector-sets/{set_id}/unarchivenonoyesBring an archived set back to the default list (ENH-014 D12).
dataworks_check_detector_setCheck detector setPOST /api/v1/detector-sets/{set_id}/checksnonoyesRun checks D-1 to D-11 (green, note or refused, each with a reason and next step), and return the label values each mapping must cover and both length profiles (detail=full).
dataworks_plan_leakage_repairPlan leakage repairPOST /api/v1/detector-sets/{set_id}/leakage-repair/plannonoyesThe repair for a D-4 refusal (pairs crossing roles): for each role that gives rows up, how many it loses and a one-step drop_leakage_pairs recipe pinned to the leakage report D-4 read.
dataworks_send_detector_setSend detector setGET /api/v1/publish-builds/{build_id}
POST /api/v1/detector-sets/{set_id}/send
hub_pushnonoyesSend the set to miWorkbench: publish each version to the Hugging Face Hub, download it into miWorkbench and register every role.
dataworks_send_detector_setsSend detector setsGET /api/v1/publish-builds/{build_id}
POST /api/v1/detector-sets/send
hub_pushnonoyesSend several detector sets to miWorkbench under ONE approval (017): one send per set sharing a send_group_id; a version the sets share is published once.
dataworks_list_detector_sendsList detector sendsGET /api/v1/detector-sendsyesnoyesDetector sends of every set, or of one, newest first, one page with the total.
dataworks_get_detector_sendGet detector sendGET /api/v1/detector-sends/{send_id}yesnoyesA send's steps (publish, download, register), its checks and notes, and the miWorkbench run-request skeleton once every role is registered.
dataworks_resume_detector_sendResume detector sendPOST /api/v1/detector-sends/{send_id}/resumenonoyesResume a failed or cancelled send; recorded steps are never repeated.
dataworks_refresh_probe_resultsRefresh probe resultsPOST /api/v1/detector-sets/{set_id}/results/refreshnonoyesRead miWorkbench's runs, probes and reports for the set into a new snapshot: per-set AUROC with its interval, the rung in miWorkbench's words, firing rates and caveats.
dataworks_get_probe_resultsGet probe resultsGET /api/v1/detector-sets/{set_id}/resultsyesnoyesA stored results snapshot.
dataworks_mark_reward_probeMark reward probePOST /api/v1/reward-marksnonoyesMark a miWorkbench probe as used as a training reward.
dataworks_list_reward_marksList reward marksGET /api/v1/reward-marksyesnoyesThe probes marked as a training reward, one page with the total.
dataworks_create_reproduction_linkCreate reproduction linkPOST /api/v1/reproduction-linksgate_target_writenonoyesLink a version split to an evaluation miWorkbench already recorded for a probe, so the reproduction gate can run for an imported probe (FR-009.77 option (b)).
dataworks_list_reproduction_linksList reproduction linksGET /api/v1/reproduction-linksyesnoyesReproduction links with their checks (content or counts only) and the runs that used them, one page with the total.
dataworks_get_reproduction_linkGet reproduction linkGET /api/v1/reproduction-links/{link_id}yesnoyesOne reproduction link: the miWorkbench figure, every check and the scoring forms.
dataworks_delete_reproduction_linkDelete reproduction linkDELETE /api/v1/reproduction-links/{link_id}noyesyesDelete a reproduction link no label run has used (a used link is evidence and is refused, link_in_use).
dataworks_create_agreement_reportCreate agreement reportPOST /api/v1/agreement-reportsnonoyesCompare a probe-verdict run with a judge run on the same rows: two AUROCs with intervals, agreement and kappa.
dataworks_get_agreement_reportGet agreement reportGET /api/v1/agreement-reports/{report_id}yesnoyesOne agreement report.
dataworks_plan_minimal_pairsPlan minimal pairsPOST /api/v1/minimal-pair-chains/planyesnoyesDry run of a minimal-pair chain: every refusal (held-out seeds, a judge that is the generator, no judge, an unknown verdict), the generation plan and the judge.
dataworks_start_minimal_pairsStart minimal pairsPOST /api/v1/minimal-pair-chainsnonoyesStart a minimal-pair chain: a generation run edits each seed, a build keeps the pairs, a judge run with the pinned rubric labels them, and a build keeps only verified flips with a pair_id.
dataworks_list_minimal_pair_chainsList minimal pair chainsGET /api/v1/minimal-pair-chainsyesnoyesMinimal-pair chains, newest first, each with its stages.
dataworks_get_minimal_pair_chainGet minimal pair chainGET /api/v1/minimal-pair-chains/{chain_id}yesnoyesOne chain: its state, the stage it stands at (or failed at, and why), each stage's run, job and version ID, and the counts of verified and unverified pairs.
dataworks_resume_minimal_pair_chainResume minimal pair chainPOST /api/v1/minimal-pair-chains/{chain_id}/resumenonoyesResume a failed or cancelled chain at the stage that stopped.
dataworks_cancel_minimal_pair_chainCancel minimal pair chainPOST /api/v1/minimal-pair-chains/{chain_id}/cancelnoyesyesCancel a running chain and the stage that is live.

rule_signals (13)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_list_validatorsList validatorsGET /api/v1/validatorsyesnoyesList the validator library: every registered validator version with its reasons, outputs, parameters, superseded_by and how many conformance cases it has.
dataworks_get_validatorGet validatorGET /api/v1/validators/{validator_id}/versions/{version}yesnoyesOne validator version: its declaration and its cases from rule-signal-cases-v1.json.
dataworks_save_rule_setSave rule setPOST /api/v1/rule-setsnonoyesSave a rule set.
dataworks_validate_rule_setValidate rule setPOST /api/v1/rule-sets/validateyesnoyesCheck a rule set without saving: every problem and every failing case, each with the expected and actual outputs, every signal's verdict and the step that decided.
dataworks_preview_rule_setPreview rule setPOST /api/v1/rule-sets/previewyesnoyesRun a rule set on one text: per signal whether it fired, its spans (in characters, i.e.
dataworks_list_rule_setsList rule setsGET /api/v1/rule-setsyesnoyesList rule sets, one row per name with its latest version, sha256, behaviour key, counts and last validation; archived ones only with include_archived.
dataworks_get_rule_setGet rule setGET /api/v1/rule-sets/{name}yesnoyesOne rule-set version (default the latest): the document, its sha256 (the pin a recipe step uses), its cases, last validation, superseded_by and every build that used it.
dataworks_clone_rule_setClone rule setPOST /api/v1/rule-sets/{name}/clonenonoyesCopy a rule-set version to another name and behaviour key, applying substitutions (JSON Pointer -> value) to signals and cases.
dataworks_get_rule_set_differenceGet rule set differenceGET /api/v1/rule-sets/differenceyesnoyesThe structured difference between two rule-set versions: each changed path (a JSON Pointer) with its old and new value; signals and cases are matched by id.
dataworks_archive_rule_setArchive rule setPOST /api/v1/rule-sets/{name}/archivenonoyesArchive a rule set: hide it (every version) from lists.
dataworks_unarchive_rule_setUnarchive rule setPOST /api/v1/rule-sets/{name}/unarchivenonoyesUnarchive a rule set: list it again.
dataworks_derive_rule_setDerive rule setPOST /api/v1/rule-derivationsnonoyesDerive a draft rule set from a labelled version (a job; poll dataworks_job_status, then read dataworks_get_rule_derivation).
dataworks_get_rule_derivationGet rule derivationGET /api/v1/rule-derivations/{derivation_id}yesnoyesA rule derivation: its state (measured, low coverage, not measured), held-out precision, recall and coverage per literal and for the draft, the draft document with its provenance, and how many source rows contain each literal.

code_rules (7)​

ToolTitleCallsWaits forRead-onlyDestructiveOutput schemaWhat it does
dataworks_get_runner_contractGet runner contractGET /api/v1/runner/contractyesnoyesThe code-rule runner contract as this deployment serves it: language level, the modules a rule may import, the limits floor and the limits in force, the count cap, the reasons a call can end with, the diagnostic length, the dry-run rate and text limit, the caps, and whether code rules are switched on.
dataworks_test_code_ruleTest code rulePOST /api/v1/code-rules/testyesnoyesDry-run a code rule in the isolated runner: its cases and your texts, per function a count or a reason, and - for a function that raised on your own text - the exception type, line and a short message.
dataworks_save_code_ruleSave code rulePOST /api/v1/code-rulescode_rule_savenonoyesSave a code rule as version n+1 of its name.
dataworks_list_code_rulesList code rulesGET /api/v1/code-rulesyesnoyesList code rules, one row per name: latest version, hash, behaviour key, approval state, functions and last case result; archived ones only with include_archived.
dataworks_get_code_ruleGet code ruleGET /api/v1/code-rules/{name}/versions/{version}yesnoyesOne code-rule version: the document, its hash, its cases, the approval state and history, the contract status (failing under a newer contract minor?) and superseded_by.
dataworks_archive_code_ruleArchive code rulePOST /api/v1/code-rules/{name}/archivenonoyesArchive a code rule: hide it (every version) from lists.
dataworks_unarchive_code_ruleUnarchive code rulePOST /api/v1/code-rules/{name}/unarchivenonoyesUnarchive a code rule: list it again.

Reaching the server, and what every answer looks like​

  • Address. The streamable-HTTP endpoint is /mcp on the MCP server; off the cluster it is the HTTPS host your Ingress publishes for it (k8s/base/mcp.yaml). Every request needs Authorization: Bearer <token>; one without it, or with a wrong one, is 401 (only /health is open).
  • One block per answer. Every tool answers with exactly one content block. A list is one JSON array, and an empty result is the block [], never zero blocks.
  • Whole splits do not pass through MCP: dataworks_get_split_download_url returns a signed, expiring URL to fetch with a plain GET.
  • Large files do not pass through MCP either: dataworks_get_upload_url returns a signed, single-use URL to send one file to with ONE curl -T <file> '<url>' (an HTTP PUT) to the miDataworks LAN host only, and only with a URL miDataworks has just issued (operator decision 2026-11-25). No approval; issuing is recorded.
  • Before a build: dataworks_search_hf_datasets, dataworks_profile_source (whole-split statistics of an imported source) and dataworks_plan_build (validity, labelling-window count and approval, cell-balancer caps). None writes anything.
  • Data Designer steps: see dataworks_howto("data_designer"). Validation names the Data Designer rule that fails; a failed preview reads status: failed with Data Designer's message.
  • Detector sets: a D-4 refusal names dataworks_plan_leakage_repair; dataworks_send_detector_set waits for the publish builds it starts before filing the approval.

REST contract for proxies​

What miWorkbench's dataworks_* proxy (miWorkbench 034 FR-5 to FR-14) and any other caller rely on (010 FTDD section 5.6). Additive changes only; checked by backend/tests/contract/test_miworkbench_proxy_paths_are_served.py.

ItemValue
BaseBackend under /api/, REST under /api/v1
HealthGET /api/health: 200 while the API is up, body {"status", "dependencies": {name: {"ok", "reason"}}}; any 2xx is available
SuccessPlain JSON resources
Error{"error": {"code", "message", "details"}}
HeaderX-Dataworks-Agent: agent:<name> (lower case, digits, hyphens; at most 48 characters after agent:). This server sends agent:dataworks-mcp; miWorkbench's proxy sends agent:mistudio-mcp. A malformed or empty header is refused with 400 INVALID_AGENT_IDENTITY
Pending202 with {"approval_id", "status": "pending", "action", "request_digest", "expires_at", "hint"}
StatusGET /api/v1/approvals/{id}: pending, executing, executed (with result_kind, result_id), failed (with error), rejected (with reason), expired
RefusalsAn agent approve or reject is 403 AGENT_CANNOT_DECIDE
Gate conditionEvery operation carrying x-approval-action in the OpenAPI document also carries x-approval-when (022): always (every agent call waits), field:body.access_token (waits when that field is sent), or state:<name> (waits on stored state the caller cannot see). Read it from the live document; never copy it
Approval actionshub_push, agent_label_rows, version_delete, millm_model_load, secret_write, source_annotate, gate_target_write, config_write, paid_classifier_run (017: any agent run, start or resume, on a paid classifier endpoint, whatever its size)
CountingThe 5,000-row agent labelling window is counted in REST only, per version, never from a caller's number
DigestAn approval binds to the exact stored request; a changed request needs a new approval. A send is one approval for the whole send (P-06)
ExpiryA pending approval expires after 24 hours
OpenAPIGET /api/v1/openapi.json

Review queues for applications (miForge, R-03.41; suite tracker 4.1)​

The external-queue lifecycle an application codes against. The application identifies itself with X-Dataworks-Agent (miForge sends agent:miforge); the queue's origin_app is that name.

StepRouteSuccessRefusals
CreatePOST /api/v1/review-queues {"kind": "external", "question", "label_set", "external_ref"?}201 queue, state: "open"400 ORIGIN_APP_REQUIRED without the header
Post candidatesPOST /api/v1/review-queues/{id}/candidates {"candidates": [...]} (at most 500)201 {"items": [{"external_id", "item_id", "created"}]}; a repeated external_id returns its item403 ORIGIN_APP_MISMATCH, 409 QUEUE_CLOSED, 413 PAYLOAD_TOO_LARGE, 422 QUEUE_KIND_INVALID
Read backGET /api/v1/review-queues/{id}/decisions?external_ids=…&since=… (no header needed)200 {"items": [...]} with stable decision IDs404 QUEUE_NOT_FOUND
ClosePOST /api/v1/review-queues/{id}/close, body {} or {"reason": "..."} (at most 2,000 characters)200 the queue with state: "closed", closed_at, closed_by, closed_by_origin, close_reason. Idempotent: closing a closed queue answers 200 with the first close unchanged404 QUEUE_NOT_FOUND; 403 QUEUE_NOT_YOURS when an agent closes a queue it did not create; 409 AUDIT_IN_PROGRESS for an audit queue whose audit is running

A closed queue keeps its items and decisions (read-back still answers), takes no decisions (409 QUEUE_CLOSED) and no candidates, and is left out of the reviewer's list, which asks for GET /api/v1/review-queues?state=open. Without state the list returns every queue. There is no reopen and no delete: close a queue when its work is done and create a new one for new work.