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.

Categories are switched by MCP_TOOL_CATEGORIES; all eleven 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.

192 tools in 11 categories.

core (9)​

ToolCallsWaits forWhat it does
dataworks_healthGET /api/healthThe backend's health: overall status and each dependency (PostgreSQL, Redis, the data volume, miLLM, miStudio) with a reason when it is down.
dataworks_howtonone (served by the MCP server)Guidance for agents: the workflow, the three result shapes (resource, pending approval, unavailable), the eight approval actions, jobs and secrets.
dataworks_list_jobsGET /api/v1/jobsList jobs (imports, builds, publishes, exports) with state and progress.
dataworks_job_statusGET /api/v1/jobs/{job_id}One job's state, progress, result reference and error.
dataworks_cancel_jobPOST /api/v1/jobs/{job_id}/cancelRequest a cooperative stop of a running or queued job.
dataworks_list_approvalsGET /api/v1/approvalsList approval requests: action, who asked, status, expiry, and the result once run.
dataworks_get_approval_statusGET /api/v1/approvals/{approval_id}One approval: pending, executing, executed (with result_kind and result_id), failed (with error), rejected (with reason) or expired.
dataworks_archive_approvalPOST /api/v1/approvals/{approval_id}/archiveArchive a rejected or expired approval: hide it from the default list.
dataworks_unarchive_approvalPOST /api/v1/approvals/{approval_id}/unarchiveUnarchive an approval: list it again.

datasets (39)​

ToolCallsWaits forWhat it does
dataworks_search_hf_datasetsPOST /api/v1/sources/hf/searchSearch the Hugging Face Hub for datasets: repository, licence, size category, downloads, gating and tasks for each, most downloaded first.
dataworks_profile_sourcePOST /api/v1/sources/{source_id}/profileWhole-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_datasetPOST /api/v1/sources/hf/previewsecret_writePreview an HF dataset before importing it: configurations, splits, columns, sample rows, licence and size.
dataworks_import_hf_datasetPOST /api/v1/sources/hfsecret_writeImport an HF dataset as a source.
dataworks_upload_fileGET /api/v1/sources/meta
POST /api/v1/sources/uploads
Upload one Parquet, JSONL or CSV file (at most the operator's upload limit, and 10 MiB over MCP) as a source.
dataworks_list_sourcesGET /api/v1/sourcesList imported sources with state, licence and size.
dataworks_get_sourceGET /api/v1/sources/{source_id}One source: origin, pinned revision, splits, columns, licence, annotations.
dataworks_get_source_rowsGET /api/v1/sources/{source_id}/rowsRead a page of a source's rows.
dataworks_annotate_sourcePOST /api/v1/sources/{source_id}/annotationssource_annotateAnnotate a source's licence, terms or detection result.
dataworks_delete_sourceDELETE /api/v1/sources/{source_id}Delete a source and its files.
dataworks_get_source_metaGET /api/v1/sources/metaSource limits and options: upload cap, large-import threshold, accepted formats.
dataworks_get_dataset_metaGET /api/v1/datasets/metaDataset options: target types and their descriptions.
dataworks_list_datasetsGET /api/v1/datasetsList datasets with their latest version.
dataworks_create_datasetPOST /api/v1/datasetsCreate an empty dataset.
dataworks_get_datasetGET /api/v1/datasets/{dataset_id}One dataset with its versions.
dataworks_update_datasetPATCH /api/v1/datasets/{dataset_id}Change a dataset's description or target type.
dataworks_archive_datasetPOST /api/v1/datasets/{dataset_id}/archiveArchive a dataset: hide it and its versions from default lists and pickers.
dataworks_unarchive_datasetPOST /api/v1/datasets/{dataset_id}/unarchiveUnarchive a dataset: list it again.
dataworks_build_versionPOST /api/v1/versionsagent_label_rowsBuild a new immutable version from a recipe revision and inputs.
dataworks_plan_buildPOST /api/v1/versions/planDry run of dataworks_build_version; writes nothing.
dataworks_list_versionsGET /api/v1/versionsList versions.
dataworks_get_versionGET /api/v1/versions/{version_id}One version: recipe hash, inputs, splits, row counts, state.
dataworks_get_build_manifestGET /api/v1/versions/{version_id}/manifestThe version's internal build manifest (steps, operator versions, counts).
dataworks_get_version_rowsGET /api/v1/versions/{version_id}/rowsRead a page of a version's rows, optionally only the named columns.
dataworks_get_split_download_urlPOST /api/v1/versions/{version_id}/splits/{split}/download-urlA signed, expiring URL that downloads one whole split (optionally only some columns) with a plain HTTP GET, no token needed.
dataworks_explain_rowGET /api/v1/versions/{version_id}/rows/historyA row's history through the build: which steps kept, changed or dropped it, and why.
dataworks_get_drop_logGET /api/v1/versions/{version_id}/drop-logRows each step dropped, counted by reason.
dataworks_list_row_eventsGET /api/v1/versions/{version_id}/eventsList the version's row events (drops and changes) with filters.
dataworks_get_lineageGET /api/v1/versions/{version_id}/lineageThe version's lineage: inputs back to sources, with recipe revisions.
dataworks_compare_versionsGET /api/v1/versions/{version_id}/compareCompare two versions: rows added, removed and changed, and distribution shifts.
dataworks_verify_rebuildPOST /api/v1/versions/{version_id}/verify-rebuildRebuild the version from its recipe and inputs and check the row keys match.
dataworks_delete_versionDELETE /api/v1/versions/{version_id}version_deleteDelete a version (it becomes a tombstone).
dataworks_list_recipesGET /api/v1/recipesList recipes.
dataworks_save_recipePOST /api/v1/recipesCreate a recipe with its first revision.
dataworks_get_recipeGET /api/v1/recipes/{recipe_id}One recipe with its revisions and the canonical body of each.
dataworks_revise_recipePOST /api/v1/recipes/{recipe_id}/revisionsAdd a revision to a recipe.
dataworks_clone_recipePOST /api/v1/recipes/{recipe_id}/cloneCopy a recipe (one revision) into a new recipe.
dataworks_validate_recipePOST /api/v1/recipes/validateCheck a recipe body without saving: operators exist and are allowed, parameters are valid, and the step order is legal.
dataworks_archive_recipePOST /api/v1/recipes/{recipe_id}/archiveArchive a recipe: hidden from lists, still readable, its versions unchanged.

operators (9)​

ToolCallsWaits forWhat it does
dataworks_list_operatorsGET /api/v1/operatorsList operators (the steps a recipe can use) with provider, kind and state.
dataworks_list_operator_versionsGET /api/v1/operators/{name}Every version of one operator.
dataworks_get_operatorGET /api/v1/operators/{name}/{version}One operator version's manifest, including its parameter schema.
dataworks_validate_operator_paramsPOST /api/v1/operators/{name}/{version}/validateCheck parameters against the operator's schema without running it.
dataworks_preview_operatorPOST /api/v1/operators/{name}/{version}/previewRun 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 /api/v1/operators/previews/{preview_id}A 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_thresholdPOST /api/v1/operators/{name}/{version}/statisticsThe distribution of an operator's score on a sample, to choose a threshold.
dataworks_get_allowlistGET /api/v1/operators/allowlistThe operator allowlist (installed plug-in operators allowed to run).
dataworks_plan_recipe_upgradePOST /api/v1/operators/upgrade-planWhich steps of a recipe have newer operator versions, and what changes.

curation (14)​

ToolCallsWaits forWhat it does
dataworks_run_profilePOST /api/v1/versions/{version_id}/profileProfile a version: counts, nulls, lengths, duplicates, clusters; figures that cannot be computed say why.
dataworks_get_profileGET /api/v1/versions/{version_id}/profileThe newest stored profile of a version (404 profile_not_run when none).
dataworks_run_shortcut_auditPOST /api/v1/versions/{version_id}/shortcut-auditRun 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 /api/v1/versions/{version_id}/shortcut-auditThe stored audit with its warnings evaluated against the level in force now.
dataworks_get_shortcut_cellsGET /api/v1/versions/{version_id}/shortcut-audit/cellsSeeded sample rows of one (value x label) cell of the audit.
dataworks_run_leakage_checkPOST /api/v1/versions/{version_id}/leakageFind exact, near (MinHash) and group leakage across the version's splits.
dataworks_get_leakage_reportGET /api/v1/versions/{version_id}/leakageThe newest stored leakage report: crossing pairs counted per split pair.
dataworks_get_leakage_pairsGET /api/v1/versions/{version_id}/leakage/pairsOne page of the leakage report's crossing pairs, with excerpts.
dataworks_run_contamination_checkPOST /api/v1/versions/{version_id}/contaminationMeasure word n-gram overlap with benchmarks imported at pinned revisions.
dataworks_get_contaminationGET /api/v1/versions/{version_id}/contaminationThe newest stored contamination report.
dataworks_validate_trlPOST /api/v1/versions/{version_id}/trl-validationCheck 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 /api/v1/settings/shortcut-levelThe global shortcut warning level and its history (read-only for agents, P-09).
dataworks_get_dataset_warning_levelGET /api/v1/datasets/{dataset_id}/shortcut-levelA dataset's effective warning level, its source and its override history.
dataworks_list_benchmarksGET /api/v1/curation/benchmarksThe benchmark catalogue (T-14): pinned revisions and whether each is imported.

settings (7)​

ToolCallsWaits forWhat it does
dataworks_get_settingsGET /api/v1/settingsEvery setting an agent may read.
dataworks_set_hf_tokenPUT /api/v1/settings/hf_tokensecret_writeStore the Hugging Face token used for gated imports and publishing.
dataworks_delete_settingDELETE /api/v1/settings/{key}secret_writeClear a stored setting (operator decision, 2026-10-07).
dataworks_set_endpoint_keyPUT /api/v1/endpoint-roles/{role}secret_writeSet a role's API key.
dataworks_get_environmentGET /api/v1/settings/environmentEvery 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_environmentPUT /api/v1/settings/{key}config_writeChange a runtime environment setting (group runtime, agent_writable true).
dataworks_reset_environmentDELETE /api/v1/settings/{key}config_writeReturn a runtime environment setting to its environment value (removes the override).

labeling (27)​

ToolCallsWaits forWhat it does
dataworks_list_endpoint_rolesGET /api/v1/endpoint-rolesThe four endpoint roles (classifier, judge, generation, embeddings) with protocol, URL and model.
dataworks_fetch_modelsGET /api/v1/endpoint-roles/{role}/modelsList the models the role's server serves (OpenAI /v1/models, or TEI /info).
dataworks_list_templatesGET /api/v1/decision-templatesList decision templates (the prompt and answer tokens a classifier run uses).
dataworks_save_templatePOST /api/v1/decision-templatesCreate a decision template.
dataworks_get_templateGET /api/v1/decision-templates/{template_id}One decision template and its body.
dataworks_clone_templatePOST /api/v1/decision-templates/{template_id}/cloneCopy a decision template as a new version, optionally with a changed body.
dataworks_list_rubricsGET /api/v1/rubricsList rubrics (what a judge run scores against), optionally only one behaviour's.
dataworks_save_rubricPOST /api/v1/rubricsCreate a rubric.
dataworks_set_rubric_behaviourPATCH /api/v1/rubrics/{rubric_id}Set or clear the behaviour key of a rubric no label run has used (frozen once used: clone it instead).
dataworks_get_rubricGET /api/v1/rubrics/{rubric_id}One rubric and its body.
dataworks_clone_rubricPOST /api/v1/rubrics/{rubric_id}/cloneCopy a rubric as a new version, optionally with a changed body or behaviour key.
dataworks_test_endpoint_rolePOST /api/v1/endpoint-roles/{role}/testSend one test request to the role's endpoint and report what it can do (logprobs, allowed tokens, structured output).
dataworks_label_samplePOST /api/v1/labeling/sampleLabel a few rows now and show each verdict, to check a template or rubric before a run.
dataworks_preview_bandPOST /api/v1/labeling/keep-shareEstimate the share of rows each threshold band would keep, on a sample.
dataworks_get_keep_shareGET /api/v1/labeling/keep-share/{job_id}A keep-share preview's result: kept share per band, on its sample.
dataworks_plan_label_runGET /api/v1/label-runs/planWhat a label run would do before starting it: rows to score, rows reused from cache, the agent rows already in the 24-hour window, and whether it would wait for approval.
dataworks_start_label_runPOST /api/v1/label-runsagent_label_rowsStart a label run on a version.
dataworks_list_millm_probesGET /api/v1/labeling/probesThe probes imported in miLLM that a probe-verdict run can score with: what each was fitted on, its bar and evidence rung, and whether it fits miLLM's loaded model.
dataworks_list_label_runsGET /api/v1/label-runsList label runs with state, counts and who started them.
dataworks_archive_label_runPOST /api/v1/label-runs/{run_id}/archiveArchive a finished label run: hide it from default lists and pickers.
dataworks_unarchive_label_runPOST /api/v1/label-runs/{run_id}/unarchiveUnarchive a label run: list it again.
dataworks_get_label_runGET /api/v1/label-runs/{run_id}One label run: configuration, progress, counts per outcome, error.
dataworks_get_label_run_labelsGET /api/v1/label-runs/{run_id}/labelsA page of a run's labels: row key, verdict, probability and outcome.
dataworks_get_label_run_agreementGET /api/v1/label-runs/{run_id}/agreementCompare a label run with a label column its data already has: confusion counts, agreement, each side's positive share, AUROC from the run's score, and a plain note.
dataworks_resume_label_runPOST /api/v1/label-runs/{run_id}/resumeResume a stopped or failed label run from its last chunk.
dataworks_rederive_label_runPOST /api/v1/label-runs/{run_id}/rederiveRe-derive a classifier run's labels from its stored probabilities with new thresholds.
dataworks_aggregate_judgesPOST /api/v1/label-runs/aggregateCombine several judge runs on one version into one verdict per row.

calibration (10)​

ToolCallsWaits forWhat it does
dataworks_import_calibration_setPOST /api/v1/calibration-sets/importCreate a calibration set from an imported version's human-label column (FR-006.2 b).
dataworks_build_calibration_setPOST /api/v1/calibration-sets/from-reviewCreate a calibration set from a calibration-labeling queue.
dataworks_list_calibration_setsGET /api/v1/calibration-setsCalibration sets with their counts, licence class and provenance.
dataworks_get_calibration_setGET /api/v1/calibration-sets/{set_id}One calibration set.
dataworks_compute_calibrationPOST /api/v1/calibration-recordsStart a calibration job (AUROC with its 95% CI, the held-out rater ceiling, pairs, reliability, checks and the gate verdict).
dataworks_list_calibration_recordsGET /api/v1/calibration-recordsCalibration records, newest first, each with checks and verdict.
dataworks_get_calibrationGET /api/v1/calibration-records/{record_id}One calibration record: metrics with sample sizes, every check, the verdict and its numbers.
dataworks_get_gate_verdictGET /api/v1/calibration-statusThe latest calibration verdict for a labeler (passes, fails, invalid, insufficient), or none_recorded.
dataworks_get_calibration_targetsGET /api/v1/calibration-targetsThe 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_targetPUT /api/v1/calibration-targetsgate_target_writeAsk to change the gate target for a question.

review (10)​

ToolCallsWaits forWhat it does
dataworks_preview_calibration_mappingPOST /api/v1/calibration-sets/previewWhat a calibration mapping yields on a version (counts, sorted-ratings warning, sample rows).
dataworks_list_review_queuesGET /api/v1/review-queuesReview queues with kind, state, size, progress and creator.
dataworks_create_review_queuePOST /api/v1/review-queuesCreate a label-review or calibration-labeling queue with its sampled items.
dataworks_get_review_queueGET /api/v1/review-queues/{queue_id}One review queue with its progress.
dataworks_close_review_queuePOST /api/v1/review-queues/{queue_id}/closeClose a review queue you created: it leaves the reviewer's list and takes no more decisions; its decisions are kept.
dataworks_get_review_rowsGET /api/v1/review-queues/{queue_id}/itemsA page of a queue's items with row text and the latest decision.
dataworks_review_decidePOST /api/v1/review-items/{item_id}/decisionsAccept the model's label or flag the row for the operator.
dataworks_get_review_decisionsGET /api/v1/review-items/{item_id}/decisionsAn item's decision history, oldest first, with who decided and why.
dataworks_draw_auditPOST /api/v1/versions/{version_id}/auditDraw a version's audit sample (supersedes one in progress).
dataworks_get_audit_statusGET /api/v1/versions/{version_id}/auditA version's audit: none, in_progress or complete, with its result.

generation (20)​

ToolCallsWaits forWhat it does
dataworks_list_generation_templatesGET /api/v1/generation-templatesList generation templates (expand: seed row → new prompt; respond: prompt → answer).
dataworks_save_generation_templatePOST /api/v1/generation-templatesCreate a generation template (version 1).
dataworks_get_generation_templateGET /api/v1/generation-templates/{template_id}One generation template, its body, hash and placeholders.
dataworks_clone_generation_templatePOST /api/v1/generation-templates/{template_id}/cloneCopy a generation template as the next version, optionally with a changed body.
dataworks_plan_generationPOST /api/v1/generation-runs/planDry-run a generation run: held-out status, counts, identities and every refusal.
dataworks_start_generationPOST /api/v1/generation-runsStart a standard generation run from a version with a held-out split.
dataworks_start_steered_pairsPOST /api/v1/generation-runsStart 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 miLLM reports both settings applied.
dataworks_list_generation_runsGET /api/v1/generation-runsList generation runs, newest first.
dataworks_archive_generation_runPOST /api/v1/generation-runs/{run_id}/archiveArchive a finished generation run: hide it from default lists and pickers.
dataworks_unarchive_generation_runPOST /api/v1/generation-runs/{run_id}/unarchiveUnarchive a generation run: list it again.
dataworks_get_generation_runGET /api/v1/generation-runs/{run_id}One generation run: state, counts by outcome, snapshots, identities, pinning.
dataworks_get_generation_recordsGET /api/v1/generation-runs/{run_id}/recordsA page of generation records: requested and reported steering, check, seed, reason.
dataworks_get_generation_pairsGET /api/v1/generation-runs/{run_id}/pairsA page of the steered pairs a run kept (both sides matched).
dataworks_resume_generationPOST /api/v1/generation-runs/{run_id}/resumeResume a cancelled or failed run with a new job; committed chunks are kept.
dataworks_preview_generationPOST /api/v1/generation-runs/previewGenerate for up to 5 prompts or seed rows now (no lease, refuse-load) and show each response with miLLM's reported steering.
dataworks_compare_steering_settingsPOST /api/v1/steering-settings/compareResolve two steering settings and report which SAE feature indices differ.
dataworks_check_judge_independencePOST /api/v1/generation-runs/independence-checkCompare the judge's identity with the generator's (model, revision, steering hash).
dataworks_build_generation_candidatePOST /api/v1/generation-runs/{run_id}/candidate-buildBuild candidate version C = the input version plus every generated row (no model is called; the build binds the run).
dataworks_get_diversityGET /api/v1/versions/{version_id}/diversityThe version's newest diversity report: figures, controls, verdict, method_version.
dataworks_run_diversity_reportPOST /api/v1/versions/{version_id}/diversityStart a diversity report against the version's reference (a falling verdict warns and refuses nothing).

exports (21)​

ToolCallsWaits forWhat it does
dataworks_build_version_filesPOST /api/v1/versions/{version_id}/publish-buildsBuild the files a publish uploads (Parquet, card, manifest) and their hashes.
dataworks_get_publish_buildGET /api/v1/publish-builds/{build_id}A publish build's state, files and hashes.
dataworks_run_publish_checksPOST /api/v1/versions/{version_id}/publish-checksRun the publish checks (licence, terms, personal data, size) for a build and target.
dataworks_get_publish_checksGET /api/v1/publish-check-runs/{check_run_id}A publish-check run: each check green, amber or red, with the reason.
dataworks_get_card_draftGET /api/v1/versions/{version_id}/card-draftThe dataset card a publish would push, generated from the version's provenance.
dataworks_publish_versionPOST /api/v1/publisheshub_pushPublish 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_cardPOST /api/v1/publishes/{publish_id}/cardhub_pushPush an updated dataset card to a published repository.
dataworks_verify_hub_hashesPOST /api/v1/publishes/{publish_id}/reverifyRe-read the published files from the Hub and compare their hashes with the build.
dataworks_list_publishesGET /api/v1/publishesList publishes with state and verification result.
dataworks_get_publishGET /api/v1/publishes/{publish_id}One publish: repository, commit, files, hashes, verification.
dataworks_get_version_manifestGET /api/v1/versions/{version_id}/handoff-manifestThe handoff manifest (midataworks.dataset-version/v1) that miStudio and miForge read.
dataworks_export_trlPOST /api/v1/exportsExport a version as a TRL training set (local files).
dataworks_export_miforge_setPOST /api/v1/exportsExport a version as a miForge set (local files).
dataworks_export_reward_bundlePOST /api/v1/exportsExport 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_exportsGET /api/v1/exportsList exports with state and files.
dataworks_get_exportGET /api/v1/exports/{export_id}One export: target, state, files and manifest hash.
dataworks_get_licence_tableGET /api/v1/licence-tableThe licence table: which licences permit a public push, private only, or forbid.
dataworks_get_model_termsGET /api/v1/model-terms/{model_id}A model's terms notes: whether training on its outputs is permitted.
dataworks_save_config_versionPOST /api/v1/config-versionsSave a new numbered config version (a selector or grader for miForge sets).
dataworks_list_config_versionsGET /api/v1/config-versionsList config versions.
dataworks_get_config_versionGET /api/v1/config-versions/{config_id}One config version and its body.

detector_sets (26)​

ToolCallsWaits forWhat it does
dataworks_create_detector_setPOST /api/v1/detector-setsCreate a detector set: training rows, an in-distribution test, out-of-distribution evaluations and calibration negatives bound to version splits.
dataworks_list_detector_setsGET /api/v1/detector-setsDetector sets with their role summary, last send state and last result rung.
dataworks_get_detector_setGET /api/v1/detector-sets/{set_id}One detector set: roles, length profiles, sends.
dataworks_update_detector_setPATCH /api/v1/detector-sets/{set_id}Change a set.
dataworks_archive_detector_setPOST /api/v1/detector-sets/{set_id}/archiveArchive a set.
dataworks_check_detector_setPOST /api/v1/detector-sets/{set_id}/checksRun checks D-1 to D-8 (green, note or refused, each with a reason and next step), and return the label values each mapping must cover and both length profiles.
dataworks_plan_leakage_repairPOST /api/v1/detector-sets/{set_id}/leakage-repair/planThe 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_setGET /api/v1/publish-builds/{build_id}
POST /api/v1/detector-sets/{set_id}/send
hub_pushSend the set to miStudio: publish each version to the Hugging Face Hub, download it into miStudio and register every role.
dataworks_list_detector_sendsGET /api/v1/detector-sets/{set_id}/sendsA set's sends, newest first.
dataworks_get_detector_sendGET /api/v1/detector-sends/{send_id}A send's steps (publish, download, register), its checks and notes, and the miStudio run-request skeleton once every role is registered.
dataworks_resume_detector_sendPOST /api/v1/detector-sends/{send_id}/resumeResume a failed or cancelled send; recorded steps are never repeated.
dataworks_refresh_probe_resultsPOST /api/v1/detector-sets/{set_id}/results/refreshRead miStudio's runs, probes and reports for the set into a new snapshot: per-set AUROC with its interval, the rung in miStudio's words, firing rates and caveats.
dataworks_get_probe_resultsGET /api/v1/detector-sets/{set_id}/resultsA stored results snapshot.
dataworks_mark_reward_probePOST /api/v1/reward-marksMark a miStudio probe as used as a training reward.
dataworks_list_reward_marksGET /api/v1/reward-marksEvery probe marked as a training reward.
dataworks_create_reproduction_linkPOST /api/v1/reproduction-linksgate_target_writeLink a version split to an evaluation miStudio already recorded for a probe, so the reproduction gate can run for an imported probe (FR-009.77 option (b)).
dataworks_list_reproduction_linksGET /api/v1/reproduction-linksEvery reproduction link with its checks (content or counts only) and the runs that used it.
dataworks_get_reproduction_linkGET /api/v1/reproduction-links/{link_id}One reproduction link: the miStudio figure, every check and the scoring forms.
dataworks_create_agreement_reportPOST /api/v1/agreement-reportsCompare a probe-verdict run with a judge run on the same rows: two AUROCs with intervals, agreement and kappa.
dataworks_get_agreement_reportGET /api/v1/agreement-reports/{report_id}One agreement report.
dataworks_plan_minimal_pairsPOST /api/v1/minimal-pair-chains/planDry 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_pairsPOST /api/v1/minimal-pair-chainsStart 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_chainsGET /api/v1/minimal-pair-chainsMinimal-pair chains, newest first, each with its stages.
dataworks_get_minimal_pair_chainGET /api/v1/minimal-pair-chains/{chain_id}One 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_chainPOST /api/v1/minimal-pair-chains/{chain_id}/resumeResume a failed or cancelled chain at the stage that stopped.
dataworks_cancel_minimal_pair_chainPOST /api/v1/minimal-pair-chains/{chain_id}/cancelCancel a running chain and the stage that is live.

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.
  • 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 miStudio's dataworks_* proxy (miStudio 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_mistudio_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; miStudio'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
Approval actionshub_push, agent_label_rows, version_delete, millm_model_load, secret_write, source_annotate, gate_target_write, config_write
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.