Skip to main content
Glama

Worms Get Distributions

worms_get_distributions
Read-onlyIdempotent

Retrieve recorded distributions for an AphiaID or canonical WoRMS LSID in byte-budgeted segments; resume nextResultOffset as resultOffset with unchanged selectors and filters. WoRMS attaches records to individual name usages, so one AphiaID's rows can miss those of its synonyms: includeSynonyms combines the accepted taxon's rows with those of up to 10 synonyms per call, each row tagged sourceAphiaId; consume nextResultOffset before advancing synonymOffset to synonymUnion.nextSynonymOffset with resultOffset 0. Filters apply to the complete fetched set before pagination and combine by conjunction: recordStatus normalizes case and surrounding whitespace before exact matching; others use case-insensitive whole-value equality without trimming. Rows retain duplicates and source order; no rows does not prove biological or taxon absence. A notice names the linked accepted ID, distinguishing an accepted alternative representation from its preferred ID.

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": {
      "aphiaId": "<aphiaId>"
    },
    "name": "worms_get_distributions"
  }
}

Input Schema

NameRequiredDescriptionDefault
aphiaIdYesPositive safe-integer AphiaID, decimal string, or canonical urn:lsid:marinespecies.org:taxname:<AphiaID>; outputs remain numeric.
occurrenceNoCase-insensitive whole-value occurrence filter, such as Established; blank omitted. Observed values: worms_list_reference topic: distribution_terms.
invasivenessNoCase-insensitive whole-value invasiveness filter, such as Invasive; blank omitted. Observed values: worms_list_reference topic: distribution_terms.
recordStatusNoRecord status valid, doubtful, or inaccurate; ignores case and surrounding whitespace; blank means no filter.
resultOffsetNoZero-based local position; resubmit unchanged selectors and options.
synonymOffsetNoZero-based synonym position; once nextResultOffset is null, resubmit synonymUnion.nextSynonymOffset here with resultOffset 0. Inactive without includeSynonyms.
includeSynonymsNoCombine the accepted taxon's records with its synonyms', 10 synonyms per call; rows then carry sourceAphiaId.
establishmentMeansNoCase-insensitive whole-value establishment filter, such as Alien; blank omitted. Observed values: worms_list_reference topic: distribution_terms.

Output Schema

NameRequiredDescriptionDefault
echoNoOnly effective filters; recordStatus is canonical lowercase, other populated values are unchanged.
errorNoPresent when the call failed. Absent on success.
foundNoWhether WoRMS has the submitted taxon record; null when the optional status read failed.
noticeNoLinked accepted/preferred-AphiaID and empty-evidence guidance, in that order.
aphiaIdNoPositive safe-integer AphiaID; obtain from worms_resolve_taxon.
byteBudgetNoComplete serialized response byte target.
totalCountNoKnown local sequence length before pagination.
attributionNoWoRMS source attribution.
statusErrorNoFailed taxonomic-status read; evidence is unaffected, but whether the AphiaID is its accepted name is unknown.
resultOffsetNoZero-based starting position in the complete local sequence.
synonymUnionNoSynonym union window; present only with includeSynonyms.
budgetLimitedNoWhether the byte budget ended this local page early.
distributionsNoWhole matching rows in this segment, in source order.
filteredCountNoRows passing every effective filter.
oversizedItemNoOne indivisible scientific item exceeds the target; retained intact with forward progress.
requiredBytesNoSerialized paired-surface result bytes for an oversized item, excluding transport-added metadata.
returnedCountNoWhole scientific items returned on this segment.
unfilteredCountNoAll recorded rows before filtering; with includeSynonyms, those of this window.
nextResultOffsetNoNext local position; null when consumed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "not": {
      -      "required": [
      -        "error"
      -      ]
      -    },
      -    "required": [
      -      "resultOffset",
      -      "returnedCount",
      -      "totalCount",
      -      "nextResultOffset",
      -      "byteBudget",
      -      "budgetLimited",
      -      "oversizedItem",
      -      "aphiaId",
      -      "unfilteredCount",
      -      "filteredCount",
      -      "distributions",
      -      "attribution",
      -      "echo"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "resultOffset",
      +      "returnedCount",
      +      "totalCount",
      +      "nextResultOffset",
      +      "byteBudget",
      +      "budgetLimited",
      +      "oversizedItem",
      +      "aphiaId",
      +      "found",
      +      "unfilteredCount",
      +      "filteredCount",
      +      "distributions",
      +      "attribution",
      +      "echo"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / found
      Added value: +{
      +  "description": "Whether WoRMS has the submitted taxon record; null when the optional status read failed.",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld, yet the description adds real behavioral detail beyond them: filters apply to the full fetched set before pagination and combine by conjunction, recordStatus normalizes case and whitespace while others do not, rows keep duplicates and source order, and an empty result does not prove absence. The mention of a notice naming a linked accepted ID is useful but slightly under-specified about where it appears.

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?

The purpose and resumption rule are front-loaded, and sentences carry information without filler. The blocks on filter matching and synonym union are dense and could be split for scanability, but nothing is redundant.

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

Completeness4/5

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

For an eight-parameter paginated, filterable read tool with an output schema, the description covers the parts an agent most needs to avoid errors: pagination resumption, synonym union sequencing, filter conjunction and matching rules, and duplicate/order guarantees. Return-value shape is left to the output schema, which is appropriate; only the 'notice' mechanism is described without enough detail to act on.

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?

With schema description coverage at 100%, the schema already documents all eight parameters, so the baseline is 3. The description does add value for includeSynonyms (10 synonyms per call, rows tagged sourceAphiaId) and for the synonymOffset/resultOffset handshake, but the filter parameter semantics largely restate what the schema fields say.

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

Purpose4/5

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

The opening clause names a specific verb and resource ('Retrieve recorded distributions') and scopes it to an AphiaID or canonical WoRMS LSID, which distinguishes it from siblings like worms_get_synonyms and worms_get_traits. It stops short of explicitly contrasting behavior with a named alternative, so it is clear but not maximally differentiating.

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?

The description gives substantial procedural guidance for continuation (reuse nextResultOffset as resultOffset with unchanged selectors, consume it before advancing synonymOffset) and explains what includeSynonyms does. However, it never says when to prefer this tool over a sibling or when it should not be used, so selection guidance is only implied by the resource name.

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.