@cyanheads/gbif-biodiversity-mcp-server 0.7.6 → 0.7.7
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/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +5 -2
- package/changelog/0.7.x/0.7.7.md +22 -0
- package/dist/config/server-config.d.ts +1 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +8 -1
- package/dist/config/server-config.js.map +1 -1
- package/dist/mcp-server/resources/definitions/gbif-dataset.resource.d.ts +6 -0
- package/dist/mcp-server/resources/definitions/gbif-dataset.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/gbif-dataset.resource.js +23 -5
- package/dist/mcp-server/resources/definitions/gbif-dataset.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-bulk-match-species.tool.d.ts +4 -1
- package/dist/mcp-server/tools/definitions/gbif-bulk-match-species.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-bulk-match-species.tool.js +31 -9
- package/dist/mcp-server/tools/definitions/gbif-bulk-match-species.tool.js.map +1 -1
- 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 +3 -6
- package/dist/mcp-server/tools/definitions/gbif-count-occurrences.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-dataset.tool.d.ts +6 -0
- package/dist/mcp-server/tools/definitions/gbif-get-dataset.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-dataset.tool.js +66 -14
- package/dist/mcp-server/tools/definitions/gbif-get-dataset.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-species-children.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-species-children.tool.js +14 -8
- package/dist/mcp-server/tools/definitions/gbif-get-species-children.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-species.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-get-species.tool.js +21 -2
- package/dist/mcp-server/tools/definitions/gbif-get-species.tool.js.map +1 -1
- 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 -10
- 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.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-datasets.tool.js +22 -11
- 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.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-occurrences.tool.js +9 -13
- 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 +8 -7
- package/dist/mcp-server/tools/definitions/gbif-search-publishers.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-species.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/gbif-search-species.tool.js +8 -7
- package/dist/mcp-server/tools/definitions/gbif-search-species.tool.js.map +1 -1
- package/dist/mcp-server/tools/read-limits.d.ts +16 -0
- package/dist/mcp-server/tools/read-limits.d.ts.map +1 -0
- package/dist/mcp-server/tools/read-limits.js +19 -0
- package/dist/mcp-server/tools/read-limits.js.map +1 -0
- package/dist/mcp-server/tools/utils.d.ts +18 -18
- package/dist/mcp-server/tools/utils.d.ts.map +1 -1
- package/dist/mcp-server/tools/utils.js +100 -34
- package/dist/mcp-server/tools/utils.js.map +1 -1
- package/dist/services/gbif/gbif-service.d.ts +3 -3
- package/dist/services/gbif/gbif-service.d.ts.map +1 -1
- package/dist/services/gbif/gbif-service.js +29 -9
- package/dist/services/gbif/gbif-service.js.map +1 -1
- package/dist/services/gbif/types.d.ts +5 -1
- package/dist/services/gbif/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/server.json +17 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** @cyanheads/gbif-biodiversity-mcp-server
|
|
4
|
-
**Version:** 0.7.
|
|
4
|
+
**Version:** 0.7.7
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
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.7.
|
|
4
|
+
**Version:** 0.7.7
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.13.15`
|
|
6
6
|
**Engines:** Bun ≥1.4.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/server` ^2.3.1
|
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
|
|
|
@@ -70,7 +70,7 @@ Both resources are also reachable via `gbif_get_species` and `gbif_get_dataset`;
|
|
|
70
70
|
|
|
71
71
|
### `gbif_bulk_match_species` <sub>tool</sub>
|
|
72
72
|
|
|
73
|
-
-
|
|
73
|
+
- Scientific `names` with `strict`; the first 50 are processed in input order. With read-limit clamping enabled (default), extra names are returned in `unprocessedNames`, preserving order and duplicates for the next call
|
|
74
74
|
- Each result carries `name` and `matchType`, and on a match `taxonKey`, `matchedTaxonKey` (synonyms), and `confidence`; an unmatched name is `NONE`, a failed lookup is `ERROR` with `error` and, when classified, `reason`, and neither fails the batch
|
|
75
75
|
|
|
76
76
|
---
|
|
@@ -192,6 +192,8 @@ Agent-friendly output:
|
|
|
192
192
|
- Graceful partial failure: `gbif_bulk_match_species` returns a `NONE` or `ERROR` row per name instead of failing the batch
|
|
193
193
|
- Typed errors: `invalid_filter`, `not_found`, `no_match`, `unresolved_taxon_scope`, `conflicting_taxon_scope`, and `pagination_cap_exceeded`, each with a recovery hint
|
|
194
194
|
- Sparse fields omitted rather than null-filled: `extinct` appears only on taxa GBIF explicitly flags
|
|
195
|
+
- Dataset metadata preserves temporal ranges, single dates, and verbatim periods such as `1975-current`; unsupported coverage entries are disclosed. An unavailable supplementary record count carries `recordCountNotice` while retaining metadata
|
|
196
|
+
- Publisher descriptions retain paragraph breaks and decode numeric character references once; Markdown output renders publisher text literally
|
|
195
197
|
|
|
196
198
|
## Getting started
|
|
197
199
|
|
|
@@ -306,6 +308,7 @@ cp .env.example .env
|
|
|
306
308
|
| Variable | Description | Default |
|
|
307
309
|
|:---|:---|:---|
|
|
308
310
|
| `GBIF_BASE_URL` | GBIF API base URL. | `https://api.gbif.org/v1` |
|
|
311
|
+
| `GBIF_CLAMP_READ_LIMITS` | Clamp oversized read limits to the documented caps and disclose requested/applied values. Bulk matching processes the first 50 names and returns the remainder in `unprocessedNames`. Set `false` to advertise and enforce rejecting maxima instead. Strict boolean parsing rejects malformed values. | `true` |
|
|
309
312
|
| `GBIF_REQUEST_TIMEOUT_MS` | Per-request HTTP timeout, in ms. | `10000` |
|
|
310
313
|
| `GBIF_USER_AGENT` | `User-Agent` sent on every GBIF request. GBIF asks integrators to identify themselves with a contact URL or email. | server name, version, and repository URL |
|
|
311
314
|
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Preserve dataset metadata and publisher text, with bounded processing for oversized read requests."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.7.7 — 2026-10-24
|
|
8
|
+
|
|
9
|
+
## Changed
|
|
10
|
+
|
|
11
|
+
- **Read limits** clamp oversized page, facet, and contact requests with requested/applied notices; bulk matching processes 50 names and returns ordered `unprocessedNames`. Set `GBIF_CLAMP_READ_LIMITS=false` to restore rejecting maxima. ([#68](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/68))
|
|
12
|
+
- **Tool guidance** removes repeated measured examples while preserving filter rules and the occurrence partitioning recipe. ([#69](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/69))
|
|
13
|
+
|
|
14
|
+
## Fixed
|
|
15
|
+
|
|
16
|
+
- **Dataset record counts** disclose unavailable supplementary lookups through `recordCountNotice` while retaining metadata; cancellation, invalid responses, and caller-input errors propagate. ([#65](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/65))
|
|
17
|
+
- **Publisher text** decodes numeric references once and preserves paragraph breaks; dataset and species Markdown renders literal text consistently with structured output. ([#66](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/66))
|
|
18
|
+
- **Temporal coverage** preserves ranges, single dates, and verbatim periods on dataset tools and resources, with a notice for omitted unsupported entries. ([#67](https://github.com/cyanheads/gbif-biodiversity-mcp-server/issues/67))
|
|
19
|
+
|
|
20
|
+
## Dependencies
|
|
21
|
+
|
|
22
|
+
- `@biomejs/biome` ^2.5.15 → ^2.6.2.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
declare const ServerConfigSchema: z.ZodObject<{
|
|
7
|
+
clampReadLimits: z.ZodDefault<z.ZodCodec<z.ZodString, z.ZodBoolean>>;
|
|
7
8
|
baseUrl: z.ZodDefault<z.ZodString>;
|
|
8
9
|
requestTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
9
10
|
userAgent: z.ZodOptional<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C,QAAA,MAAM,kBAAkB;;;;;iBAqBtB,CAAC;AAEH,KAAK,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAIvD,wBAAgB,eAAe,IAAI,YAAY,CAU9C"}
|
|
@@ -3,8 +3,12 @@
|
|
|
3
3
|
* @module config/server-config
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
6
|
-
import { parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
|
|
6
|
+
import { config, parseEnvConfig } from '@cyanheads/mcp-ts-core/config';
|
|
7
7
|
const ServerConfigSchema = z.object({
|
|
8
|
+
clampReadLimits: z
|
|
9
|
+
.stringbool()
|
|
10
|
+
.default(true)
|
|
11
|
+
.describe('Clamp oversized read requests to their workload caps.'),
|
|
8
12
|
baseUrl: z.string().default('https://api.gbif.org/v1').describe('GBIF API base URL.'),
|
|
9
13
|
requestTimeoutMs: z.coerce
|
|
10
14
|
.number()
|
|
@@ -24,7 +28,10 @@ const ServerConfigSchema = z.object({
|
|
|
24
28
|
});
|
|
25
29
|
let _config;
|
|
26
30
|
export function getServerConfig() {
|
|
31
|
+
// Core config loads .env lazily. Read it before constructing env-dependent tool schemas.
|
|
32
|
+
void config.mcpServerName;
|
|
27
33
|
_config ??= parseEnvConfig(ServerConfigSchema, {
|
|
34
|
+
clampReadLimits: 'GBIF_CLAMP_READ_LIMITS',
|
|
28
35
|
baseUrl: 'GBIF_BASE_URL',
|
|
29
36
|
requestTimeoutMs: 'GBIF_REQUEST_TIMEOUT_MS',
|
|
30
37
|
userAgent: 'GBIF_USER_AGENT',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"server-config.js","sourceRoot":"","sources":["../../src/config/server-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEvE,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC,eAAe,EAAE,CAAC;SACf,UAAU,EAAE;SACZ,OAAO,CAAC,IAAI,CAAC;SACb,QAAQ,CAAC,uDAAuD,CAAC;IACpE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC,QAAQ,CAAC,oBAAoB,CAAC;IACrF,gBAAgB,EAAE,CAAC,CAAC,MAAM;SACvB,MAAM,EAAE;SACR,OAAO,CAAC,MAAM,CAAC;SACf,QAAQ,CAAC,uCAAuC,CAAC;IACpD;;;;;OAKG;IACH,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,IAAI,EAAE;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,mDAAmD,CAAC;CACjE,CAAC,CAAC;AAIH,IAAI,OAAiC,CAAC;AAEtC,MAAM,UAAU,eAAe;IAC7B,yFAAyF;IACzF,KAAK,MAAM,CAAC,aAAa,CAAC;IAC1B,OAAO,KAAK,cAAc,CAAC,kBAAkB,EAAE;QAC7C,eAAe,EAAE,wBAAwB;QACzC,OAAO,EAAE,eAAe;QACxB,gBAAgB,EAAE,yBAAyB;QAC3C,SAAS,EAAE,iBAAiB;KAC7B,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC"}
|
|
@@ -16,6 +16,7 @@ export declare const gbifDatasetResource: import("@cyanheads/mcp-ts-core").Resou
|
|
|
16
16
|
citationText: z.ZodOptional<z.ZodString>;
|
|
17
17
|
publishingCountry: z.ZodOptional<z.ZodString>;
|
|
18
18
|
recordCount: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
recordCountNotice: z.ZodOptional<z.ZodString>;
|
|
19
20
|
numConstituents: z.ZodOptional<z.ZodNumber>;
|
|
20
21
|
contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
21
22
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -27,9 +28,14 @@ export declare const gbifDatasetResource: import("@cyanheads/mcp-ts-core").Resou
|
|
|
27
28
|
contactsTotal: z.ZodOptional<z.ZodNumber>;
|
|
28
29
|
contactsReturned: z.ZodOptional<z.ZodNumber>;
|
|
29
30
|
temporalCoverages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
31
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
32
|
+
date: z.ZodOptional<z.ZodString>;
|
|
33
|
+
period: z.ZodOptional<z.ZodString>;
|
|
34
|
+
type: z.ZodOptional<z.ZodString>;
|
|
30
35
|
start: z.ZodOptional<z.ZodString>;
|
|
31
36
|
end: z.ZodOptional<z.ZodString>;
|
|
32
37
|
}, z.core.$strip>>>;
|
|
38
|
+
temporalCoverageNotice: z.ZodOptional<z.ZodString>;
|
|
33
39
|
geographicCoverages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
34
40
|
description: z.ZodOptional<z.ZodString>;
|
|
35
41
|
}, z.core.$strip>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-dataset.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/gbif-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAkB3E,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"gbif-dataset.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/gbif-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAkB3E,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2K9B,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { resource, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
-
import { compactGeographicCoverages,
|
|
7
|
+
import { compactGeographicCoverages, isGbifUuid, projectContacts, projectTemporalCoverages, resolveDatasetRecordCount, stripHtml, } from '../../tools/utils.js';
|
|
8
8
|
import { getGbifService } from '../../../services/gbif/gbif-service.js';
|
|
9
9
|
/**
|
|
10
10
|
* Fixed contact cap for the resource. The resource has no contactLimit input (unlike
|
|
@@ -34,6 +34,10 @@ export const gbifDatasetResource = resource('gbif://dataset/{datasetKey}', {
|
|
|
34
34
|
.number()
|
|
35
35
|
.optional()
|
|
36
36
|
.describe('Occurrence records GBIF has indexed for this dataset, matching the figure gbif_search_datasets reports. Spans every occurrenceStatus: absence records — surveys that looked for a taxon and did not find it — are counted alongside sightings, and on some datasets they are the overwhelming majority. gbif_count_occurrences with this datasetKey answers the other question, defaulting to occurrenceStatus PRESENT, so the two figures are expected to differ rather than one being wrong. Fetched separately because the detail endpoint omits it; absent when that lookup does not return in time.'),
|
|
37
|
+
recordCountNotice: z
|
|
38
|
+
.string()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('Explains an unavailable supplementary count and how to retry. Absent after a successful lookup or a declared count.'),
|
|
37
41
|
numConstituents: z.number().optional().describe('Number of sub-datasets. May be absent.'),
|
|
38
42
|
contacts: z
|
|
39
43
|
.array(z
|
|
@@ -64,6 +68,16 @@ export const gbifDatasetResource = resource('gbif://dataset/{datasetKey}', {
|
|
|
64
68
|
temporalCoverages: z
|
|
65
69
|
.array(z
|
|
66
70
|
.object({
|
|
71
|
+
'@type': z
|
|
72
|
+
.string()
|
|
73
|
+
.optional()
|
|
74
|
+
.describe('GBIF coverage representation: range, single, or verbatim. May be absent on legacy ranges.'),
|
|
75
|
+
date: z
|
|
76
|
+
.string()
|
|
77
|
+
.optional()
|
|
78
|
+
.describe('Single coverage date as supplied by GBIF. May be absent.'),
|
|
79
|
+
period: z.string().optional().describe('Verbatim coverage period. May be absent.'),
|
|
80
|
+
type: z.string().optional().describe('Verbatim period type. May be absent.'),
|
|
67
81
|
start: z
|
|
68
82
|
.string()
|
|
69
83
|
.optional()
|
|
@@ -73,9 +87,13 @@ export const gbifDatasetResource = resource('gbif://dataset/{datasetKey}', {
|
|
|
73
87
|
.optional()
|
|
74
88
|
.describe('Coverage end as an ISO 8601 date-time. May be absent.'),
|
|
75
89
|
})
|
|
76
|
-
.describe('A temporal coverage range.'))
|
|
90
|
+
.describe('A temporal coverage range, single date, or verbatim period.'))
|
|
91
|
+
.optional()
|
|
92
|
+
.describe('Temporal coverage declared by the dataset, preserving supplied dates and verbatim periods. May be absent.'),
|
|
93
|
+
temporalCoverageNotice: z
|
|
94
|
+
.string()
|
|
77
95
|
.optional()
|
|
78
|
-
.describe('
|
|
96
|
+
.describe('Discloses unsupported or unusable temporal entries omitted from the response. May be absent.'),
|
|
79
97
|
geographicCoverages: z
|
|
80
98
|
.array(z
|
|
81
99
|
.object({
|
|
@@ -131,10 +149,10 @@ export const gbifDatasetResource = resource('gbif://dataset/{datasetKey}', {
|
|
|
131
149
|
doi: raw.doi,
|
|
132
150
|
citationText: raw.citation?.text,
|
|
133
151
|
publishingCountry: raw.publishingCountry,
|
|
134
|
-
|
|
152
|
+
...(await resolveDatasetRecordCount(raw, ctx)),
|
|
135
153
|
numConstituents: raw.numConstituents,
|
|
136
154
|
...projectContacts(raw.contacts, CONTACT_CAP),
|
|
137
|
-
|
|
155
|
+
...projectTemporalCoverages(raw.temporalCoverages),
|
|
138
156
|
geographicCoverages: compactGeographicCoverages(raw.geographicCoverages),
|
|
139
157
|
};
|
|
140
158
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-dataset.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/gbif-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EACL,0BAA0B,EAC1B,
|
|
1
|
+
{"version":3,"file":"gbif-dataset.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/gbif-dataset.resource.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CA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ACd,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,SAAS;YACrE,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,GAAG,EAAE,GAAG,CAAC,GAAG;YACZ,YAAY,EAAE,GAAG,CAAC,QAAQ,EAAE,IAAI;YAChC,iBAAiB,EAAE,GAAG,CAAC,iBAAiB;YACxC,GAAG,CAAC,MAAM,yBAAyB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;YAC9C,eAAe,EAAE,GAAG,CAAC,eAAe;YACpC,GAAG,eAAe,CAAC,GAAG,CAAC,QAAQ,EAAE,WAAW,CAAC;YAC7C,GAAG,wBAAwB,CAAC,GAAG,CAAC,iBAAiB,CAAC;YAClD,mBAAmB,EAAE,0BAA0B,CAAC,GAAG,CAAC,mBAAmB,CAAC;SACzE,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -7,6 +7,7 @@ export declare const gbifBulkMatchSpecies: import("@cyanheads/mcp-ts-core").Tool
|
|
|
7
7
|
names: z.ZodArray<z.ZodString>;
|
|
8
8
|
strict: z.ZodDefault<z.ZodBoolean>;
|
|
9
9
|
}, z.core.$strip>, z.ZodObject<{
|
|
10
|
+
unprocessedNames: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
10
11
|
results: z.ZodArray<z.ZodObject<{
|
|
11
12
|
name: z.ZodString;
|
|
12
13
|
taxonKey: z.ZodOptional<z.ZodNumber>;
|
|
@@ -20,5 +21,7 @@ export declare const gbifBulkMatchSpecies: import("@cyanheads/mcp-ts-core").Tool
|
|
|
20
21
|
error: z.ZodOptional<z.ZodString>;
|
|
21
22
|
reason: z.ZodOptional<z.ZodString>;
|
|
22
23
|
}, z.core.$strip>>;
|
|
23
|
-
}, z.core.$strip>, undefined,
|
|
24
|
+
}, z.core.$strip>, undefined, {
|
|
25
|
+
readonly notice: z.ZodOptional<z.ZodString>;
|
|
26
|
+
}>;
|
|
24
27
|
//# sourceMappingURL=gbif-bulk-match-species.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-bulk-match-species.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-bulk-match-species.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"gbif-bulk-match-species.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-bulk-match-species.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAWjD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;EAgL/B,CAAC"}
|
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { McpError } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { getServerConfig } from '../../../config/server-config.js';
|
|
7
8
|
import { getGbifService } from '../../../services/gbif/gbif-service.js';
|
|
9
|
+
import { clampReadLimit } from '../read-limits.js';
|
|
10
|
+
import { escapeMarkdownText } from '../utils.js';
|
|
11
|
+
const namesSchema = z
|
|
12
|
+
.array(z.string().min(1).describe('A scientific name to match, e.g. "Panthera leo".'))
|
|
13
|
+
.min(1);
|
|
8
14
|
export const gbifBulkMatchSpecies = tool('gbif_bulk_match_species', {
|
|
9
15
|
title: 'Bulk Match Species Names',
|
|
10
16
|
description: 'Resolve up to 50 scientific names to GBIF backbone taxon keys in one call — the batch ' +
|
|
11
17
|
'counterpart to gbif_match_species for checklist, inventory, and species-list workflows that ' +
|
|
12
18
|
'would otherwise need one round trip per name. Each name is matched independently and results ' +
|
|
13
|
-
'are returned in input order, one entry per name. A name with no backbone match yields ' +
|
|
19
|
+
'are returned in input order, one entry per processed name. By default, an oversized batch processes the first 50 and returns the remainder in unprocessedNames. A name with no backbone match yields ' +
|
|
14
20
|
'matchType NONE (no taxonKey) instead of failing the batch; a per-name lookup failure yields ' +
|
|
15
21
|
"matchType ERROR carrying that name's error message and, when the failure was classified, " +
|
|
16
22
|
'a machine-readable reason — the rest of the batch is unaffected, and the call as a whole ' +
|
|
@@ -19,17 +25,17 @@ export const gbifBulkMatchSpecies = tool('gbif_bulk_match_species', {
|
|
|
19
25
|
'gbif_search_species for vernacular searches. Below confidence 80, review the match.',
|
|
20
26
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
21
27
|
input: z.object({
|
|
22
|
-
names:
|
|
23
|
-
.array(z.string().min(1).describe('A scientific name to match, e.g. "Panthera leo".'))
|
|
24
|
-
.min(1)
|
|
25
|
-
.max(50)
|
|
26
|
-
.describe('Scientific names to match against the GBIF backbone. 1–50 per call, matched in parallel.'),
|
|
28
|
+
names: (getServerConfig().clampReadLimits ? namesSchema : namesSchema.max(50)).describe('Scientific names to match against the GBIF backbone. Up to 50 are matched in parallel; additional names are returned in unprocessedNames when read-limit clamping is enabled (default). Every submitted name must be valid.'),
|
|
27
29
|
strict: z
|
|
28
30
|
.boolean()
|
|
29
31
|
.default(false)
|
|
30
32
|
.describe('When true, require an exact match for every name (no fuzzy matching). When false (default), GBIF applies fuzzy matching to tolerate minor misspellings.'),
|
|
31
33
|
}),
|
|
32
34
|
output: z.object({
|
|
35
|
+
unprocessedNames: z
|
|
36
|
+
.array(z.string())
|
|
37
|
+
.optional()
|
|
38
|
+
.describe('Names beyond the first 50, in original order including duplicates. Submit these names in another call. Absent when every name was processed.'),
|
|
33
39
|
results: z
|
|
34
40
|
.array(z
|
|
35
41
|
.object({
|
|
@@ -72,9 +78,20 @@ export const gbifBulkMatchSpecies = tool('gbif_bulk_match_species', {
|
|
|
72
78
|
.describe('Machine-readable failure identifier when matchType is ERROR — e.g. invalid_filter when GBIF rejected a supplied value. Absent when the failure carried no classification, and absent on every non-ERROR entry.'),
|
|
73
79
|
})
|
|
74
80
|
.describe('Match outcome for one input name.'))
|
|
75
|
-
.describe('One result per input name, in input order.'),
|
|
81
|
+
.describe('One result per processed input name, in input order (at most 50).'),
|
|
76
82
|
}),
|
|
83
|
+
enrichment: {
|
|
84
|
+
notice: z
|
|
85
|
+
.string()
|
|
86
|
+
.optional()
|
|
87
|
+
.describe('Requested and applied batch size when names exceed the 50-name workload cap.'),
|
|
88
|
+
},
|
|
77
89
|
async handler(input, ctx) {
|
|
90
|
+
const clamp = clampReadLimit(input.names.length, 50, 'gbif_bulk_match_species', 'names', ctx);
|
|
91
|
+
const unprocessedNames = input.names.slice(clamp.applied);
|
|
92
|
+
const names = input.names.slice(0, clamp.applied);
|
|
93
|
+
if (clamp.notice)
|
|
94
|
+
ctx.enrich.notice(`${clamp.notice} Submit unprocessedNames in another call.`);
|
|
78
95
|
ctx.log.info('Bulk matching species names', {
|
|
79
96
|
count: input.names.length,
|
|
80
97
|
strict: input.strict,
|
|
@@ -84,7 +101,7 @@ export const gbifBulkMatchSpecies = tool('gbif_bulk_match_species', {
|
|
|
84
101
|
// single unmatched name (NONE) or transient failure (ERROR) cannot sink the batch.
|
|
85
102
|
// Promise.all preserves input order. The in-loop try/catch is the deliberate batch-tool
|
|
86
103
|
// exception to "handlers throw" — per-item isolation is the point.
|
|
87
|
-
const results = await Promise.all(
|
|
104
|
+
const results = await Promise.all(names.map(async (name) => {
|
|
88
105
|
try {
|
|
89
106
|
const raw = await gbif.matchSpecies({ name, strict: input.strict }, ctx);
|
|
90
107
|
if (raw.usageKey == null || raw.matchType == null || raw.matchType === 'NONE') {
|
|
@@ -120,10 +137,15 @@ export const gbifBulkMatchSpecies = tool('gbif_bulk_match_species', {
|
|
|
120
137
|
};
|
|
121
138
|
}
|
|
122
139
|
}));
|
|
123
|
-
return { results };
|
|
140
|
+
return { results, ...(unprocessedNames.length > 0 && { unprocessedNames }) };
|
|
124
141
|
},
|
|
125
142
|
format: (result) => {
|
|
126
143
|
const lines = [];
|
|
144
|
+
if (result.unprocessedNames) {
|
|
145
|
+
lines.push('## Unprocessed names');
|
|
146
|
+
for (const name of result.unprocessedNames)
|
|
147
|
+
lines.push(`- ${escapeMarkdownText(name)}`);
|
|
148
|
+
}
|
|
127
149
|
for (const r of result.results) {
|
|
128
150
|
lines.push(`## ${r.name}`);
|
|
129
151
|
if (r.canonicalName)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-bulk-match-species.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-bulk-match-species.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"gbif-bulk-match-species.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-bulk-match-species.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,GAAG,CAAC;KAClB,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,kDAAkD,CAAC,CAAC;KACrF,GAAG,CAAC,CAAC,CAAC,CAAC;AAEV,MAAM,CAAC,MAAM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IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -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;AAiBjE,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;AAiBjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwQ/B,CAAC"}
|
|
@@ -71,7 +71,7 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
71
71
|
.string()
|
|
72
72
|
.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.')
|
|
73
73
|
.optional()
|
|
74
|
-
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the record —
|
|
74
|
+
.describe('ISO 3166-1 alpha-2 code, uppercase, of the organization that published the record — distinct from where the occurrence was observed, which is country. 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.'),
|
|
75
75
|
stateProvince: z
|
|
76
76
|
.string()
|
|
77
77
|
.optional()
|
|
@@ -129,11 +129,8 @@ export const gbifCountOccurrences = tool('gbif_count_occurrences', {
|
|
|
129
129
|
* String filters are checked on presence rather than on a
|
|
130
130
|
* non-blank value. `/occurrence/search` ignores a parameter it is given with no
|
|
131
131
|
* value and answers the unfiltered total, so the `?.trim()` spread these fields
|
|
132
|
-
* used to sit behind widened the count and reported it as the caller's own
|
|
133
|
-
*
|
|
134
|
-
* `country=GB` scope where `England` counts 47,672,439, and a whitespace-only
|
|
135
|
-
* value does the same. A count is the whole output here, so nothing else in the
|
|
136
|
-
* response contradicts the wrong figure.
|
|
132
|
+
* used to sit behind widened the count and reported it as the caller's own.
|
|
133
|
+
* Reject a blank value rather than silently dropping its constraint.
|
|
137
134
|
*/
|
|
138
135
|
const blankFilter = firstBlankFilter({
|
|
139
136
|
scientificName: input.scientificName,
|
|
@@ -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,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,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,uFAAu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;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,EACZ,mLAAmL,CACpL;aACA,QAAQ,EAAE;aACV,QAAQ,CACP,
|
|
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,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,wBAAwB,GACzB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,qBAAqB,EACrB,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,0NAA0N;QAC1N,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,cAAc,EAAE,CAAC;aACd,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,oLAAoL,CACr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import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
17
17
|
citationText: z.ZodOptional<z.ZodString>;
|
|
18
18
|
publishingCountry: z.ZodOptional<z.ZodString>;
|
|
19
19
|
recordCount: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
recordCountNotice: z.ZodOptional<z.ZodString>;
|
|
20
21
|
numConstituents: z.ZodOptional<z.ZodNumber>;
|
|
21
22
|
contacts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
22
23
|
type: z.ZodOptional<z.ZodString>;
|
|
@@ -28,9 +29,14 @@ export declare const gbifGetDataset: import("@cyanheads/mcp-ts-core").ToolDefini
|
|
|
28
29
|
contactsTotal: z.ZodOptional<z.ZodNumber>;
|
|
29
30
|
contactsReturned: z.ZodOptional<z.ZodNumber>;
|
|
30
31
|
temporalCoverages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
+
'@type': z.ZodOptional<z.ZodString>;
|
|
33
|
+
date: z.ZodOptional<z.ZodString>;
|
|
34
|
+
period: z.ZodOptional<z.ZodString>;
|
|
35
|
+
type: z.ZodOptional<z.ZodString>;
|
|
31
36
|
start: z.ZodOptional<z.ZodString>;
|
|
32
37
|
end: z.ZodOptional<z.ZodString>;
|
|
33
38
|
}, z.core.$strip>>>;
|
|
39
|
+
temporalCoverageNotice: z.ZodOptional<z.ZodString>;
|
|
34
40
|
geographicCoverages: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
35
41
|
description: z.ZodOptional<z.ZodString>;
|
|
36
42
|
}, z.core.$strip>>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gbif-get-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-get-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"gbif-get-dataset.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/gbif-get-dataset.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AAc3E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkUzB,CAAC"}
|