Skip to main content
Glama

gbif-biodiversity-mcp-server

Get Species Classification

gbif_get_species_classification
Read-onlyIdempotent

Return the parent chain for a taxon — from kingdom (or domain) down to the immediate parent of the queried taxon — as an ordered array. Each entry has its rank, canonical name, taxon usage key, checklist, and backbone mapping. The array is returned root-first (kingdom → phylum → class → … → immediate parent of the queried taxon); the queried taxon itself is not included — call gbif_get_species for its own record. The chain is read in the queried taxon's own checklist: datasetKey names it, each key is a taxon usage key there, and nubKey is the mapped backbone key the occurrence tools take, absent where the backbone has no mapping. Useful for building taxonomic trees or understanding placement without walking the checklist level by level.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "taxonKey": "<taxonKey>"
    },
    "name": "gbif_get_species_classification"
  }
}

Input Schema

NameRequiredDescriptionDefault
taxonKeyYesGBIF taxon key: a backbone key from gbif_match_species, or a taxon usage key of any checklist, such as key from gbif_search_species.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when the chain is empty because the taxon sits at the root of its checklist. Absent when the chain has entries.
classificationNoClassification chain ordered from root (kingdom) to the immediate parent of the queried taxon. The queried taxon itself is not included — call gbif_get_species for its own record.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / taxonKey / description
      Previous value: -"GBIF backbone taxon key from gbif_match_species or another taxonomy tool."New value: +"GBIF taxon key: a backbone key from gbif_match_species, or a taxon usage key of any checklist, such as key from gbif_search_species."
    • addedOutput schema / properties / classification / items / properties / datasetKey
      Added value: +{
      +  "description": "Source checklist dataset UUID, when GBIF supplies it.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / classification / items / properties / key / description
      Previous value: -"Backbone taxon key for this rank."New value: +"Taxon usage key within the source checklist; not necessarily a backbone key."
    • addedOutput schema / properties / classification / items / properties / nubKey
      Added value: +{
      +  "description": "Mapped backbone taxon key for occurrence queries, when GBIF supplies it. Otherwise resolve the name with gbif_match_species.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: The taxonKey does not exist in the GBIF backbone. `invalid_filter`: GBIF rejected the taxonKey as unparseable — a value outside the 32-bit signed integer range. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: No GBIF checklist has a taxon usage with this taxonKey. `invalid_filter`: GBIF rejected the taxonKey as unparseable — a value outside the 32-bit signed integer range. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when the chain is empty because the taxon sits at the root of the backbone. Absent when the chain has entries."New value: +"Guidance when the chain is empty because the taxon sits at the root of its checklist. Absent when the chain has entries."
  2. Changed4 schema fields changed
    • addedInput schema / properties / taxonKey / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / taxonKey / minimum
      Added value: +0
    • changedInput schema / properties / taxonKey / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `not_found`: The taxonKey does not exist in the GBIF backbone. `invalid_filter`: GBIF rejected the taxonKey as unparseable — a fraction, or a value outside the 32-bit signed integer range. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `not_found`: The taxonKey does not exist in the GBIF backbone. `invalid_filter`: GBIF rejected the taxonKey as unparseable — a value outside the 32-bit signed integer range. Other values are possible when a failure originates below the handler."
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "classification"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `not_found`: The taxonKey does not exist in the GBIF backbone. `invalid_filter`: GBIF rejected the taxonKey as unparseable — a fraction, or a value outside the 32-bit signed integer range. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "not_found",
      +            "invalid_filter"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "classification"
      -]
  4. Changed1 schema field changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when the chain is empty because the taxon sits at the root of the backbone. Absent when the chain has entries.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedOutput schema / properties / classification / description
      Previous value: -"Classification chain ordered from root (kingdom) to the immediate parent of the queried taxon."New value: +"Classification chain ordered from root (kingdom) to the immediate parent of the queried taxon. The queried taxon itself is not included — call gbif_get_species for its own record."
  6. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/openWorld/idempotent annotations, it discloses the array's ordering (root-first), the exclusion of the queried taxon, and per-entry fields including the checklist and backbone mapping. It also flags a real behavioral caveat: nubKey is absent where the backbone has no mapping, which an agent could otherwise misread as a malformed result.

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

Conciseness4/5

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

Front-loaded with the core behavior and the root-first/exclusion facts before the field details and caveats. It is dense and mostly earns its length, though the parent range is stated twice ('from kingdom (or domain) down to the immediate parent' and again via the arrow chain), a small redundancy.

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

Completeness5/5

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

For a one-parameter read tool this covers everything an agent needs: traversal direction, inclusion/exclusion boundary, key semantics, and the null-mapping case. The return-field enumeration partly duplicates the existing output schema, but nothing required is missing.

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 coverage is 100% and the schema already explains that taxonKey may be a backbone key from gbif_match_species or a checklist taxon usage key. The description reinforces that keys in the returned chain are usage keys within datasetKey's checklist, but adds little new meaning about the single input parameter itself, so the baseline 3 applies.

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 precise verb and resource ('Return the parent chain for a taxon') and pins the exact boundary: root-first from kingdom/domain down to the immediate parent, with the queried taxon explicitly excluded. It names the sibling gbif_get_species as the tool for the taxon's own record, so an agent can separate the two without opening either schema.

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

Usage Guidelines4/5

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

Gives both a when-to-use rationale ('building taxonomic trees or understanding placement without walking the checklist level by level') and an explicit when-not routing to gbif_get_species for the taxon's own record. It does not address downward traversal (e.g. gbif_get_species_children), so the alternatives coverage is clear but not exhaustive.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.