Skip to main content
Glama

build_dataset

Build an analysis-ready dataset by merging selected NHANES tables with the DEMO file, pooling cycles, and automatically adding the rescaled analysis weight. Ensure valid domain estimation with design variables retained.

Instructions

Build an analysis-ready dataset: DEMO universe (all participants, needed for valid domain estimation) left-joined to the requested tables on SEQN, for one or more cycles.

tables: base names without cycle suffix, e.g. ["BMX", "TCHOL", "BPQ"] (DEMO is always included). variables: columns to keep from those tables (default: all). Weight/design variables are always kept. The analysis weight is chosen and rescaled automatically -> column WT_ANALYSIS.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cyclesYes
tablesYes
variablesNo
include_mortalityNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the left-join semantics, DEMO universe requirement, SEQN key, automatic weight selection/rescaling to WT_ANALYSIS, and that weight/design variables are always kept. It omits some behaviors like include_mortality handling and return format, but the core operational behavior is transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and well-structured: a single front-loaded sentence states the main behavior, followed by concise definitions of the two ambiguous parameters with an example. No filler or redundant wording.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers join logic, table naming, and weight handling, which are the most critical details. However, it lacks cycle value format, include_mortality semantics, and output shape details, and there is no output schema to fill those gaps. For a non-trivial builder tool this is a meaningful but not fatal omission.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must explain parameters. It effectively explains 'tables' (base names, no cycle suffix, DEMO always included) and 'variables' (default all, weights always kept), but it does not explain 'cycles' values or the 'include_mortality' flag. It partially compensates for the schema gap but leaves two of four parameters undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Build') and resource ('analysis-ready dataset') with explicit mechanics: DEMO universe left-joined to requested tables on SEQN for one or more cycles. This clearly differentiates it from sibling tools like list_files, derive_variable, survey_estimate, or export_dataset.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear context for what the tool does and how to specify tables/variables, including an example table list. However, it does not explicitly state when to use this tool versus alternatives such as derive_variable or export_dataset, so usage guidance is mostly implied rather than directive.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.