Bundle Tools — MCP Tool Reference¶
A Bundle binds one Project, one Questionnaire, and a selected subset of that Questionnaire's Campaigns (plus an option to include ad-hoc surveys with no Campaign) to exactly one linear Bronze → Silver → Gold dataset chain. These tools manage the Bundle itself and its quality story; see Dataset Tools for the Bundle-scoped stage operations (extract, code + weight, refine, export).
create_bundle¶
Create a pipeline Bundle.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name |
string |
Yes | — | Bundle name |
project_id |
string |
Yes | — | Owning project (write access required) |
questionnaire_id |
string |
Yes | — | Questionnaire whose completed surveys feed Bronze |
campaign_ids |
string[] |
No | [] |
Campaign subset to include (empty = none until set) |
include_ad_hoc |
boolean |
No | false |
Also include completed surveys with no campaign |
Returns: { bundle_id, name }
list_bundles¶
List pipeline Bundles, optionally filtered to one project.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
project_id |
string |
No | — | Restrict to Bundles owned by this project |
Returns:
{
"items": [
{
"id": "...",
"name": "Wave 1",
"project_id": "...",
"questionnaire_id": "...",
"campaign_ids": ["..."],
"include_ad_hoc": false,
"chain": {
"bronze": {"dataset_id": "...", "status": "ready"},
"silver": {"dataset_id": "...", "status": "processing"}
}
}
],
"count": 1
}
chain keys are the stages that have a dataset (bronze/silver/gold); a stage with no dataset yet is simply absent — treat it as missing.
clone_bundle¶
Deep-copy a Bundle's ready datasets and recipes into an independent variant.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
bundle_id |
string |
Yes | — | Source Bundle |
name |
string |
No | "{source} (copy)" |
Name for the clone |
Returns: { bundle_id, cloned_stages } — cloned_stages lists which stages (bronze/silver/gold) had a ready dataset to copy.
The clone starts from a byte-identical copy of each ready stage and carries the same stage recipes (coding config, accepted categories, weighting targets, refine field specs), so it can be re-derived independently — e.g. with different weighting targets — without touching the original Bundle. This is how you compare variants (different weighting, different refinement) of the same raw extraction.
delete_bundle¶
Delete a Bundle and its dataset chain.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
bundle_id |
string |
Yes | — | Bundle to delete |
Returns: { success: true }
Deletion is soft — the Bundle and its chain datasets are marked deleted immediately; their underlying data files are cleaned up by a background maintenance process shortly after.
Quality Tools¶
Quality is measured at the Bundle, not on individual datasets. Measures 2 and 3 grade against the Bundle's re-assignable current Strategy (current_strategy_id) — assign one before expecting them to be measured.
get_bundle_quality¶
The Bundle's four-measure quality story in one call:
- Pool vs intent — each campaign's respondent pool graded against the strategy that generated it (per-campaign entries; manual pools and ad-hoc collection report
not_measurablewith a reason) - Fielded (Bronze) vs current Strategy — who actually answered, with a per-campaign breakdown
- Weighted (Silver) vs current Strategy — what weighting corrected
- Response quality — entropy, straightlining, Cronbach's alpha, acquiescence, non-response (see the Quality Metrics Reference)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
bundle_id |
string |
Yes | — | Bundle UUID |
Returns: { quality: {...} } — the four measures plus chain/strategy context. Each measure carries a state (measured, not_measurable, no_strategy, not_derived, processing, invalidated, error) with a reason, so one unmeasurable or failing measure never hides the others. Measured payloads include overall score, composite error, and per-factor deviation analysis.
compare_bundle_quality¶
Bronze-vs-Silver representativeness comparison for the Bundle's chain, graded against the Bundle's current Strategy — the measure of what weighting bought you.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
bundle_id |
string |
Yes | — | Bundle UUID |
Returns: { comparison: {...} } with per-factor and overall improvement. Both the Bronze and Silver must be ready; otherwise the call returns a validation error.
assign_bundle_strategy¶
Assign (or clear) the Bundle's current Sampling Strategy — the benchmark measures 2 and 3 grade against. Requires manager permissions and an identified user (service-token-only callers are rejected); assigning a strategy also requires access to the strategy's own project.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
bundle_id |
string |
Yes | — | Bundle UUID |
strategy_id |
string |
No | null |
Strategy to assign; null clears the assignment |
Returns: { bundle_id, strategy_id, strategy_name }
To advance a strategy with reality-grounded outcome factors (e.g. political preference from the survey responses plus an external benchmark), use advance_sampling_strategy — it clones the strategy (the original is never edited) and the clone can then be assigned here. See the Sampling Tools Reference.
Stage Operations¶
Extraction, coding + weighting, refinement, and export are all invoked with a bundle_id on the Dataset Tools — there is no separate "run this Bundle" tool. A typical flow:
create_bundle→ getbundle_idcreate_bronze_dataset(bundle_id)→ extract Bronzecode_open_ends(bundle_id)(or its aliasderive_silver) → codes open-ends, then weights, producing Silvercreate_gold_dataset(bundle_id)→ refine Silver into Goldexport_dataset(dataset_id, format)→ export any ready stageget_bundle_quality(bundle_id)→ the four-measure quality story at any point
Related Documentation¶
- Dataset Tools — extraction, coding + weighting, refinement, and export parameters
- Quality Metrics Reference — metric definitions, formulas, interpretation thresholds
- Data Analysis Guide — the Bundle pipeline board from a researcher's point of view
- Semantic Clustering — how open-end coding works inside the Silver derive