@cyanheads/gbif-biodiversity-mcp-server 0.6.1 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +1 -1
- package/README.md +12 -9
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-count-occurrences.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/gbif-count-occurrences.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-count-occurrences.tool.js +8 -6
- package/dist/mcp-server/tools/definitions/gbif-count-occurrences.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-occurrence-facets.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/gbif-occurrence-facets.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-occurrence-facets.tool.js +8 -6
- package/dist/mcp-server/tools/definitions/gbif-occurrence-facets.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-datasets.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/gbif-search-datasets.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-datasets.tool.js +7 -5
- package/dist/mcp-server/tools/definitions/gbif-search-datasets.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-occurrences.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/gbif-search-occurrences.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-occurrences.tool.js +8 -7
- package/dist/mcp-server/tools/definitions/gbif-search-occurrences.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-publishers.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-publishers.tool.js +12 -1
- package/dist/mcp-server/tools/definitions/gbif-search-publishers.tool.js.map +1 -1
- package/package.json +1 -1
- package/server.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/gbif-biodiversity-mcp-server
|
|
4
|
-
**Version:** 0.
|
|
4
|
+
**Version:** 0.7.0
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.11.1`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.30.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/gbif-biodiversity-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/gbif-biodiversity-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
| `gbif_count_occurrences` | Count occurrences matching a filter without fetching records — fast single-number response, filtered to sightings by default |
|
|
40
40
|
| `gbif_get_occurrence` | Fetch a single occurrence record by key — full Darwin Core record with GADM geography, presence/absence status, conservation status, media, and quality flags |
|
|
41
41
|
| `gbif_occurrence_facets` | Aggregate occurrence counts by a dimension — country, year, basis of record, dataset, kingdom, presence/absence, IUCN Red List category |
|
|
42
|
-
| `gbif_search_datasets` | Search GBIF datasets by keyword, type, country, or
|
|
42
|
+
| `gbif_search_datasets` | Search GBIF datasets by keyword, type, country, or hosting organization |
|
|
43
43
|
| `gbif_get_dataset` | Fetch full dataset metadata by UUID — title, description, citation, contacts, license, DOI, coverage |
|
|
44
44
|
| `gbif_search_publishers` | Search GBIF-registered publishing organizations by name fragment or country |
|
|
45
45
|
|
|
@@ -118,8 +118,9 @@ List direct children of a backbone taxon.
|
|
|
118
118
|
Search 3.9B+ GBIF occurrence records with full Darwin Core filtering.
|
|
119
119
|
|
|
120
120
|
- Use `taxonKey` from `gbif_match_species` for reliable results — resolves synonyms automatically; `scientificName` filter does not
|
|
121
|
-
- Geographic filters: `country` (ISO 3166-1 alpha-2), `stateProvince`, bounding box (`decimalLatitude`/`decimalLongitude` ranges as "min,max"), or WKT polygon (`geometry`)
|
|
121
|
+
- Geographic filters: `country` (ISO 3166-1 alpha-2, uppercase), `stateProvince`, bounding box (`decimalLatitude`/`decimalLongitude` ranges as "min,max"), or WKT polygon (`geometry`)
|
|
122
122
|
- `publishingCountry` (ISO 3166-1 alpha-2, uppercase) is the country of the *publishing organization*, not of the observation — a different question from `country`, and the two disagree on most records: of 60,290,950 records observed in GB, 1,548,928 were published by US organizations
|
|
123
|
+
- Both country filters take the uppercase two-letter form only. GBIF parses a lowercase or alpha-3 code and then matches the verbatim string, so `gb` and `USA` return zero records instead of an error; the schema pattern turns that silent wrong answer into a validation error naming the accepted form. A two-letter code GBIF does not assign (`XX`) is rejected upstream by name and surfaces as `invalid_filter`
|
|
123
124
|
- `stateProvince` is matched verbatim — exact and case-sensitive, with no controlled vocabulary behind it. Take a value from a `STATE_PROVINCE` facet rather than guessing; an unmatched value returns zero records instead of an error, and the enrichment notice says so when it happens
|
|
124
125
|
- Temporal filters: `year` as single year or range, `month` (1–12) for seasonal queries
|
|
125
126
|
- `basisOfRecord` enum: `HUMAN_OBSERVATION`, `PRESERVED_SPECIMEN`, `MACHINE_OBSERVATION`, and more
|
|
@@ -136,7 +137,7 @@ Search 3.9B+ GBIF occurrence records with full Darwin Core filtering.
|
|
|
136
137
|
Count occurrences matching a filter without fetching any records.
|
|
137
138
|
|
|
138
139
|
- Backed by `/occurrence/search` at `limit=0` — no record payload, and the same endpoint `gbif_search_occurrences` queries, so the two agree on the same question. GBIF's dedicated `/occurrence/count` endpoint takes a closed parameter set that rejects `occurrenceStatus` and `iucnRedListCategory` outright
|
|
139
|
-
- Supported filters: `taxonKey`, `country`, `publishingCountry`, `stateProvince`, `isGeoreferenced`, `datasetKey`, `year`, `occurrenceStatus`, `iucnRedListCategory`
|
|
140
|
+
- Supported filters: `taxonKey`, `country`, `publishingCountry`, `stateProvince`, `isGeoreferenced`, `datasetKey`, `year`, `occurrenceStatus`, `iucnRedListCategory`. `country` and `publishingCountry` take the uppercase alpha-2 form only, for the reason given under `gbif_search_occurrences`
|
|
140
141
|
- Counts sightings only by default, matching `gbif_search_occurrences`. For absence-heavy taxa the unfiltered figure is a different question entirely — *Radicipes gracilis* has 2,351,582 indexed records of which 79 are presences
|
|
141
142
|
- Use to assess result set size before deciding whether to paginate a full search. A count above 100,001 means paging cannot reach the end of it, and the enrichment notice says so and names the partition route
|
|
142
143
|
|
|
@@ -162,7 +163,7 @@ Fetch a single occurrence record by GBIF occurrence key.
|
|
|
162
163
|
Aggregate occurrence counts across a dimension.
|
|
163
164
|
|
|
164
165
|
- Facets: `COUNTRY`, `STATE_PROVINCE`, `YEAR`, `BASIS_OF_RECORD`, `DATASET_KEY`, `KINGDOM_KEY`, `PHYLUM_KEY`, `CLASS_KEY`, `ORDER_KEY`, `FAMILY_KEY`, `GENUS_KEY`, `SPECIES_KEY`, `PUBLISHING_COUNTRY`, `MONTH`, `OCCURRENCE_STATUS`, `IUCN_RED_LIST_CATEGORY`
|
|
165
|
-
- Scope with `taxonKey`, `country`, `publishingCountry`, `stateProvince`, `year`, `geometry`, `basisOfRecord`, `datasetKey`, `occurrenceStatus`, or `iucnRedListCategory` filters — so a `PUBLISHING_COUNTRY
|
|
166
|
+
- Scope with `taxonKey`, `country`, `publishingCountry`, `stateProvince`, `year`, `geometry`, `basisOfRecord`, `datasetKey`, `occurrenceStatus`, or `iucnRedListCategory` filters — so a `COUNTRY`, `PUBLISHING_COUNTRY`, or `STATE_PROVINCE` bucket can be passed straight back to drill into it. `country` and `publishingCountry` take the uppercase alpha-2 form only, for the reason given under `gbif_search_occurrences`
|
|
166
167
|
- Aggregates sightings only by default, matching the search and count tools. To measure the presence/absence split itself, pass `facet: OCCURRENCE_STATUS` with `occurrenceStatus: ANY`
|
|
167
168
|
- Returns one page of values ranked by count descending — up to `facetLimit` (max 100), the top ones only while `facetOffset` is 0 — with no record payloads
|
|
168
169
|
- `DATASET_KEY` is the basis for splitting a result set too large for `gbif_search_occurrences` to page: every occurrence carries exactly one `datasetKey`, so its buckets sum to the scope's full total, and it has the cardinality to cut a large scope into pageable pieces. `BASIS_OF_RECORD` and `PUBLISHING_COUNTRY` are gap-free too and both have a matching filter on the occurrence tools, so either can drive a further split of a bucket still over the cap — but on that scope they return 9 and 41 buckets against `DATASET_KEY`'s 550, too coarse for the first cut. A dimension a record can lack drops that record: a 60,290,950-record scope faceted by `YEAR` sums to 59,407,400, leaving 883,550 undated records out, and `MONTH`, `STATE_PROVINCE`, and `SPECIES_KEY` behave the same way — `STATE_PROVINCE` included, even though the occurrence tools can filter on it
|
|
@@ -174,12 +175,13 @@ Aggregate occurrence counts across a dimension.
|
|
|
174
175
|
|
|
175
176
|
### `gbif_search_datasets`
|
|
176
177
|
|
|
177
|
-
Search GBIF datasets by keyword, type, country, or
|
|
178
|
+
Search GBIF datasets by keyword, type, country, or hosting organization.
|
|
178
179
|
|
|
179
|
-
- Filters: free-text query, dataset type (`OCCURRENCE`, `CHECKLIST`, `METADATA`, `SAMPLING_EVENT`),
|
|
180
|
+
- Filters: free-text query, dataset type (`OCCURRENCE`, `CHECKLIST`, `METADATA`, `SAMPLING_EVENT`), `publishingCountry` (ISO 3166-1 alpha-2, uppercase), hosting organization UUID
|
|
181
|
+
- `publishingCountry` takes the uppercase two-letter form only, for the same reason the occurrence filters do: `/dataset/search` matches the verbatim stored code, so `gb` and `GBR` return zero datasets where `GB` returns 2,416. A two-letter code GBIF does not assign (`XX`) is rejected upstream by name and surfaces as `invalid_filter`
|
|
180
182
|
- Returns title, type, description, license, DOI, and record count. `recordCount` spans every `occurrenceStatus`, absences included — `gbif_count_occurrences` with the same key counts sightings only by default, so the two figures differ by design
|
|
181
183
|
- The `description` is a 300-character preview — `descriptionTruncated` flags when it was shortened, and `gbif_get_dataset` returns the full text
|
|
182
|
-
- Use `hostingOrg` from `gbif_search_publishers` to scope to datasets from
|
|
184
|
+
- Use `hostingOrg` from `gbif_search_publishers` to scope to the datasets one organization hosts — the hosting organization runs the installation a dataset is served from, which is often not the organization that published it
|
|
183
185
|
- Paginated — limit up to 1000
|
|
184
186
|
|
|
185
187
|
---
|
|
@@ -202,7 +204,8 @@ Fetch full dataset metadata by UUID.
|
|
|
202
204
|
Search organizations registered with GBIF.
|
|
203
205
|
|
|
204
206
|
- Filter by name fragment or country
|
|
205
|
-
-
|
|
207
|
+
- `country` here is unconstrained on purpose: the registry endpoint matches the *parsed* country rather than the verbatim string, so `gb`, `GBR`, and `GB` all return the same 223 organizations. The uppercase-only rule the occurrence tools and `gbif_search_datasets` carry exists to close a silent zero that does not occur on this route
|
|
208
|
+
- Returns organization key, title, and country. The key chains into `gbif_search_datasets` as `hostingOrg`, which matches only datasets the organization *hosts* — an organization that publishes datasets hosted elsewhere returns none
|
|
206
209
|
- Paginated — limit up to 1000
|
|
207
210
|
|
|
208
211
|
## Resources
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import { initGbifService } from './services/gbif/gbif-service.js';
|
|
|
28
28
|
await createApp({
|
|
29
29
|
name: 'gbif-biodiversity-mcp-server',
|
|
30
30
|
title: 'gbif-biodiversity-mcp-server',
|
|
31
|
-
instructions: 'Use the gbif_* tools to query species taxonomy, occurrences, datasets, and publishers via the GBIF API. Keyless — these endpoints need no credentials. Resolve any name with gbif_match_species first — it returns the backbone taxonKey the occurrence tools expect, resolving a synonym to its accepted taxon and reporting the matched synonym key alongside as matchedTaxonKey, unlike the raw scientificName filter. Countries use ISO 3166-1 alpha-2; datasets and publishers are keyed by UUID, occurrences by integer key. On the occurrence tools country is where the record was observed and publishingCountry is the country of the organization that published it — different questions that disagree on most records, so pick deliberately; stateProvince is matched verbatim, exactly and case-sensitively, and an unrecognized value returns zero records rather than an error, so take one from a STATE_PROVINCE facet instead of guessing a spelling. GBIF indexes absence records — a documented survey that looked for a taxon and did not find it — alongside sightings, so gbif_search_occurrences, gbif_count_occurrences, and gbif_occurrence_facets all default occurrenceStatus to PRESENT and report the applied filter in their enrichment; pass ANY to include absences, or ABSENT for absences alone. For some taxa absences dominate: an unfiltered count can run five orders of magnitude above the sightings it appears to report. The dataset recordCount on gbif_search_datasets, gbif_get_dataset, and the gbif://dataset/{datasetKey} resource is not filtered that way — it spans every occurrenceStatus, so it will exceed a gbif_count_occurrences total for the same datasetKey by design. Occurrence paging caps at offset+limit=100,001 and GBIF exposes no cursor or scroll, so a larger result set is reached only by partitioning it: gbif_occurrence_facets with facet DATASET_KEY splits a scope into buckets that sum to its full total, since every occurrence carries exactly one datasetKey, and each bucket is then searchable on its own; a facet on a dimension a record can lack — YEAR, MONTH, STATE_PROVINCE — leaves those records in no bucket, stateProvince included even though the occurrence tools can filter on it, while BASIS_OF_RECORD and PUBLISHING_COUNTRY are gap-free and both have a matching search filter, making either a sound second cut on a bucket still over the cap though too coarse for the first. Bucket sums reconcile only against the same occurrenceStatus, and only when the facet call repeats the search filters — gbif_occurrence_facets accepts a narrower set than gbif_search_occurrences and gbif_count_occurrences, so re-apply whatever it cannot take on each per-datasetKey search. This server cannot retrieve a result set in bulk — the GBIF Download API needs a GBIF.org account and returns an archive asynchronously, and the monthly GBIF Parquet snapshot on AWS Open Data is a bulk dataset; both are routes to take outside this server.',
|
|
31
|
+
instructions: 'Use the gbif_* tools to query species taxonomy, occurrences, datasets, and publishers via the GBIF API. Keyless — these endpoints need no credentials. Resolve any name with gbif_match_species first — it returns the backbone taxonKey the occurrence tools expect, resolving a synonym to its accepted taxon and reporting the matched synonym key alongside as matchedTaxonKey, unlike the raw scientificName filter. Countries use ISO 3166-1 alpha-2; datasets and publishers are keyed by UUID, occurrences by integer key. On the occurrence tools country and publishingCountry, and on gbif_search_datasets publishingCountry, the uppercase two-letter form is the only one accepted — lowercase and alpha-3 forms ("gb", "USA") match nothing on those routes, so those fields reject anything else rather than answering zero, while gbif_search_publishers resolves either form case-insensitively against the registry and needs no such constraint. On the occurrence tools country is where the record was observed and publishingCountry is the country of the organization that published it — different questions that disagree on most records, so pick deliberately; stateProvince is matched verbatim, exactly and case-sensitively, and an unrecognized value returns zero records rather than an error, so take one from a STATE_PROVINCE facet instead of guessing a spelling. GBIF indexes absence records — a documented survey that looked for a taxon and did not find it — alongside sightings, so gbif_search_occurrences, gbif_count_occurrences, and gbif_occurrence_facets all default occurrenceStatus to PRESENT and report the applied filter in their enrichment; pass ANY to include absences, or ABSENT for absences alone. For some taxa absences dominate: an unfiltered count can run five orders of magnitude above the sightings it appears to report. The dataset recordCount on gbif_search_datasets, gbif_get_dataset, and the gbif://dataset/{datasetKey} resource is not filtered that way — it spans every occurrenceStatus, so it will exceed a gbif_count_occurrences total for the same datasetKey by design. Occurrence paging caps at offset+limit=100,001 and GBIF exposes no cursor or scroll, so a larger result set is reached only by partitioning it: gbif_occurrence_facets with facet DATASET_KEY splits a scope into buckets that sum to its full total, since every occurrence carries exactly one datasetKey, and each bucket is then searchable on its own; a facet on a dimension a record can lack — YEAR, MONTH, STATE_PROVINCE — leaves those records in no bucket, stateProvince included even though the occurrence tools can filter on it, while BASIS_OF_RECORD and PUBLISHING_COUNTRY are gap-free and both have a matching search filter, making either a sound second cut on a bucket still over the cap though too coarse for the first. Bucket sums reconcile only against the same occurrenceStatus, and only when the facet call repeats the search filters — gbif_occurrence_facets accepts a narrower set than gbif_search_occurrences and gbif_count_occurrences, so re-apply whatever it cannot take on each per-datasetKey search. This server cannot retrieve a result set in bulk — the GBIF Download API needs a GBIF.org account and returns an archive asynchronously, and the monthly GBIF Parquet snapshot on AWS Open Data is a bulk dataset; both are routes to take outside this server.',
|
|
32
32
|
tools: [
|
|
33
33
|
gbifMatchSpecies,
|
|
34
34
|
gbifBulkMatchSpecies,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,YAAY;AACZ,OAAO,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,EAAE,mBAAmB,EAAE,MAAM,6DAA6D,CAAC;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,gEAAgE,CAAC;AACtG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AACrG,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAC/F,OAAO,EAAE,cAAc,EAAE,MAAM,yDAAyD,CAAC;AACzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,kEAAkE,CAAC;AAC1G,OAAO,EAAE,4BAA4B,EAAE,MAAM,wEAAwE,CAAC;AACtH,iBAAiB;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2DAA2D,CAAC;AAC7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AACrG,8BAA8B;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6DAA6D,CAAC;AACjG,mBAAmB;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gEAAgE,CAAC;AACvG,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAC;AACrG,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAElE,MAAM,SAAS,CAAC;IACd,IAAI,EAAE,8BAA8B;IACpC,KAAK,EAAE,8BAA8B;IACrC,YAAY,EACV,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[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QACtB,qBAAqB;QACrB,oBAAoB;QACpB,iBAAiB;QACjB,oBAAoB;QACpB,kBAAkB;QAClB,cAAc;QACd,oBAAoB;KACrB;IACD,SAAS,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IACrD,OAAO,EAAE,EAAE;IACX,6EAA6E;IAC7E,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;IAC/B,KAAK,CAAC,IAAI;QACR,MAAM,GAAG,GAAG,eAAe,EAAE,CAAC;QAC9B,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE;YACzC,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,SAAS,EAAE,GAAG,CAAC,gBAAgB;YAC/B,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -33,8 +33,8 @@ export declare const gbifCountOccurrences: import("@cyanheads/mcp-ts-core").Tool
|
|
|
33
33
|
}, z.core.$strip>, readonly [{
|
|
34
34
|
readonly reason: "invalid_filter";
|
|
35
35
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
36
|
-
readonly when: "datasetKey is not a UUID, or GBIF rejected another filter value as malformed.";
|
|
37
|
-
readonly recovery: "Supply datasetKey as the 8-4-4-4-12 hex UUID gbif_search_datasets returns; year is a single year or a \"min,max\" range.";
|
|
36
|
+
readonly when: "datasetKey is not a UUID, a two-letter country or publishingCountry code is one GBIF does not know, or GBIF rejected another filter value as malformed.";
|
|
37
|
+
readonly recovery: "Supply datasetKey as the 8-4-4-4-12 hex UUID gbif_search_datasets returns; year is a single year or a \"min,max\" range; country and publishingCountry are codes GBIF assigns, so take one from a COUNTRY or PUBLISHING_COUNTRY facet on gbif_occurrence_facets.";
|
|
38
38
|
}], {
|
|
39
39
|
readonly occurrenceStatus: z.ZodString;
|
|
40
40
|
readonly notice: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-count-occurrences.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-count-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"gbif-count-occurrences.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-count-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAUjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsJ/B,CAAC"}
|
|
@@ -11,7 +11,8 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
11
11
|
title: 'Count Occurrences',
|
|
12
12
|
description: 'Count occurrences matching a taxon + location filter without fetching records. ' +
|
|
13
13
|
'Use for quick totals ("how many Aves records in Sweden?") or before deciding whether ' +
|
|
14
|
-
'to paginate a full search. Accepts taxonKey, country
|
|
14
|
+
'to paginate a full search. Accepts taxonKey, country (uppercase ISO 3166-1 alpha-2), ' +
|
|
15
|
+
'publishingCountry, stateProvince, ' +
|
|
15
16
|
'isGeoreferenced, datasetKey, year, ' +
|
|
16
17
|
'occurrenceStatus, and iucnRedListCategory. Counts sightings only by default, matching ' +
|
|
17
18
|
'gbif_search_occurrences — GBIF also indexes absence records, and for some taxa they are ' +
|
|
@@ -26,11 +27,12 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
26
27
|
.describe('GBIF backbone taxon key from gbif_match_species. Matches the given taxon and all descendant taxa (subspecies, varieties, etc.).'),
|
|
27
28
|
country: z
|
|
28
29
|
.string()
|
|
30
|
+
.regex(/^[A-Z]{2}$/, 'country must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("gb"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
29
31
|
.optional()
|
|
30
|
-
.describe('ISO 3166-1 alpha-2 code of where the occurrence was recorded (e.g., "GB", "US"). Not the publisher\'s country — that is publishingCountry, and the two disagree on most records.'),
|
|
32
|
+
.describe('ISO 3166-1 alpha-2 code, uppercase, of where the occurrence was recorded (e.g., "GB", "US"). Not the publisher\'s country — that is publishingCountry, and the two disagree on most records. Lowercase and alpha-3 forms ("gb", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here. Take a value from a COUNTRY facet on gbif_occurrence_facets; an uppercase pair GBIF does not know ("XX") is rejected upstream by name.'),
|
|
31
33
|
publishingCountry: z
|
|
32
34
|
.string()
|
|
33
|
-
.regex(/^[A-Z]{2}
|
|
35
|
+
.regex(/^[A-Z]{2}$/, 'publishingCountry must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("us"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
34
36
|
.optional()
|
|
35
37
|
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the record — not where the occurrence was observed, which is country. The two differ constantly: of 60,290,950 records observed in GB, 1,548,928 were published by US organizations. Take a value from a PUBLISHING_COUNTRY facet on gbif_occurrence_facets. Lowercase and alpha-3 forms ("us", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here.'),
|
|
36
38
|
stateProvince: z
|
|
@@ -75,8 +77,8 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
75
77
|
{
|
|
76
78
|
reason: 'invalid_filter',
|
|
77
79
|
code: JsonRpcErrorCode.InvalidParams,
|
|
78
|
-
when: 'datasetKey is not a UUID, or GBIF rejected another filter value as malformed.',
|
|
79
|
-
recovery: 'Supply datasetKey as the 8-4-4-4-12 hex UUID gbif_search_datasets returns; year is a single year or a "min,max" range.',
|
|
80
|
+
when: 'datasetKey is not a UUID, a two-letter country or publishingCountry code is one GBIF does not know, or GBIF rejected another filter value as malformed.',
|
|
81
|
+
recovery: 'Supply datasetKey as the 8-4-4-4-12 hex UUID gbif_search_datasets returns; year is a single year or a "min,max" range; country and publishingCountry are codes GBIF assigns, so take one from a COUNTRY or PUBLISHING_COUNTRY facet on gbif_occurrence_facets.',
|
|
80
82
|
},
|
|
81
83
|
],
|
|
82
84
|
async handler(input, ctx) {
|
|
@@ -91,7 +93,7 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
91
93
|
}
|
|
92
94
|
const count = await getGbifService().countOccurrences({
|
|
93
95
|
...(input.taxonKey !== undefined && { taxonKey: input.taxonKey }),
|
|
94
|
-
...(input.country
|
|
96
|
+
...(input.country && { country: input.country }),
|
|
95
97
|
...(input.publishingCountry && { publishingCountry: input.publishingCountry }),
|
|
96
98
|
...(input.stateProvince?.trim() && { stateProvince: input.stateProvince }),
|
|
97
99
|
...(input.isGeoreferenced !== undefined && { isGeoreferenced: input.isGeoreferenced }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-count-occurrences.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-count-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,iFAAiF;QACjF,uFAAuF;QACvF,
|
|
1
|
+
{"version":3,"file":"gbif-count-occurrences.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-count-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAErB,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,iFAAiF;QACjF,uFAAuF;QACvF,uFAAuF;QACvF,oCAAoC;QACpC,qCAAqC;QACrC,wFAAwF;QACxF,0FAA0F;QAC1F,0FAA0F;QAC1F,qFAAqF;QACrF,4EAA4E;IAC9E,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,iIAAiI,CAClI;QACH,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,KAAK,CACJ,YAAY,EACZ,yKAAyK,CAC1K;aACA,QAAQ,EAAE;aACV,QAAQ,CACP,ycAAyc,CAC1c;QACH,iBAAiB,EAAE,CAAC;aACjB,MAAM,EAAE;aACR,KAAK,CACJ,YAAY,E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CAAC,KAAK,CAAC,gBAAgB,KAAK,KAAK,IAAI,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC;YACrF,GAAG,CAAC,KAAK,CAAC,mBAAmB,IAAI,EAAE,mBAAmB,EAAE,KAAK,CAAC,mBAAmB,EAAE,CAAC;SACrF,EACD,GAAG,CACJ,CAAC;QAEF,GAAG,CAAC,MAAM,CAAC,EAAE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EAAE,CAAC,CAAC;QACzD,MAAM,MAAM,GAAG;YACb,0BAA0B,CAAC,KAAK,CAAC,aAAa,EAAE,KAAK,CAAC;YACtD,uBAAuB,CAAC,KAAK,CAAC;YAC9B,sBAAsB,CAAC,KAAK,CAAC,gBAAgB,CAAC;SAC/C;aACE,MAAM,CAAC,OAAO,CAAC;aACf,IAAI,CAAC,GAAG,CAAC,CAAC;QACb,IAAI,MAAM;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAEtC,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,yBAAyB,MAAM,CAAC,KAAK,EAAE,EAAE,CAAC;CACtF,CAAC,CAAC"}
|
|
@@ -68,8 +68,8 @@ export declare const gbifOccurrenceFacets: import("@cyanheads/mcp-ts-core").Tool
|
|
|
68
68
|
}, z.core.$strip>, readonly [{
|
|
69
69
|
readonly reason: "invalid_filter";
|
|
70
70
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
71
|
-
readonly when: "datasetKey is not a UUID, or GBIF rejected the geometry or year scope as malformed.";
|
|
72
|
-
readonly recovery: "The message names the rejected value. Correct that one scope filter: geometry is a closed WKT ring in longitude latitude order, year is a single year or \"min,max\",
|
|
71
|
+
readonly when: "datasetKey is not a UUID, a two-letter country or publishingCountry code is one GBIF does not know, or GBIF rejected the geometry or year scope as malformed.";
|
|
72
|
+
readonly recovery: "The message names the rejected value. Correct that one scope filter: geometry is a closed WKT ring in longitude latitude order, year is a single year or \"min,max\", datasetKey is a UUID from gbif_search_datasets, and country and publishingCountry are codes GBIF assigns — take one from a COUNTRY or PUBLISHING_COUNTRY facet.";
|
|
73
73
|
}], {
|
|
74
74
|
readonly facetLimit: z.ZodNumber;
|
|
75
75
|
readonly facetOffset: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-occurrence-facets.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-occurrence-facets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmCjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"gbif-occurrence-facets.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-occurrence-facets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmCjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwO/B,CAAC"}
|
|
@@ -42,7 +42,8 @@ export const gbifOccurrenceFacets = tool('gbif_occurrence_facets', {
|
|
|
42
42
|
'facetLimit at facetOffset 0, a later slice of the same ranking past that. No record payloads returned. ' +
|
|
43
43
|
'Core tool for distribution analysis and trend queries: "which countries have the most records ' +
|
|
44
44
|
'for this species?", "how has observation volume changed since 2010?". ' +
|
|
45
|
-
'Scope the aggregation with taxonKey, country
|
|
45
|
+
'Scope the aggregation with taxonKey, country (uppercase ISO 3166-1 alpha-2), ' +
|
|
46
|
+
'publishingCountry, stateProvince, year, ' +
|
|
46
47
|
'geometry, basisOfRecord, datasetKey, ' +
|
|
47
48
|
'occurrenceStatus, or iucnRedListCategory filters. Also the way to split a result set too ' +
|
|
48
49
|
'large for gbif_search_occurrences to page (offset+limit caps at 100,001): facet by ' +
|
|
@@ -60,11 +61,12 @@ export const gbifOccurrenceFacets = tool('gbif_occurrence_facets', {
|
|
|
60
61
|
.describe('Backbone taxon key to scope the aggregation. Matches the given taxon and all descendant taxa (subspecies, varieties, etc.).'),
|
|
61
62
|
country: z
|
|
62
63
|
.string()
|
|
64
|
+
.regex(/^[A-Z]{2}$/, 'country must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("gb"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
63
65
|
.optional()
|
|
64
|
-
.describe(
|
|
66
|
+
.describe('ISO 3166-1 alpha-2 code, uppercase, of where the occurrence was recorded, to scope to one country. Not the publisher\'s country — that is publishingCountry, and the two disagree on most records. Scope to one country, or pass back a value this tool returned under facet COUNTRY to drill into that bucket. Lowercase and alpha-3 forms ("gb", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here.'),
|
|
65
67
|
publishingCountry: z
|
|
66
68
|
.string()
|
|
67
|
-
.regex(/^[A-Z]{2}
|
|
69
|
+
.regex(/^[A-Z]{2}$/, 'publishingCountry must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("us"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
68
70
|
.optional()
|
|
69
71
|
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the record — not where the occurrence was observed, which is country. Scope to one publisher country, or pass back a value this tool returned under facet PUBLISHING_COUNTRY to drill into that bucket. Lowercase and alpha-3 forms ("us", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here.'),
|
|
70
72
|
stateProvince: z
|
|
@@ -138,8 +140,8 @@ export const gbifOccurrenceFacets = tool('gbif_occurrence_facets', {
|
|
|
138
140
|
{
|
|
139
141
|
reason: 'invalid_filter',
|
|
140
142
|
code: JsonRpcErrorCode.InvalidParams,
|
|
141
|
-
when: 'datasetKey is not a UUID, or GBIF rejected the geometry or year scope as malformed.',
|
|
142
|
-
recovery: 'The message names the rejected value. Correct that one scope filter: geometry is a closed WKT ring in longitude latitude order, year is a single year or "min,max",
|
|
143
|
+
when: 'datasetKey is not a UUID, a two-letter country or publishingCountry code is one GBIF does not know, or GBIF rejected the geometry or year scope as malformed.',
|
|
144
|
+
recovery: 'The message names the rejected value. Correct that one scope filter: geometry is a closed WKT ring in longitude latitude order, year is a single year or "min,max", datasetKey is a UUID from gbif_search_datasets, and country and publishingCountry are codes GBIF assigns — take one from a COUNTRY or PUBLISHING_COUNTRY facet.',
|
|
143
145
|
},
|
|
144
146
|
],
|
|
145
147
|
async handler(input, ctx) {
|
|
@@ -150,7 +152,7 @@ export const gbifOccurrenceFacets = tool('gbif_occurrence_facets', {
|
|
|
150
152
|
const raw = await getGbifService().getOccurrenceFacets({
|
|
151
153
|
facet: input.facet,
|
|
152
154
|
...(input.taxonKey !== undefined && { taxonKey: input.taxonKey }),
|
|
153
|
-
...(input.country
|
|
155
|
+
...(input.country && { country: input.country }),
|
|
154
156
|
...(input.publishingCountry && { publishingCountry: input.publishingCountry }),
|
|
155
157
|
...(input.stateProvince?.trim() && { stateProvince: input.stateProvince }),
|
|
156
158
|
...(input.year?.trim() && { year: input.year }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-occurrence-facets.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-occurrence-facets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE7F,MAAM,sBAAsB,GAAG;IAC7B,mBAAmB;IACnB,qBAAqB;IACrB,oBAAoB;IACpB,iBAAiB;IACjB,iBAAiB;IACjB,mBAAmB;IACnB,YAAY;IACZ,YAAY;CACJ,CAAC;AAEX,MAAM,YAAY,GAAG;IACnB,iBAAiB;IACjB,SAAS;IACT,gBAAgB;IAChB,MAAM;IACN,aAAa;IACb,aAAa;IACb,YAAY;IACZ,WAAW;IACX,WAAW;IACX,YAAY;IACZ,WAAW;IACX,aAAa;IACb,oBAAoB;IACpB,OAAO;IACP,mBAAmB;IACnB,wBAAwB;CAChB,CAAC;AAEX,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,8BAA8B;IACrC,WAAW,EACT,+GAA+G;QAC/G,4FAA4F;QAC5F,yGAAyG;QACzG,gGAAgG;QAChG,wEAAwE;QACxE,
|
|
1
|
+
{"version":3,"file":"gbif-occurrence-facets.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-occurrence-facets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,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YAClB,gBAAgB,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;YAChC,MAAM;SACP,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB;;;;;WAKG;QACH,MAAM,KAAK,GAAa;YACtB,MAAM,MAAM,CAAC,KAAK,QAAQ;YAC1B,mCAAmC,MAAM,CAAC,gBAAgB,EAAE;YAC5D,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC;gBACxB,CAAC,CAAC,mCAAmC;gBACrC,CAAC,CAAC,iDAAiD,MAAM,CAAC,MAAM,CAAC,MAAM,+BAA+B;SACzG,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,CAAC,gBAAgB,IAAI,CAAC,CAAC;QAC3C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YAClC,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,OAAO,KAAK,CAAC,IAAI,OAAO,KAAK,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,GAAG,aAAa,CAAC,CAAC;QACxF,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -31,8 +31,8 @@ export declare const gbifSearchDatasets: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
31
31
|
}, z.core.$strip>, readonly [{
|
|
32
32
|
readonly reason: "invalid_filter";
|
|
33
33
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
34
|
-
readonly when: "hostingOrg is not a UUID, or GBIF rejected another filter value as malformed.";
|
|
35
|
-
readonly recovery: "Supply hostingOrg as the 8-4-4-4-12 hex UUID gbif_search_publishers returns in its key field — an organization name is not a key.";
|
|
34
|
+
readonly when: "hostingOrg is not a UUID, publishingCountry is a two-letter code GBIF does not assign, or GBIF rejected another filter value as malformed.";
|
|
35
|
+
readonly recovery: "Supply hostingOrg as the 8-4-4-4-12 hex UUID gbif_search_publishers returns in its key field — an organization name is not a key; publishingCountry is a code GBIF assigns, so take one from a PUBLISHING_COUNTRY facet on gbif_occurrence_facets.";
|
|
36
36
|
}], {
|
|
37
37
|
readonly totalCount: z.ZodNumber;
|
|
38
38
|
readonly offset: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-search-datasets.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-datasets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAoBjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"gbif-search-datasets.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-datasets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAoBjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgL7B,CAAC"}
|
|
@@ -19,7 +19,8 @@ function buildNotice(args) {
|
|
|
19
19
|
}
|
|
20
20
|
export const gbifSearchDatasets = tool('gbif_search_datasets', {
|
|
21
21
|
title: 'Search Datasets',
|
|
22
|
-
description: 'Search GBIF datasets by keyword, type, country
|
|
22
|
+
description: 'Search GBIF datasets by keyword, type, publishing country (uppercase ISO 3166-1 alpha-2), ' +
|
|
23
|
+
'or hosting organization. ' +
|
|
23
24
|
'Returns dataset title, description, license, record count, and DOI. ' +
|
|
24
25
|
'Use to find the source dataset behind a set of records, or to explore what data collections ' +
|
|
25
26
|
'are available for a taxon, country, or organization.',
|
|
@@ -32,8 +33,9 @@ export const gbifSearchDatasets = tool('gbif_search_datasets', {
|
|
|
32
33
|
.describe('Filter by dataset type. OCCURRENCE for observation records, CHECKLIST for species lists.'),
|
|
33
34
|
publishingCountry: z
|
|
34
35
|
.string()
|
|
36
|
+
.regex(/^[A-Z]{2}$/, 'publishingCountry must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("gb"), alpha-3 ("GBR"), and country names ("Britain") match no datasets upstream.')
|
|
35
37
|
.optional()
|
|
36
|
-
.describe('ISO 3166-1 alpha-2
|
|
38
|
+
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the dataset (e.g., "GB", "US", "DE", "SE"). Lowercase and alpha-3 forms ("gb", "GBR") match nothing upstream, which is why only the uppercase two-letter form is accepted here — unlike the country filter on gbif_search_publishers, which resolves either form. Take a value from a PUBLISHING_COUNTRY facet on gbif_occurrence_facets; an uppercase pair GBIF does not assign ("XX") is rejected upstream by name.'),
|
|
37
39
|
hostingOrg: z
|
|
38
40
|
.string()
|
|
39
41
|
.optional()
|
|
@@ -87,8 +89,8 @@ export const gbifSearchDatasets = tool('gbif_search_datasets', {
|
|
|
87
89
|
{
|
|
88
90
|
reason: 'invalid_filter',
|
|
89
91
|
code: JsonRpcErrorCode.InvalidParams,
|
|
90
|
-
when: 'hostingOrg is not a UUID, or GBIF rejected another filter value as malformed.',
|
|
91
|
-
recovery: 'Supply hostingOrg as the 8-4-4-4-12 hex UUID gbif_search_publishers returns in its key field — an organization name is not a key.',
|
|
92
|
+
when: 'hostingOrg is not a UUID, publishingCountry is a two-letter code GBIF does not assign, or GBIF rejected another filter value as malformed.',
|
|
93
|
+
recovery: 'Supply hostingOrg as the 8-4-4-4-12 hex UUID gbif_search_publishers returns in its key field — an organization name is not a key; publishingCountry is a code GBIF assigns, so take one from a PUBLISHING_COUNTRY facet on gbif_occurrence_facets.',
|
|
92
94
|
},
|
|
93
95
|
],
|
|
94
96
|
async handler(input, ctx) {
|
|
@@ -99,7 +101,7 @@ export const gbifSearchDatasets = tool('gbif_search_datasets', {
|
|
|
99
101
|
const raw = await getGbifService().searchDatasets({
|
|
100
102
|
...(input.q?.trim() && { q: input.q }),
|
|
101
103
|
...(input.type && { type: input.type }),
|
|
102
|
-
...(input.publishingCountry
|
|
104
|
+
...(input.publishingCountry && { publishingCountry: input.publishingCountry }),
|
|
103
105
|
...(input.hostingOrg?.trim() && { hostingOrg: input.hostingOrg }),
|
|
104
106
|
limit: input.limit,
|
|
105
107
|
offset: input.offset,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-search-datasets.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-datasets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEpD,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,oGAAoG,CAAC;IAC9G,CAAC;IACD,IAAI,YAAY,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAC7D,OAAO,UAAU,MAAM,wBAAwB,UAAU,2CAA2C,UAAU,2BAA2B,CAAC;IAC5I,CAAC;IACD,OAAO;AACT,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC7D,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"gbif-search-datasets.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-datasets.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEpD,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAClD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,oGAAoG,CAAC;IAC9G,CAAC;IACD,IAAI,YAAY,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAC7D,OAAO,UAAU,MAAM,wBAAwB,UAAU,2CAA2C,UAAU,2BAA2B,CAAC;IAC5I,CAAC;IACD,OAAO;AACT,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,sBAAsB,EAAE;IAC7D,KAAK,EAAE,iBAAiB;IACxB,WAAW,EACT,4FAA4F;QAC5F,2BAA2B;QAC3B,sEAAsE;QACtE,8FAA8F;QAC9F,sDAAsD;IACxD,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAA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,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -85,8 +85,8 @@ export declare const gbifSearchOccurrences: import("@cyanheads/mcp-ts-core").Too
|
|
|
85
85
|
}, {
|
|
86
86
|
readonly reason: "invalid_filter";
|
|
87
87
|
readonly code: JsonRpcErrorCode.InvalidParams;
|
|
88
|
-
readonly when: "A filter value is unusable — a datasetKey that is not a UUID, or a WKT geometry or range GBIF rejects.";
|
|
89
|
-
readonly recovery: "The message names the rejected value. Correct that one filter: geometry is a closed WKT ring in longitude latitude order, ranges are \"min,max\",
|
|
88
|
+
readonly when: "A filter value is unusable — a datasetKey that is not a UUID, a two-letter country or publishingCountry code GBIF does not know, or a WKT geometry or range GBIF rejects.";
|
|
89
|
+
readonly recovery: "The message names the rejected value. Correct that one filter: geometry is a closed WKT ring in longitude latitude order, ranges are \"min,max\", datasetKey is a UUID from gbif_search_datasets, and country and publishingCountry are codes GBIF assigns — take one from a COUNTRY or PUBLISHING_COUNTRY facet on gbif_occurrence_facets.";
|
|
90
90
|
}], {
|
|
91
91
|
readonly totalCount: z.ZodNumber;
|
|
92
92
|
readonly offset: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-search-occurrences.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2BjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"gbif-search-occurrences.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2BjE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAubhC,CAAC"}
|
|
@@ -21,8 +21,8 @@ function buildNotice(args) {
|
|
|
21
21
|
export const gbifSearchOccurrences = tool('gbif_search_occurrences', {
|
|
22
22
|
title: 'Search Occurrences',
|
|
23
23
|
description: 'Search 3.9B+ GBIF occurrence records with Darwin Core filters. Use taxonKey from gbif_match_species ' +
|
|
24
|
-
'for reliable results — it resolves synonyms automatically. Accepts country (ISO 3166-1
|
|
25
|
-
"the record was observed), publishingCountry (the publishing organization's country — a different " +
|
|
24
|
+
'for reliable results — it resolves synonyms automatically. Accepts country (uppercase ISO 3166-1 ' +
|
|
25
|
+
"alpha-2, where the record was observed), publishingCountry (the publishing organization's country — a different " +
|
|
26
26
|
'question), stateProvince, bounding box (decimalLatitude/decimalLongitude ranges), WKT polygon ' +
|
|
27
27
|
'geometry, year range, month, ' +
|
|
28
28
|
'basis of record, coordinate filter, and dataset key. Returns sightings only by default — GBIF also ' +
|
|
@@ -44,11 +44,12 @@ export const gbifSearchOccurrences = tool('gbif_search_occurrences', {
|
|
|
44
44
|
.describe('Scientific name filter. Less precise than taxonKey — does not match synonyms. Use taxonKey from gbif_match_species for reliable results. Supplying both does not narrow the search: GBIF combines the two taxon filters with OR, so the result is the union of the two, not their intersection.'),
|
|
45
45
|
country: z
|
|
46
46
|
.string()
|
|
47
|
+
.regex(/^[A-Z]{2}$/, 'country must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("gb"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
47
48
|
.optional()
|
|
48
|
-
.describe('ISO 3166-1 alpha-2 code of where the occurrence was recorded (e.g., "GB", "US", "DE", "SE"). Not the publisher\'s country — that is publishingCountry, and the two disagree on most records.'),
|
|
49
|
+
.describe('ISO 3166-1 alpha-2 code, uppercase, of where the occurrence was recorded (e.g., "GB", "US", "DE", "SE"). Not the publisher\'s country — that is publishingCountry, and the two disagree on most records. Lowercase and alpha-3 forms ("gb", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here. Take a value from a COUNTRY facet on gbif_occurrence_facets; an uppercase pair GBIF does not know ("XX") is rejected upstream by name.'),
|
|
49
50
|
publishingCountry: z
|
|
50
51
|
.string()
|
|
51
|
-
.regex(/^[A-Z]{2}
|
|
52
|
+
.regex(/^[A-Z]{2}$/, 'publishingCountry must be an uppercase ISO 3166-1 alpha-2 code such as GB, US, or SE. Lowercase ("us"), alpha-3 ("USA"), and country names ("Britain") match no records upstream.')
|
|
52
53
|
.optional()
|
|
53
54
|
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the record — not where the occurrence was observed, which is country. The two differ constantly: of 60,290,950 records observed in GB, 1,548,928 were published by US organizations. Take a value from a PUBLISHING_COUNTRY facet on gbif_occurrence_facets. Lowercase and alpha-3 forms ("us", "USA") match nothing upstream, which is why only the uppercase two-letter form is accepted here.'),
|
|
54
55
|
stateProvince: z
|
|
@@ -232,8 +233,8 @@ export const gbifSearchOccurrences = tool('gbif_search_occurrences', {
|
|
|
232
233
|
{
|
|
233
234
|
reason: 'invalid_filter',
|
|
234
235
|
code: JsonRpcErrorCode.InvalidParams,
|
|
235
|
-
when: 'A filter value is unusable — a datasetKey that is not a UUID, or a WKT geometry or range GBIF rejects.',
|
|
236
|
-
recovery: 'The message names the rejected value. Correct that one filter: geometry is a closed WKT ring in longitude latitude order, ranges are "min,max",
|
|
236
|
+
when: 'A filter value is unusable — a datasetKey that is not a UUID, a two-letter country or publishingCountry code GBIF does not know, or a WKT geometry or range GBIF rejects.',
|
|
237
|
+
recovery: 'The message names the rejected value. Correct that one filter: geometry is a closed WKT ring in longitude latitude order, ranges are "min,max", datasetKey is a UUID from gbif_search_datasets, and country and publishingCountry are codes GBIF assigns — take one from a COUNTRY or PUBLISHING_COUNTRY facet on gbif_occurrence_facets.',
|
|
237
238
|
},
|
|
238
239
|
],
|
|
239
240
|
async handler(input, ctx) {
|
|
@@ -252,7 +253,7 @@ export const gbifSearchOccurrences = tool('gbif_search_occurrences', {
|
|
|
252
253
|
const raw = await getGbifService().searchOccurrences({
|
|
253
254
|
...(input.taxonKey !== undefined && { taxonKey: input.taxonKey }),
|
|
254
255
|
...(input.scientificName?.trim() && { scientificName: input.scientificName }),
|
|
255
|
-
...(input.country
|
|
256
|
+
...(input.country && { country: input.country }),
|
|
256
257
|
...(input.publishingCountry && { publishingCountry: input.publishingCountry }),
|
|
257
258
|
...(input.stateProvince?.trim() && { stateProvince: input.stateProvince }),
|
|
258
259
|
...(input.decimalLatitude?.trim() && { decimalLatitude: input.decimalLatitude }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-search-occurrences.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAErB,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,GAA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,GAAG,CAAC,MAAM,EAAE,MAAM;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC7E,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"gbif-search-occurrences.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-occurrences.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACnG,OAAO,EACL,UAAU,EACV,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,0BAA0B,GAC3B,MAAM,aAAa,CAAC;AAErB,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACrD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,kMAAkM,CAAC;IAC5M,CAAC;IACD,IAAI,eAAe,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAChE,OAAO,UAAU,MAAM,wBAAwB,UAAU,2CAA2C,UAAU,2BAA2B,CAAC;IAC5I,CAAC;IACD,OAAO;AACT,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IACnE,KAAK,EAAE,oB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"file":"gbif-search-publishers.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-publishers.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmBjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"gbif-search-publishers.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-publishers.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAmBjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;EAuH/B,CAAC"}
|
|
@@ -24,10 +24,21 @@ export const gbifSearchPublishers = tool('gbif_search_publishers', {
|
|
|
24
24
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
25
25
|
input: z.object({
|
|
26
26
|
q: z.string().optional().describe('Name fragment to search for. Matches organization names.'),
|
|
27
|
+
/**
|
|
28
|
+
* Deliberately unpatterned, unlike the country codes on the occurrence tools
|
|
29
|
+
* and `publishingCountry` on `gbif_search_datasets`. Those hit
|
|
30
|
+
* `/occurrence/search` and `/dataset/search`, which parse a code and then
|
|
31
|
+
* match the verbatim stored string, so `gb` and `GBR` answer 200 with zero
|
|
32
|
+
* rows — a silent wrong answer a `^[A-Z]{2}$` pattern removes.
|
|
33
|
+
* `/organization` resolves the parsed country instead of the string: `gb`
|
|
34
|
+
* returns the same 223 organizations as `GB`, and `USA` the same 499 as
|
|
35
|
+
* `US`. There is no silent case here to close, so the same pattern would
|
|
36
|
+
* only reject values that currently answer correctly.
|
|
37
|
+
*/
|
|
27
38
|
country: z
|
|
28
39
|
.string()
|
|
29
40
|
.optional()
|
|
30
|
-
.describe('ISO 3166-1
|
|
41
|
+
.describe('ISO 3166-1 country code to filter organizations by country. The alpha-2 form ("GB") is canonical; unlike the country codes on the occurrence tools and gbif_search_datasets, this one also resolves the alpha-3 form ("GBR") and is case-insensitive, because the registry endpoint matches the parsed country rather than the string. A value GBIF cannot parse as a country errors rather than returning an empty list.'),
|
|
31
42
|
limit: z
|
|
32
43
|
.number()
|
|
33
44
|
.min(1)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-search-publishers.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-publishers.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,kFAAkF,CAAC;IAC5F,CAAC;IACD,IAAI,cAAc,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAC/D,OAAO,UAAU,MAAM,wBAAwB,UAAU,2CAA2C,UAAU,2BAA2B,CAAC;IAC5I,CAAC;IACD,OAAO;AACT,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,yEAAyE;QACzE,+FAA+F;QAC/F,oEAAoE;IACtE,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0DAA0D,CAAC;QAC7F,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,
|
|
1
|
+
{"version":3,"file":"gbif-search-publishers.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-search-publishers.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEjE,sDAAsD;AACtD,SAAS,WAAW,CAAC,IAIpB;IACC,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACpD,IAAI,UAAU,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,kFAAkF,CAAC;IAC5F,CAAC;IACD,IAAI,cAAc,KAAK,CAAC,IAAI,MAAM,GAAG,CAAC,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAC/D,OAAO,UAAU,MAAM,wBAAwB,UAAU,2CAA2C,UAAU,2BAA2B,CAAC;IAC5I,CAAC;IACD,OAAO;AACT,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,wBAAwB,EAAE;IACjE,KAAK,EAAE,mBAAmB;IAC1B,WAAW,EACT,yEAAyE;QACzE,+FAA+F;QAC/F,oEAAoE;IACtE,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CA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,CAAC,CAAC;YAC5C,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC;gBAAE,KAAK,CAAC,IAAI,CAAC,eAAe,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/gbif-biodiversity-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"mcpName": "io.github.cyanheads/gbif-biodiversity-mcp-server",
|
|
5
5
|
"description": "Search GBIF species taxonomy, occurrence records, datasets, and publishers via MCP. STDIO or Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -12,14 +12,14 @@
|
|
|
12
12
|
"url": "https://gbif-biodiversity.caseyjhand.com/mcp"
|
|
13
13
|
}
|
|
14
14
|
],
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.7.0",
|
|
16
16
|
"packages": [
|
|
17
17
|
{
|
|
18
18
|
"registryType": "npm",
|
|
19
19
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
20
20
|
"identifier": "@cyanheads/gbif-biodiversity-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.
|
|
22
|
+
"version": "0.7.0",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
69
69
|
"identifier": "@cyanheads/gbif-biodiversity-mcp-server",
|
|
70
70
|
"runtimeHint": "bun",
|
|
71
|
-
"version": "0.
|
|
71
|
+
"version": "0.7.0",
|
|
72
72
|
"packageArguments": [
|
|
73
73
|
{
|
|
74
74
|
"type": "positional",
|