---
summary: "gbif_get_species_children: proper not_found on invalid taxonKey (#19); gbif_get_species_classification: guard getSpeciesParents against McpError NotFound (#20)"
breaking: false
security: false
---

# 0.2.6 — 2026-06-04

## Fixed

- **`gbif_get_species_children`** — invalid `taxonKey` now throws `not_found` instead of returning an empty result with a notice. When `getSpeciesChildren` returns `[]` with `endOfRecords: true`, the handler verifies taxon existence via `getSpecies`; a `McpError(NotFound)` from that check is rethrown via `ctx.fail('not_found', ...)` with recovery guidance. Valid taxa with no children continue to receive the notice enrichment. ([#19](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/19))
- **`gbif_get_species_classification`** — primary `getSpeciesParents` call is now wrapped in a try/catch. A `McpError(NotFound)` from the service is rethrown via `ctx.fail('not_found', ...)`, completing the declared error contract for all code paths. Previously, an invalid `taxonKey` on the first call propagated without `data.reason` set. ([#20](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/20))
