---
summary: "phenotype matrix, germplasm performance, genotype export, observation variable resource"
breaking: false
security: false
---

# 0.7.0 — 2026-06-01

## Added

- **`brapi_build_phenotype_matrix`** — builds a germplasm × trait observation matrix from one or more studies and materializes it as a canvas dataframe. Supports wide (pivot) and long shape with configurable per-cell aggregation; wide-column names are SQL-safe identifiers with a `variableLegend` map back to display names. Study-anchored pull prefers `GET /observations?studyDbId`, falls back to observation-unit embedded observations then germplasm-anchored observations for servers where the `studyDbId` filter is unsupported. Shared observation-pull machinery with `brapi_germplasm_performance`. ([#8](https://github.com/cyanheads/brapi-mcp-server/issues/8))
- **`brapi_germplasm_performance`** — per-variable performance aggregates (n, mean, median, sample sd, min, max, studyCount, studyDbIds, seasons) for a single germplasm across all studies where it has observations. Discovers candidate studies via `GET /studies?germplasmDbIds` with a dialect-honor cross-check that warns when a server silently ignores the filter. ([#9](https://github.com/cyanheads/brapi-mcp-server/issues/9))
- **`brapi_export_genotype_matrix`** — exports genotype calls for a variant set as a germplasm × variant canvas dataframe (SQL-safe column names, `variantColumnLegend` map); also serializes to VCF-lite (`#CHROM POS ID REF ALT` + per-sample genotype columns) and PLINK (`.ped` + `.map`). Reuses `tools/shared/genotype-calls.ts` extracted from `brapi_find_genotype_calls`. ([#12](https://github.com/cyanheads/brapi-mcp-server/issues/12))
- **`brapi://variable/{observationVariableDbId}`** resource — single observation-variable record (trait, scale, method, ontology) on the default connection via `GET /variables/{id}`. ([#14](https://github.com/cyanheads/brapi-mcp-server/issues/14))
- **`tools/shared/canvas-columns.ts`** — SQL-safe column-name sanitizer and `variableLegend` / `variantColumnLegend` builder, shared by `brapi_build_phenotype_matrix` and `brapi_export_genotype_matrix`.
- **`tools/shared/observations.ts`** — study-anchored observation pull shared by `brapi_build_phenotype_matrix` and `brapi_germplasm_performance`.
- **`tools/shared/genotype-calls.ts`** — async genotype-call collector extracted from `brapi_find_genotype_calls`, shared by `brapi_export_genotype_matrix`.

## Changed

- **`brapi_find_genotype_calls`** refactored to consume `tools/shared/genotype-calls.ts`; behavior unchanged.
- **`@duckdb/node-api`** `^1.5.3-r.2` → `^1.5.3-r.3`
- **`vitest`** `^4.1.7` → `^4.1.8` (dev)
