@cyanheads/brapi-mcp-server 0.5.4 → 0.6.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 +10 -3
- package/README.md +2 -1
- package/changelog/0.5.x/0.5.5.md +25 -0
- package/changelog/0.6.x/0.6.0.md +34 -0
- package/changelog/template.md +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-calls.resource.d.ts +7 -1
- package/dist/mcp-server/resources/definitions/brapi-calls.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-calls.resource.js +11 -3
- package/dist/mcp-server/resources/definitions/brapi-calls.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-germplasm.resource.d.ts +5 -0
- package/dist/mcp-server/resources/definitions/brapi-germplasm.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-germplasm.resource.js +6 -0
- package/dist/mcp-server/resources/definitions/brapi-germplasm.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-server-info.resource.d.ts +7 -1
- package/dist/mcp-server/resources/definitions/brapi-server-info.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-server-info.resource.js +9 -0
- package/dist/mcp-server/resources/definitions/brapi-server-info.resource.js.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-study.resource.d.ts +5 -0
- package/dist/mcp-server/resources/definitions/brapi-study.resource.d.ts.map +1 -1
- package/dist/mcp-server/resources/definitions/brapi-study.resource.js +6 -0
- package/dist/mcp-server/resources/definitions/brapi-study.resource.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-connect.tool.d.ts +2 -0
- package/dist/mcp-server/tools/definitions/brapi-connect.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-connect.tool.js +1 -2
- package/dist/mcp-server/tools/definitions/brapi-connect.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-dataframe-describe.tool.d.ts +2 -2
- package/dist/mcp-server/tools/definitions/brapi-dataframe-describe.tool.js +3 -3
- package/dist/mcp-server/tools/definitions/brapi-dataframe-describe.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.js +8 -4
- package/dist/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-germplasm.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-germplasm.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-germplasm.tool.js +15 -6
- package/dist/mcp-server/tools/definitions/brapi-find-germplasm.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-images.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-images.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-images.tool.js +14 -6
- package/dist/mcp-server/tools/definitions/brapi-find-images.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-locations.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-locations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-locations.tool.js +62 -37
- package/dist/mcp-server/tools/definitions/brapi-find-locations.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-observations.tool.d.ts +8 -3
- package/dist/mcp-server/tools/definitions/brapi-find-observations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-observations.tool.js +18 -8
- package/dist/mcp-server/tools/definitions/brapi-find-observations.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-studies.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-studies.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-studies.tool.js +14 -6
- package/dist/mcp-server/tools/definitions/brapi-find-studies.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-variables.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-find-variables.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-variables.tool.js +14 -6
- package/dist/mcp-server/tools/definitions/brapi-find-variables.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-variants.tool.d.ts +6 -1
- package/dist/mcp-server/tools/definitions/brapi-find-variants.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-find-variants.tool.js +16 -7
- package/dist/mcp-server/tools/definitions/brapi-find-variants.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-germplasm.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-get-germplasm.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-germplasm.tool.js +9 -5
- package/dist/mcp-server/tools/definitions/brapi-get-germplasm.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-image.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-get-image.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-image.tool.js +31 -4
- package/dist/mcp-server/tools/definitions/brapi-get-image.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-study.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-get-study.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-get-study.tool.js +9 -5
- package/dist/mcp-server/tools/definitions/brapi-get-study.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-raw-get.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-raw-get.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-raw-get.tool.js +8 -4
- package/dist/mcp-server/tools/definitions/brapi-raw-get.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-raw-search.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-raw-search.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-raw-search.tool.js +8 -4
- package/dist/mcp-server/tools/definitions/brapi-raw-search.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-server-info.tool.d.ts +9 -1
- package/dist/mcp-server/tools/definitions/brapi-server-info.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-server-info.tool.js +12 -4
- package/dist/mcp-server/tools/definitions/brapi-server-info.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-submit-observations.tool.d.ts +5 -0
- package/dist/mcp-server/tools/definitions/brapi-submit-observations.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-submit-observations.tool.js +8 -4
- package/dist/mcp-server/tools/definitions/brapi-submit-observations.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-walk-pedigree.tool.d.ts +15 -3
- package/dist/mcp-server/tools/definitions/brapi-walk-pedigree.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/brapi-walk-pedigree.tool.js +37 -14
- package/dist/mcp-server/tools/definitions/brapi-walk-pedigree.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +100 -10
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/dist/mcp-server/tools/shared/connect-auth-schema.d.ts.map +1 -1
- package/dist/mcp-server/tools/shared/connect-auth-schema.js +1 -2
- package/dist/mcp-server/tools/shared/connect-auth-schema.js.map +1 -1
- package/dist/mcp-server/tools/shared/find-helpers.d.ts +69 -5
- package/dist/mcp-server/tools/shared/find-helpers.d.ts.map +1 -1
- package/dist/mcp-server/tools/shared/find-helpers.js +104 -13
- package/dist/mcp-server/tools/shared/find-helpers.js.map +1 -1
- package/dist/mcp-server/tools/shared/orientation-envelope.d.ts +4 -0
- package/dist/mcp-server/tools/shared/orientation-envelope.d.ts.map +1 -1
- package/dist/mcp-server/tools/shared/orientation-envelope.js +31 -2
- package/dist/mcp-server/tools/shared/orientation-envelope.js.map +1 -1
- package/dist/services/brapi-client/brapi-client.d.ts.map +1 -1
- package/dist/services/brapi-client/brapi-client.js +20 -8
- package/dist/services/brapi-client/brapi-client.js.map +1 -1
- package/dist/services/brapi-client/types.d.ts +14 -0
- package/dist/services/brapi-client/types.d.ts.map +1 -1
- package/dist/services/brapi-client/types.js.map +1 -1
- package/dist/services/brapi-dialect/bms-dialect.d.ts +28 -0
- package/dist/services/brapi-dialect/bms-dialect.d.ts.map +1 -0
- package/dist/services/brapi-dialect/bms-dialect.js +137 -0
- package/dist/services/brapi-dialect/bms-dialect.js.map +1 -0
- package/dist/services/brapi-dialect/brapi-test-dialect.d.ts.map +1 -1
- package/dist/services/brapi-dialect/brapi-test-dialect.js +16 -14
- package/dist/services/brapi-dialect/brapi-test-dialect.js.map +1 -1
- package/dist/services/brapi-dialect/cassavabase-dialect.d.ts.map +1 -1
- package/dist/services/brapi-dialect/cassavabase-dialect.js +40 -6
- package/dist/services/brapi-dialect/cassavabase-dialect.js.map +1 -1
- package/dist/services/brapi-dialect/detect.d.ts.map +1 -1
- package/dist/services/brapi-dialect/detect.js +21 -0
- package/dist/services/brapi-dialect/detect.js.map +1 -1
- package/dist/services/brapi-dialect/index.d.ts +1 -0
- package/dist/services/brapi-dialect/index.d.ts.map +1 -1
- package/dist/services/brapi-dialect/index.js +1 -0
- package/dist/services/brapi-dialect/index.js.map +1 -1
- package/dist/services/brapi-dialect/registry.d.ts.map +1 -1
- package/dist/services/brapi-dialect/registry.js +2 -0
- package/dist/services/brapi-dialect/registry.js.map +1 -1
- package/dist/services/brapi-dialect/singularizing-dialect.d.ts +30 -4
- package/dist/services/brapi-dialect/singularizing-dialect.d.ts.map +1 -1
- package/dist/services/brapi-dialect/singularizing-dialect.js +57 -5
- package/dist/services/brapi-dialect/singularizing-dialect.js.map +1 -1
- package/dist/services/brapi-dialect/types.d.ts +37 -0
- package/dist/services/brapi-dialect/types.d.ts.map +1 -1
- package/dist/services/canvas-bridge/canvas-bridge.d.ts.map +1 -1
- package/dist/services/canvas-bridge/canvas-bridge.js +9 -4
- package/dist/services/canvas-bridge/canvas-bridge.js.map +1 -1
- package/package.json +6 -6
- package/server.json +3 -3
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Agent Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** brapi-mcp-server
|
|
4
|
-
**Version:** 0.5.
|
|
4
|
+
**Version:** 0.5.5
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
6
6
|
|
|
7
7
|
> **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
|
|
@@ -306,13 +306,17 @@ Available skills:
|
|
|
306
306
|
| `add-service` | Scaffold a new service integration |
|
|
307
307
|
| `add-test` | Scaffold test file for a tool, resource, or service |
|
|
308
308
|
| `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
|
|
309
|
+
| `tool-defs-analysis` | Read-only audit of MCP definition language across the surface (12 categories) |
|
|
309
310
|
| `security-pass` | Audit server for MCP-flavored security gaps: output injection, scope blast radius, input sinks, tenant isolation |
|
|
310
311
|
| `devcheck` | Lint, format, typecheck, audit |
|
|
311
312
|
| `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
|
|
312
313
|
| `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
|
|
314
|
+
| `release-and-publish` | Post-wrapup ship workflow: verification gate, push, publish to npm / MCP Registry / GHCR |
|
|
315
|
+
| `migrate-mcp-ts-template` | Migrate legacy `mcp-ts-template` fork to package dependency |
|
|
313
316
|
| `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
|
|
314
317
|
| `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
|
|
315
318
|
| `api-auth` | Auth modes, scopes, JWT/OAuth |
|
|
319
|
+
| `api-linter` | Definition lint rule reference (`format-parity`, `schema-*`, `name-*`, `server-json-*`, …) |
|
|
316
320
|
| `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper for big result sets — Tier 3 opt-in |
|
|
317
321
|
| `api-config` | AppConfig, parseConfig, env vars |
|
|
318
322
|
| `api-context` | Context interface, logger, state, progress |
|
|
@@ -357,15 +361,18 @@ Each per-version file opens with YAML frontmatter:
|
|
|
357
361
|
|
|
358
362
|
```markdown
|
|
359
363
|
---
|
|
360
|
-
summary: One-line headline, ≤
|
|
364
|
+
summary: One-line headline, ≤350 chars # required — powers the rollup index
|
|
361
365
|
breaking: false # optional — true flags breaking changes
|
|
366
|
+
security: false # optional — true flags security fixes
|
|
362
367
|
---
|
|
363
368
|
|
|
364
369
|
# 0.1.0 — YYYY-MM-DD
|
|
365
370
|
...
|
|
366
371
|
```
|
|
367
372
|
|
|
368
|
-
`breaking: true` renders a `· ⚠️ Breaking` badge
|
|
373
|
+
`breaking: true` renders a `· ⚠️ Breaking` badge — use it when consumers must update code on upgrade (signature changes, removed APIs, config renames). `security: true` renders a `· 🛡️ Security` badge and pairs with a `## Security` body section. When both are set, badges render `· ⚠️ Breaking · 🛡️ Security`.
|
|
374
|
+
|
|
375
|
+
**Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
|
|
369
376
|
|
|
370
377
|
---
|
|
371
378
|
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](https://www.npmjs.com/package/@cyanheads/brapi-mcp-server) [](https://www.npmjs.com/package/@cyanheads/brapi-mcp-server) [](./CHANGELOG.md) [](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) [](https://modelcontextprotocol.io/)
|
|
11
11
|
|
|
12
12
|
[](./LICENSE) [](https://www.typescriptlang.org/) [](https://bun.sh/) [](./CHANGELOG.md)
|
|
13
13
|
|
|
@@ -120,6 +120,7 @@ Within one (tenant, session), dataframes act as a self-cleaning shared notebook:
|
|
|
120
120
|
- **Multi-server session** — `ServerRegistry` maps aliases to live BrAPI connections; one session can span Breedbase, T3, and Sweetpotatobase in parallel.
|
|
121
121
|
- **Built-in known-server registry** — `bti-cassava`, `bti-sweetpotato`, `bti-breedbase-demo`, `t3-wheat`, `t3-oat`, `t3-barley` resolve out-of-the-box without env vars; orientation envelope carries CC-BY attribution.
|
|
122
122
|
- **Capability-aware calls** — `CapabilityRegistry` caches `/serverinfo` per connection and guards every tool call against unsupported endpoints. Falls back to `/calls` when `/serverinfo` is sparse.
|
|
123
|
+
- **Dialect adaptation** — `spec` / `brapi-test` / `breedbase` / `cassavabase` / `bms` dialects translate v2.1 plural filter keys to the singular form each server family honors, drop filters known to be broken, normalize sparse-shape encodings, and escalate to POST `/search/{noun}` when GET would silently downcast multi-value filters. Detected from `/serverinfo` (server-name / organization-name); pin per-alias via `BRAPI_<ALIAS>_DIALECT`. Verified-vs-inferred mapping counts surface on the orientation envelope so agents see the confidence floor at a glance.
|
|
123
124
|
- **DuckDB required** — `@duckdb/node-api` is a regular dependency; startup fails closed when the framework canvas is unavailable. Not supported on Cloudflare Workers (no native binary in that runtime).
|
|
124
125
|
- **Async-search transparency** — `brapi_find_genotype_calls` and `brapi_raw_search` handle the `POST /search/{noun}` → `GET /search/{noun}/{id}` 202-retry pattern automatically.
|
|
125
126
|
- **Pedigree DAG walks** — `brapi_walk_pedigree` BFS-traverses ancestry / descendancy with cycle detection (BrAPI only exposes one generation per call).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Adopt framework 0.9.1 — wire `instructions` field for server-level orientation, port two raw schemas off `z.url()` and three off `.nullish()` unions to clear the new cross-vendor portability lint family (`schema-format-portability`, `schema-anyof-needs-type`)."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.5.5 — 2026-05-16
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **Server-level `instructions` on `createApp()`** — agents now receive a one-paragraph orientation on `initialize` describing the connect-first handshake, the `find_*` / `get_*` / `raw_*` tool families, the spillover-to-canvas flow, and which tools to prefer. Spec-compliant clients forward it as session-level system context, so the same guidance reaches the model without bloating individual tool descriptions. ([@cyanheads/mcp-ts-core#91](https://github.com/cyanheads/mcp-ts-core/issues/91))
|
|
12
|
+
|
|
13
|
+
## Changed
|
|
14
|
+
|
|
15
|
+
- **`brapi_connect` and OAuth2 auth schemas dropped `z.url()`** ([`src/mcp-server/tools/definitions/brapi-connect.tool.ts`](./src/mcp-server/tools/definitions/brapi-connect.tool.ts), [`src/mcp-server/tools/shared/connect-auth-schema.ts`](./src/mcp-server/tools/shared/connect-auth-schema.ts)) — `z.url()` emits `format: "uri"` which OpenAI's tool validator hard-rejects, so `gpt-5-codex` was silently dropping the tools. Replaced with `z.string()` and moved the "absolute URL" constraint into `.describe()` text where the model actually reads it; clears the new default-on `schema-format-portability` lint rule. ([@cyanheads/mcp-ts-core#132](https://github.com/cyanheads/mcp-ts-core/issues/132), field report: [cyanheads/git-mcp-server#47](https://github.com/cyanheads/git-mcp-server/issues/47))
|
|
16
|
+
- **`find_observations` season + season.year and `find_variants` variantSetDbId unions ported off `.nullish()`** ([`src/mcp-server/tools/definitions/brapi-find-observations.tool.ts`](./src/mcp-server/tools/definitions/brapi-find-observations.tool.ts), [`src/mcp-server/tools/definitions/brapi-find-variants.tool.ts`](./src/mcp-server/tools/definitions/brapi-find-variants.tool.ts)) — `.nullish()` on a `z.union([...])` emits a typeless `anyOf` branch that Gemini rejects with `400: reference to undefined schema`. Switched to `.optional()` + explicit `z.null()` in the union so every branch carries a top-level `type`; clears the new default-on `schema-anyof-needs-type` lint rule.
|
|
17
|
+
- **`scripts/devcheck.ts` `bun outdated` parser fixed** — `bun outdated` emits markdown-style rows (`| pkg | … |`) with an empty leading cell, so `split('|')[0]` was always empty and the allowlist never matched. Now reads index `[1]` and strips the trailing `(dev|peer|prod|optional)` workspace marker so bare package names match. Synced from framework 0.9.1.
|
|
18
|
+
- **Changelog summary cap raised 250 → 350 chars** — `SUMMARY_MAX_LENGTH` in `scripts/build-changelog.ts`, `changelog/template.md`, and the AGENTS.md / CLAUDE.md changelog section. Synced from framework 0.9.0 — 250 was forcing operator-relevant context out of recent summaries. ([@cyanheads/mcp-ts-core#129](https://github.com/cyanheads/mcp-ts-core/issues/129))
|
|
19
|
+
- **AGENTS.md / CLAUDE.md skill table** — added rows for `tool-defs-analysis`, `release-and-publish`, `migrate-mcp-ts-template`, and `api-linter`; refreshed the changelog frontmatter section with the `security: boolean` flag and Keep-a-Changelog section-order guidance.
|
|
20
|
+
- **Skills resynced from `@cyanheads/mcp-ts-core@0.9.1`** — `api-auth` 1.0 → 1.1 (`mcp_tool_scopes` union claim, Authentik/Keycloak/Zitadel operator setup, `MCP_AUTH_DISABLE_SCOPE_CHECKS` bypass), `api-linter` 1.2 → 1.3 (new portability rule family), `api-workers` 1.3 → 1.4 (`instructions` resolver form documented), `polish-docs-meta` 1.7 → 1.8 (350-char summary cap), `add-tool`, `api-config`, `api-errors`, `design-mcp-server`, `field-test`, `security-pass`, `tool-defs-analysis`. Phase B mirrored into `.claude/skills/` and `.agents/skills/`.
|
|
21
|
+
|
|
22
|
+
## Dependencies
|
|
23
|
+
|
|
24
|
+
- **`@cyanheads/mcp-ts-core` `^0.8.19 → ^0.9.1`** — Workers boot under `nodejs_compat` ([#124](https://github.com/cyanheads/mcp-ts-core/issues/124); not used by this server but unblocks anyone bridging to Workers), `instructions` field on `createApp` ([#91](https://github.com/cyanheads/mcp-ts-core/issues/91)), cross-vendor JSON Schema portability lint family ([#132](https://github.com/cyanheads/mcp-ts-core/issues/132)), build-time-only definition linting (no longer gates `createApp()` startup), RFC 8414 §3 path-suffixed well-known mount, SSRF DNS validation now enforced in Workers, IPv6-mapped/unique-local/link-local SSRF blocklist, FileSystemProvider tenant-id boundary check, rate-limit metric cardinality bound. ⚠️ Breaking: `schema-format-portability` is default-on `error` — the two `z.url()` migrations above are this server's response. ([changelog](https://github.com/cyanheads/mcp-ts-core/blob/main/changelog/0.9.x/0.9.0.md))
|
|
25
|
+
- **`@biomejs/biome` `^2.4.14 → ^2.4.15`**, **`@types/node` `^25.6.2 → ^25.8.0`**, **`vitest` `^4.1.5 → ^4.1.6`** — patch refreshes.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "BMS dialect for the CGIAR crop community, route escalation to POST /search when GET would downcast multi-value filters, walk_pedigree `direction` field, plus fixes for bbox spillover ordering, schemeless `imageURL` resolution, singleton-fetch 5xx retry storms, and large inline JSON in `find_*` text rows."
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.6.0 — 2026-05-22
|
|
8
|
+
|
|
9
|
+
## Added
|
|
10
|
+
|
|
11
|
+
- **`bms` dialect** ([`src/services/brapi-dialect/bms-dialect.ts`](./src/services/brapi-dialect/bms-dialect.ts)) — covers Breeding Management System servers (CIMMYT, IRRI, ICRISAT, IITA, CIP). v2.1 plural → v2.0 singular translation table per endpoint plus auto-detection from server-name (`BMS`, `BMSAPI`, `Breeding Management System`) and organization-name (CGIAR centers). Mappings ship marked `verified: false` pending live narrowing against pinned test endpoints — agents see an inferred-mapping warning on downcast so they validate result counts via distributions before trusting them. ([#7](https://github.com/cyanheads/brapi-mcp-server/issues/7))
|
|
12
|
+
- **`direction` field on `brapi_walk_pedigree` nodes** — every node now carries `direction: 'root' | 'ancestor' | 'descendant' | 'both'`, so bidirectional walks can distinguish the side of the root each germplasm was reached from. Convergence rule: ancestor + descendant in the same traversal upgrades to `'both'` (backcross / selfing chain). ([#16](https://github.com/cyanheads/brapi-mcp-server/issues/16))
|
|
13
|
+
- **Dialect filter-mapping confidence on the orientation envelope** — `verifiedMappingCount` / `inferredMappingCount` surface on `dialect` in `brapi_connect` and `brapi_server_info` so agents see the dialect's confidence floor at a glance. Drives a softer warning on downcast for inferred mappings. New `DialectFilterMapping` shape (`{ target, verified }`) on the dialect interface; mixed-shape input (string shorthand or explicit object) keeps authoring ergonomic.
|
|
14
|
+
- **SGN-family row normalizer** — `cassavabase` and `breedbase` dialects now strip `null` from upstream rows pre-schema (recursively, one level into nested objects + arrays of objects). Lets row schemas express the natural "field is absent" via `optional()` without every schema absorbing a `.nullish()` per field. New optional `normalizeRow(endpoint, row)` method on `BrapiDialect`; default `spec` dialect omits it (passthrough).
|
|
15
|
+
- **`requireRegisteredConnection` helper** ([`src/mcp-server/tools/shared/find-helpers.ts`](./src/mcp-server/tools/shared/find-helpers.ts)) — replaces inline `registry.get(ctx, alias ?? DEFAULT_ALIAS)` across tools and resources. Throws via `ctx.fail('unknown_alias', …)` so the wire-level error carries `data.recovery.hint` from the calling definition's `errors[]` contract. Adopted by every tool/resource that resolves a connection. ([#29](https://github.com/cyanheads/brapi-mcp-server/issues/29))
|
|
16
|
+
- **`singleton: true` on `BrapiRequestOptions`** ([`src/services/brapi-client/types.ts`](./src/services/brapi-client/types.ts)) — marks a request as a `/{noun}/{id}` fetch. The client reclassifies 5xx responses on these calls as `NotFound`, so `brapi_get_study`, `brapi_get_germplasm`, and `brapi_walk_pedigree`'s per-root probes fast-fail on missing DbIds without burning the retry budget. ([#30](https://github.com/cyanheads/brapi-mcp-server/issues/30))
|
|
17
|
+
|
|
18
|
+
## Changed
|
|
19
|
+
|
|
20
|
+
- **Route escalation to POST `/search/{noun}`** ([`src/mcp-server/tools/shared/find-helpers.ts`](./src/mcp-server/tools/shared/find-helpers.ts), [`src/services/brapi-dialect/singularizing-dialect.ts`](./src/services/brapi-dialect/singularizing-dialect.ts)) — when the active dialect would have downcast a multi-value array filter to its first scalar on the GET wire (SGN-family + BMS only honor singular filter keys) and POST `/search/{noun}` is advertised and not disabled, `resolveFindRoute` now picks search. The search body preserves the original multi-value semantics that the GET wire shape would have silently lost. New `requiresEscalation` field on `DialectAdaptation`. ([#15](https://github.com/cyanheads/brapi-mcp-server/issues/15))
|
|
21
|
+
- **`brapi_find_locations` bbox filter runs before spillover** ([`src/mcp-server/tools/definitions/brapi-find-locations.tool.ts`](./src/mcp-server/tools/definitions/brapi-find-locations.tool.ts)) — axis-order pick (`spec` vs `swapped` for non-conformant servers) is now made over the first-page rows, then handed to `maybeSpill` as a `rowFilter`. The dataframe materialized on spillover holds post-bbox rows, so SQL on the `df_*` handle sees the same set the inline result preview did. ([#28](https://github.com/cyanheads/brapi-mcp-server/issues/28))
|
|
22
|
+
- **Orientation envelope headline `Connected` → `Registered` when no services advertised** ([`src/mcp-server/tools/shared/orientation-envelope.ts`](./src/mcp-server/tools/shared/orientation-envelope.ts)) — registering a connection against an unreachable server (or one returning a zero-capability `/serverinfo`) shouldn't read as "Connected" to a skimming agent. The `Registered` headline signals "alias is bound, server is not responding usefully." ([#32](https://github.com/cyanheads/brapi-mcp-server/issues/32))
|
|
23
|
+
- **Canvas dataframe naming `df_<uuid>` → `df_XXXXX_XXXXX`** ([`src/services/canvas-bridge/canvas-bridge.ts`](./src/services/canvas-bridge/canvas-bridge.ts)) — 10 random chars from `A–Z 0–9` split into two 5-char groups by `_`, generated via the framework's `idGenerator`. Keyspace ~3.7×10^15 (36^10), unguessable for the (tenant, session)-bucketed capability-token model and short enough to render cleanly in inline tool output. ([#34](https://github.com/cyanheads/brapi-mcp-server/issues/34))
|
|
24
|
+
- **`AliasInput` description clarified** — omitting `alias` reads the connection registered under alias `default` (i.e. a prior `brapi_connect` call that did not specify an alias). Calls that used a non-default alias must pass that same alias back; previous wording suggested an implicit "most recent connect" which never existed. ([#32](https://github.com/cyanheads/brapi-mcp-server/issues/32))
|
|
25
|
+
- **`brapi_dataframe_describe` shared-HTTP error language** — `list_all_disabled_on_shared_http` no longer mentions `MCP_AUTH_MODE=none` by name (operators may configure shared-trust HTTP differently). Headline and recovery now describe the deployment shape rather than its env-var implementation. ([#32](https://github.com/cyanheads/brapi-mcp-server/issues/32))
|
|
26
|
+
|
|
27
|
+
## Fixed
|
|
28
|
+
|
|
29
|
+
- **`brapi_get_image` resolves schemeless `imageURL` values correctly** ([`src/mcp-server/tools/definitions/brapi-get-image.tool.ts`](./src/mcp-server/tools/definitions/brapi-get-image.tool.ts)) — protocol-relative (`//host/path`) gets an `https:` prefix; domain-shaped values (`breedbase.org/data/images/.../medium.jpg`) get an `https://` prefix; root-relative and bare paths still concatenate with the BrAPI `baseUrl` (the legitimate "image lives on the same BrAPI host" case). Previously, the domain-shaped form was silently treated as a relative path and produced an unresolvable URL. ([#31](https://github.com/cyanheads/brapi-mcp-server/issues/31))
|
|
30
|
+
- **Large nested objects no longer dump multi-KB inline in `find_*` text rows** ([`src/mcp-server/tools/shared/find-helpers.ts`](./src/mcp-server/tools/shared/find-helpers.ts)) — passthrough rendering for both `collectPassthroughParts` (bullet rows) and `appendPassthroughLines` (detail-view lines) applies a 240-char inline cap; values over the cap collapse to `<N keys, Xkb — see structuredContent>` (or `<N entries, …>` for arrays). The full payload remains in `structuredContent` so structured clients (Codex Desktop) see the same data. Affects `find_studies` (`additionalInfo`), `find_variables` (`trait`, `scale`), and any other surface that carries large nested objects through the passthrough path. ([#33](https://github.com/cyanheads/brapi-mcp-server/issues/33))
|
|
31
|
+
|
|
32
|
+
## Dependencies
|
|
33
|
+
|
|
34
|
+
- **`@duckdb/node-api` `^1.5.2-r.1 → ^1.5.3-r.1`**, **`@types/node` `^25.8.0 → ^25.9.1`**, **`vitest` `^4.1.6 → ^4.1.7`** — patch refreshes.
|
package/changelog/template.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
5
|
# with a concrete date.
|
|
6
6
|
|
|
7
|
-
# Required. One-line GitHub Release-style headline.
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap.
|
|
8
8
|
# Default short and scannable. Don't pad, don't stitch unrelated changes with
|
|
9
9
|
# semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
|
|
10
10
|
# inside the value as a key separator and fails GitHub's strict parser.
|
package/dist/index.js
CHANGED
|
@@ -103,6 +103,7 @@ await createApp({
|
|
|
103
103
|
brapiFiltersResource,
|
|
104
104
|
],
|
|
105
105
|
prompts: [brapiEdaStudy, brapiMetaAnalysis],
|
|
106
|
+
instructions: 'Bridges BrAPI v2 servers (Breeding API for plant/crop research). Call `brapi_connect` first to register a server under an alias and return the orientation envelope (capabilities, dialect, sample IDs). `brapi_find_*` tools page filtered lookups across studies, germplasm, observations, variables, locations, images, variants, and genotype calls; rows beyond the per-call cap spill to a canvas dataframe — query with `brapi_dataframe_query` (SELECT-only SQL). `brapi_get_*` fetch single records by `*DbId`. Use `brapi_raw_get` / `brapi_raw_search` only when no curated tool fits — responses route back to the right curated tool.',
|
|
106
107
|
setup(core) {
|
|
107
108
|
if (!core.canvas) {
|
|
108
109
|
throw configurationError('brapi-mcp-server requires the framework canvas service (DuckDB) for dataframe spillover. Set CANVAS_PROVIDER_TYPE=duckdb (the default) and ensure @duckdb/node-api is installed.', { canvasProviderType: process.env.CANVAS_PROVIDER_TYPE ?? 'duckdb' });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AAEH,0EAA0E;AAC1E,yEAAyE;AACzE,qEAAqE;AACrE,uEAAuE;AACvE,0BAA0B;AAC1B,EAAE;AACF,2EAA2E;AAC3E,uEAAuE;AACvE,0EAA0E;AAC1E,gEAAgE;AAChE,wDAAwD;AACxD,OAAO,CAAC,GAAG,CAAC,oBAAoB,KAAK,QAAQ,CAAC;AAE9C,6EAA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,SAAS,EAAE;QACT,uBAAuB;QACvB,kBAAkB;QAClB,kBAAkB;QAClB,sBAAsB;QACtB,oBAAoB;KACrB;IACD,OAAO,EAAE,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC3C,YAAY,EACV,onBAAonB;IACtnB,KAAK,CAAC,IAAI;QACR,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,MAAM,kBAAkB,CACtB,kLAAkL,EAClL,EAAE,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,QAAQ,EAAE,CACrE,CAAC;QACJ,CAAC;QACD,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;QAC5C,eAAe,CAAC,YAAY,CAAC,CAAC;QAC9B,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACrC,wBAAwB,EAAE,CAAC;QAC3B,sBAAsB,CAAC,YAAY,CAAC,CAAC;QACrC,kBAAkB,CAAC,YAAY,CAAC,CAAC;QACjC,oBAAoB,EAAE,CAAC;IACzB,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module mcp-server/resources/definitions/brapi-calls.resource
|
|
7
7
|
*/
|
|
8
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
9
|
export declare const brapiCallsResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<Readonly<{
|
|
9
10
|
[k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
10
|
-
}>, import("zod/v4/core").$strip>, undefined,
|
|
11
|
+
}>, import("zod/v4/core").$strip>, undefined, readonly [{
|
|
12
|
+
readonly reason: "unknown_alias";
|
|
13
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
14
|
+
readonly when: "No default BrAPI connection has been registered";
|
|
15
|
+
readonly recovery: "Call brapi_connect (without an alias, or with alias `default`) before reading this resource.";
|
|
16
|
+
}]>;
|
|
11
17
|
//# sourceMappingURL=brapi-calls.resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-calls.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-calls.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"brapi-calls.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-calls.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAoBjE,eAAO,MAAM,kBAAkB;;;;;;;GA2B7B,CAAC"}
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* @module mcp-server/resources/definitions/brapi-calls.resource
|
|
7
7
|
*/
|
|
8
8
|
import { resource } from '@cyanheads/mcp-ts-core';
|
|
9
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
|
+
import { requireRegisteredConnection } from '../../../mcp-server/tools/shared/find-helpers.js';
|
|
9
11
|
import { getCapabilityRegistry } from '../../../services/capability-registry/index.js';
|
|
10
|
-
import { DEFAULT_ALIAS, getServerRegistry } from '../../../services/server-registry/index.js';
|
|
11
12
|
async function loadCallsProfile(ctx) {
|
|
12
|
-
const registry = getServerRegistry();
|
|
13
13
|
const capabilities = getCapabilityRegistry();
|
|
14
|
-
const connection = await
|
|
14
|
+
const connection = await requireRegisteredConnection(ctx, undefined);
|
|
15
15
|
const lookup = {};
|
|
16
16
|
if (connection.resolvedAuth)
|
|
17
17
|
lookup.auth = connection.resolvedAuth;
|
|
@@ -30,6 +30,14 @@ export const brapiCallsResource = resource('brapi://calls', {
|
|
|
30
30
|
title: 'BrAPI capability profile',
|
|
31
31
|
description: 'Capability profile for the default BrAPI connection — supported services, their HTTP methods, declared versions, and crops list. Mirrors what /serverinfo + /calls returned at the last load.',
|
|
32
32
|
mimeType: 'application/json',
|
|
33
|
+
errors: [
|
|
34
|
+
{
|
|
35
|
+
reason: 'unknown_alias',
|
|
36
|
+
code: JsonRpcErrorCode.NotFound,
|
|
37
|
+
when: 'No default BrAPI connection has been registered',
|
|
38
|
+
recovery: 'Call brapi_connect (without an alias, or with alias `default`) before reading this resource.',
|
|
39
|
+
},
|
|
40
|
+
],
|
|
33
41
|
handler(_params, ctx) {
|
|
34
42
|
return loadCallsProfile(ctx);
|
|
35
43
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-calls.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-calls.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"brapi-calls.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-calls.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAuB,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAEhF,KAAK,UAAU,gBAAgB,CAAC,GAAoC;IAClE,MAAM,YAAY,GAAG,qBAAqB,EAAE,CAAC;IAC7C,MAAM,UAAU,GAAG,MAAM,2BAA2B,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IACrE,MAAM,MAAM,GAA8C,EAAE,CAAC;IAC7D,IAAI,UAAU,CAAC,YAAY;QAAE,MAAM,CAAC,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC;IACnE,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5E,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,OAAO,EAAE,UAAU,CAAC,OAAO;QAC3B,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,SAAS,EAAE,OAAO,CAAC,SAAS;KAC7B,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,eAAe,EAAE;IAC1D,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,+LAA+L;IACjM,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,iDAAiD;YACvD,QAAQ,EACN,8FAA8F;SACjG;KACO;IACV,OAAO,CAAC,OAAO,EAAE,GAAG;QAClB,OAAO,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;IACD,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC;QACX,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,eAAe;gBACpB,IAAI,EAAE,0BAA0B;gBAChC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -10,6 +10,11 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
10
10
|
export declare const brapiGermplasmResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
|
|
11
11
|
germplasmDbId: z.ZodString;
|
|
12
12
|
}, z.core.$strip>, undefined, readonly [{
|
|
13
|
+
readonly reason: "unknown_alias";
|
|
14
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
15
|
+
readonly when: "No default BrAPI connection has been registered";
|
|
16
|
+
readonly recovery: "Call brapi_connect (without an alias, or with alias `default`) before reading this resource.";
|
|
17
|
+
}, {
|
|
13
18
|
readonly reason: "germplasm_not_found";
|
|
14
19
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
15
20
|
readonly when: "Upstream returned no germplasm record for the requested DbId";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-germplasm.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-germplasm.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"brapi-germplasm.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-germplasm.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;GAkCjC,CAAC"}
|
|
@@ -14,6 +14,12 @@ export const brapiGermplasmResource = resource('brapi://germplasm/{germplasmDbId
|
|
|
14
14
|
description: 'Single-germplasm resource on the default BrAPI connection — same payload as the brapi_get_germplasm tool, addressable by URI.',
|
|
15
15
|
mimeType: 'application/json',
|
|
16
16
|
errors: [
|
|
17
|
+
{
|
|
18
|
+
reason: 'unknown_alias',
|
|
19
|
+
code: JsonRpcErrorCode.NotFound,
|
|
20
|
+
when: 'No default BrAPI connection has been registered',
|
|
21
|
+
recovery: 'Call brapi_connect (without an alias, or with alias `default`) before reading this resource.',
|
|
22
|
+
},
|
|
17
23
|
{
|
|
18
24
|
reason: 'germplasm_not_found',
|
|
19
25
|
code: JsonRpcErrorCode.NotFound,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-germplasm.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-germplasm.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,mCAAmC,EAAE;IAClF,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,+HAA+H;IACjI,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,8DAA8D;YACpE,QAAQ,EACN,mGAAmG;SACtG;KACO;IACV,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;KAC7F,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,OAAO,MAAM,iBAAiB,CAAC,OAAO,CACpC,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,EACtE,GAAG,CACJ,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE,EAAE;KACd,CAAC;CACH,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"brapi-germplasm.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-germplasm.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,4DAA4D,CAAC;AAE/F,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC,mCAAmC,EAAE;IAClF,IAAI,EAAE,iBAAiB;IACvB,KAAK,EAAE,wBAAwB;IAC/B,WAAW,EACT,+HAA+H;IACjI,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,iDAAiD;YACvD,QAAQ,EACN,8FAA8F;SACjG;QACD;YACE,MAAM,EAAE,qBAAqB;YAC7B,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,8DAA8D;YACpE,QAAQ,EACN,mGAAmG;SACtG;KACO;IACV,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iDAAiD,CAAC;KAC7F,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,OAAO,MAAM,iBAAiB,CAAC,OAAO,CACpC,iBAAiB,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,aAAa,EAAE,MAAM,CAAC,aAAa,EAAE,CAAC,EACtE,GAAG,CACJ,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE,EAAE;KACd,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -5,7 +5,13 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module mcp-server/resources/definitions/brapi-server-info.resource
|
|
7
7
|
*/
|
|
8
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
9
|
export declare const brapiServerInfoResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<import("zod").ZodObject<Readonly<{
|
|
9
10
|
[k: string]: import("zod/v4/core").$ZodType<unknown, unknown, import("zod/v4/core").$ZodTypeInternals<unknown, unknown>>;
|
|
10
|
-
}>, import("zod/v4/core").$strip>, undefined,
|
|
11
|
+
}>, import("zod/v4/core").$strip>, undefined, readonly [{
|
|
12
|
+
readonly reason: "unknown_alias";
|
|
13
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
14
|
+
readonly when: "No default BrAPI connection has been registered";
|
|
15
|
+
readonly recovery: "Call brapi_connect (without an alias, or with alias `default`) before reading this resource.";
|
|
16
|
+
}]>;
|
|
11
17
|
//# sourceMappingURL=brapi-server-info.resource.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-server-info.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-server-info.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"brapi-server-info.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-server-info.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,uBAAuB;;;;;;;GA2BlC,CAAC"}
|
|
@@ -6,12 +6,21 @@
|
|
|
6
6
|
* @module mcp-server/resources/definitions/brapi-server-info.resource
|
|
7
7
|
*/
|
|
8
8
|
import { resource } from '@cyanheads/mcp-ts-core';
|
|
9
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
9
10
|
import { brapiServerInfo } from '../../../mcp-server/tools/definitions/brapi-server-info.tool.js';
|
|
10
11
|
export const brapiServerInfoResource = resource('brapi://server/info', {
|
|
11
12
|
name: 'brapi-server-info',
|
|
12
13
|
title: 'BrAPI server orientation envelope',
|
|
13
14
|
description: 'Orientation envelope for the default BrAPI connection — identity, capabilities, content counts, notes. Same payload as the brapi_server_info tool.',
|
|
14
15
|
mimeType: 'application/json',
|
|
16
|
+
errors: [
|
|
17
|
+
{
|
|
18
|
+
reason: 'unknown_alias',
|
|
19
|
+
code: JsonRpcErrorCode.NotFound,
|
|
20
|
+
when: 'No default BrAPI connection has been registered',
|
|
21
|
+
recovery: 'Call brapi_connect (without an alias, or with alias `default`) before reading this resource.',
|
|
22
|
+
},
|
|
23
|
+
],
|
|
15
24
|
async handler(_params, ctx) {
|
|
16
25
|
return await brapiServerInfo.handler(brapiServerInfo.input.parse({}), ctx);
|
|
17
26
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-server-info.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-server-info.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAE3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,qBAAqB,EAAE;IACrE,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EACT,oJAAoJ;IACtJ,QAAQ,EAAE,kBAAkB;IAC5B,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG;QACxB,OAAO,MAAM,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7E,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"brapi-server-info.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-server-info.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0DAA0D,CAAC;AAE3F,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,qBAAqB,EAAE;IACrE,IAAI,EAAE,mBAAmB;IACzB,KAAK,EAAE,mCAAmC;IAC1C,WAAW,EACT,oJAAoJ;IACtJ,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,iDAAiD;YACvD,QAAQ,EACN,8FAA8F;SACjG;KACO;IACV,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,GAAG;QACxB,OAAO,MAAM,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;IAC7E,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE;YACT;gBACE,GAAG,EAAE,qBAAqB;gBAC1B,IAAI,EAAE,mCAAmC;gBACzC,QAAQ,EAAE,kBAAkB;aAC7B;SACF;KACF,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -10,6 +10,11 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
10
10
|
export declare const brapiStudyResource: import("@cyanheads/mcp-ts-core").ResourceDefinition<z.ZodObject<{
|
|
11
11
|
studyDbId: z.ZodString;
|
|
12
12
|
}, z.core.$strip>, undefined, readonly [{
|
|
13
|
+
readonly reason: "unknown_alias";
|
|
14
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
15
|
+
readonly when: "No default BrAPI connection has been registered";
|
|
16
|
+
readonly recovery: "Call brapi_connect (without an alias, or with alias `default`) before reading this resource.";
|
|
17
|
+
}, {
|
|
13
18
|
readonly reason: "study_not_found";
|
|
14
19
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
15
20
|
readonly when: "Upstream returned no study record for the requested DbId";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-study.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-study.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"brapi-study.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-study.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAGjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;GAkC7B,CAAC"}
|
|
@@ -14,6 +14,12 @@ export const brapiStudyResource = resource('brapi://study/{studyDbId}', {
|
|
|
14
14
|
description: 'Single-study resource on the default BrAPI connection — same payload as the brapi_get_study tool, addressable by URI.',
|
|
15
15
|
mimeType: 'application/json',
|
|
16
16
|
errors: [
|
|
17
|
+
{
|
|
18
|
+
reason: 'unknown_alias',
|
|
19
|
+
code: JsonRpcErrorCode.NotFound,
|
|
20
|
+
when: 'No default BrAPI connection has been registered',
|
|
21
|
+
recovery: 'Call brapi_connect (without an alias, or with alias `default`) before reading this resource.',
|
|
22
|
+
},
|
|
17
23
|
{
|
|
18
24
|
reason: 'study_not_found',
|
|
19
25
|
code: JsonRpcErrorCode.NotFound,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-study.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-study.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wDAAwD,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,2BAA2B,EAAE;IACtE,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,uHAAuH;IACzH,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,0DAA0D;YAChE,QAAQ,EACN,6FAA6F;SAChG;KACO;IACV,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KACrF,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,OAAO,MAAM,aAAa,CAAC,OAAO,CAChC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,EAC1D,GAAG,CACJ,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE,EAAE;KACd,CAAC;CACH,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"brapi-study.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/brapi-study.resource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,wDAAwD,CAAC;AAEvF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,2BAA2B,EAAE;IACtE,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,uHAAuH;IACzH,QAAQ,EAAE,kBAAkB;IAC5B,MAAM,EAAE;QACN;YACE,MAAM,EAAE,eAAe;YACvB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,iDAAiD;YACvD,QAAQ,EACN,8FAA8F;SACjG;QACD;YACE,MAAM,EAAE,iBAAiB;YACzB,IAAI,EAAE,gBAAgB,CAAC,QAAQ;YAC/B,IAAI,EAAE,0DAA0D;YAChE,QAAQ,EACN,6FAA6F;SAChG;KACO;IACV,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KACrF,CAAC;IACF,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG;QACvB,OAAO,MAAM,aAAa,CAAC,OAAO,CAChC,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC,EAC1D,GAAG,CACJ,CAAC;IACJ,CAAC;IACD,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;QACjB,SAAS,EAAE,EAAE;KACd,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -71,6 +71,8 @@ export declare const brapiConnect: import("@cyanheads/mcp-ts-core").ToolDefiniti
|
|
|
71
71
|
envVar: z.ZodString;
|
|
72
72
|
disabledSearchEndpoints: z.ZodArray<z.ZodString>;
|
|
73
73
|
notes: z.ZodArray<z.ZodString>;
|
|
74
|
+
verifiedMappingCount: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
inferredMappingCount: z.ZodOptional<z.ZodNumber>;
|
|
74
76
|
}, z.core.$strip>;
|
|
75
77
|
content: z.ZodObject<{
|
|
76
78
|
crops: z.ZodArray<z.ZodString>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-connect.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-connect.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqBjE,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"brapi-connect.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-connect.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAqBjE,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyFvB,CAAC"}
|
|
@@ -43,9 +43,8 @@ export const brapiConnect = tool('brapi_connect', {
|
|
|
43
43
|
input: z.object({
|
|
44
44
|
baseUrl: z
|
|
45
45
|
.string()
|
|
46
|
-
.url()
|
|
47
46
|
.optional()
|
|
48
|
-
.describe('BrAPI v2 base URL including any path prefix — e.g. https://test-server.brapi.org/brapi/v2. Omit to use the configured default for this alias.'),
|
|
47
|
+
.describe('BrAPI v2 base URL (absolute URL) including any path prefix — e.g. https://test-server.brapi.org/brapi/v2. Omit to use the configured default for this alias.'),
|
|
49
48
|
auth: ConnectAuthSchema.optional().describe('Auth payload. Omit to use credentials configured server-side for this alias (or no auth when none are configured).'),
|
|
50
49
|
alias: z
|
|
51
50
|
.string()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-connect.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-connect.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,gBAAgB,GACpB,uUAAuU,CAAC;AAE1U,MAAM,uBAAuB,GAAG,2BAA2B,CAAC,yBAAyB,EAAE,CAAC,CAAC;AAEzF,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;IAChD,WAAW,EAAE,uBAAuB;QAClC,CAAC,CAAC,GAAG,gBAAgB,IAAI,uBAAuB,EAAE;QAClD,CAAC,CAAC,gBAAgB;IACpB,WAAW,EAAE;QACX,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,KAAK;QACnB,cAAc,EAAE,IAAI;KACrB;IACD,MAAM,EAAE;QACN;YACE,MAAM,EAAE,4BAA4B;YACpC,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,sEAAsE;YAC5E,QAAQ,EAAE,4EAA4E;SACvF;QACD;YACE,MAAM,EAAE,sBAAsB;YAC9B,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,6DAA6D;YACnE,QAAQ,EACN,6FAA6F;SAChG;KACO;IACV,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC;QACd,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,
|
|
1
|
+
{"version":3,"file":"brapi-connect.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-connect.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,mCAAmC,CAAC;AAE3C,MAAM,gBAAgB,GACpB,uUAAuU,CAAC;AAE1U,MAAM,uBAAuB,GAAG,2BAA2B,CAAC,yBAAyB,EAAE,CAAC,CAAC;AAEzF,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE;IAChD,WAAW,EAAE,uBAAuB;QAClC,CAAC,CAAC,GAAG,gBAAgB,IAAI,uBAAuB,EAAE;QAClD,CAAC,CAAC,gBAAgB;IACpB,WAAW,EAAE;QACX,aAAa,EAAE,IAAI;QACnB,YAAY,EAAE,KAAK;QACnB,cAAc,EAAE,IAAI;KACrB;IACD,MAAM,EAAE;QACN;YACE,MAAM,EAA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C,WAAW,EAAE,CAAC;IACrE,OAAO,QAAQ,KAAK,KAAK,IAAI,QAAQ,KAAK,OAAO,CAAC;AACpD,CAAC"}
|
|
@@ -36,7 +36,7 @@ export declare const brapiDataframeDescribe: import("@cyanheads/mcp-ts-core").To
|
|
|
36
36
|
}, z.core.$strip>, readonly [{
|
|
37
37
|
readonly reason: "list_all_disabled_on_shared_http";
|
|
38
38
|
readonly code: JsonRpcErrorCode.Forbidden;
|
|
39
|
-
readonly when: "
|
|
40
|
-
readonly recovery: "Pass `dataframe` with a specific name — either from a prior find_* spillover result (`result.dataframe.tableName`) or one you registered via `brapi_dataframe_query` with `registerAs`. Listing all dataframes is not available.";
|
|
39
|
+
readonly when: "This server is running as a shared HTTP endpoint without per-caller auth — listing every dataframe would expose other concurrent clients' workspaces, since all callers resolve to one shared tenant.";
|
|
40
|
+
readonly recovery: "Pass `dataframe` with a specific name — either from a prior find_* spillover result (`result.dataframe.tableName`) or one you registered via `brapi_dataframe_query` with `registerAs`. Listing all dataframes is not available on this deployment.";
|
|
41
41
|
}]>;
|
|
42
42
|
//# sourceMappingURL=brapi-dataframe-describe.tool.d.ts.map
|
|
@@ -51,14 +51,14 @@ const InputSchema = z.object({
|
|
|
51
51
|
.describe('When set, return only the named dataframe. Omit to list all dataframes.'),
|
|
52
52
|
});
|
|
53
53
|
export const brapiDataframeDescribe = tool('brapi_dataframe_describe', {
|
|
54
|
-
description: 'Start here after a spillover. Lists dataframes (or describes one) with columns, row counts, and originating-source provenance. The dataframe name appears inline on every find_* response that spilled (`result.dataframe.tableName`) — pass it as `dataframe` to inspect schema and provenance before writing the first brapi_dataframe_query. Listing without a name is
|
|
54
|
+
description: 'Start here after a spillover. Lists dataframes (or describes one) with columns, row counts, and originating-source provenance. The dataframe name appears inline on every find_* response that spilled (`result.dataframe.tableName`) — pass it as `dataframe` to inspect schema and provenance before writing the first brapi_dataframe_query. Listing without a name is unavailable when this server runs as a shared HTTP endpoint without per-caller auth; pass a known name instead.',
|
|
55
55
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: false },
|
|
56
56
|
errors: [
|
|
57
57
|
{
|
|
58
58
|
reason: 'list_all_disabled_on_shared_http',
|
|
59
59
|
code: JsonRpcErrorCode.Forbidden,
|
|
60
|
-
when: "
|
|
61
|
-
recovery: 'Pass `dataframe` with a specific name — either from a prior find_* spillover result (`result.dataframe.tableName`) or one you registered via `brapi_dataframe_query` with `registerAs`. Listing all dataframes is not available.',
|
|
60
|
+
when: "This server is running as a shared HTTP endpoint without per-caller auth — listing every dataframe would expose other concurrent clients' workspaces, since all callers resolve to one shared tenant.",
|
|
61
|
+
recovery: 'Pass `dataframe` with a specific name — either from a prior find_* spillover result (`result.dataframe.tableName`) or one you registered via `brapi_dataframe_query` with `registerAs`. Listing all dataframes is not available on this deployment.',
|
|
62
62
|
},
|
|
63
63
|
],
|
|
64
64
|
input: InputSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-dataframe-describe.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;IACvF,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAA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zC,CAAC,CAAC;AAEH,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,QAAQ,EAAE;SACV,QAAQ,CAAC,yEAAyE,CAAC;CACvF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,0BAA0B,EAAE;IACrE,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"brapi-dataframe-describe.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-dataframe-describe.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IAC5B,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;IACzC,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,4DAA4D,CAAC;IACvF,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;CAChF,CAAC,CAAC;AAEH,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,CAAC,sEAAsE,CAAC;IACnF,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IACzE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,oCAAoC,C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,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;YACvD,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;YAC3D,KAAK,CAAC,IAAI,CAAC,kBAAkB,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,CAAC,CAAC;YAC3D,KAAK,CAAC,IAAI,CAAC,gBAAgB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzE,CAAC;IACH,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -68,6 +68,11 @@ export declare const brapiFindGenotypeCalls: import("@cyanheads/mcp-ts-core").To
|
|
|
68
68
|
warnings: z.ZodArray<z.ZodString>;
|
|
69
69
|
searchBody: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
70
70
|
}, z.core.$strip>, readonly [{
|
|
71
|
+
readonly reason: "unknown_alias";
|
|
72
|
+
readonly code: JsonRpcErrorCode.NotFound;
|
|
73
|
+
readonly when: "No connection has been registered under the requested alias";
|
|
74
|
+
readonly recovery: "Run brapi_connect with this alias (or omit `alias` to use the default connection) before calling brapi_find_genotype_calls.";
|
|
75
|
+
}, {
|
|
71
76
|
readonly reason: "no_filters";
|
|
72
77
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
73
78
|
readonly when: "No variant set, germplasm, call set, or variant filter was provided";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brapi-find-genotype-calls.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA8HjE,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"brapi-find-genotype-calls.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/brapi-find-genotype-calls.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAsB,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA8HjE,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4NjC,CAAC"}
|
|
@@ -18,8 +18,7 @@ import { getBrapiClient } from '../../../services/brapi-client/index.js';
|
|
|
18
18
|
import { resolveDialect } from '../../../services/brapi-dialect/index.js';
|
|
19
19
|
import { getCanvasBridge, } from '../../../services/canvas-bridge/index.js';
|
|
20
20
|
import { getCapabilityRegistry } from '../../../services/capability-registry/index.js';
|
|
21
|
-
import {
|
|
22
|
-
import { AliasInput, asString, buildRequestOptions, collectPassthroughParts, computeDistribution, DataframeHandleSchema, renderDataframeHandle, renderDistributions, renderFindHeader, toDataframeHandle, } from '../shared/find-helpers.js';
|
|
21
|
+
import { AliasInput, asString, buildRequestOptions, collectPassthroughParts, computeDistribution, DataframeHandleSchema, renderDataframeHandle, renderDistributions, renderFindHeader, requireRegisteredConnection, toDataframeHandle, } from '../shared/find-helpers.js';
|
|
23
22
|
const PAGE_SIZE = 10_000;
|
|
24
23
|
const CallRowSchema = z
|
|
25
24
|
.object({
|
|
@@ -110,6 +109,12 @@ export const brapiFindGenotypeCalls = tool('brapi_find_genotype_calls', {
|
|
|
110
109
|
description: 'Pull genotype calls for a germplasm × variant set. Filter to bound cost — at minimum, set `variantSetDbId` or `germplasmDbIds`. The upstream pull is capped by deployment policy; when the pull is truncated, narrow the filters or query the spilled dataframe. `loadLimit` bounds the rows returned inline; the full collected set is materialized as a dataframe — query it with brapi_dataframe_query (SQL) instead of paging row-by-row.',
|
|
111
110
|
annotations: { readOnlyHint: true, openWorldHint: true },
|
|
112
111
|
errors: [
|
|
112
|
+
{
|
|
113
|
+
reason: 'unknown_alias',
|
|
114
|
+
code: JsonRpcErrorCode.NotFound,
|
|
115
|
+
when: 'No connection has been registered under the requested alias',
|
|
116
|
+
recovery: 'Run brapi_connect with this alias (or omit `alias` to use the default connection) before calling brapi_find_genotype_calls.',
|
|
117
|
+
},
|
|
113
118
|
{
|
|
114
119
|
reason: 'no_filters',
|
|
115
120
|
code: JsonRpcErrorCode.ValidationError,
|
|
@@ -153,11 +158,10 @@ export const brapiFindGenotypeCalls = tool('brapi_find_genotype_calls', {
|
|
|
153
158
|
}),
|
|
154
159
|
output: OutputSchema,
|
|
155
160
|
async handler(input, ctx) {
|
|
156
|
-
const registry = getServerRegistry();
|
|
157
161
|
const capabilities = getCapabilityRegistry();
|
|
158
162
|
const client = getBrapiClient();
|
|
159
163
|
const bridge = getCanvasBridge();
|
|
160
|
-
const connection = await
|
|
164
|
+
const connection = await requireRegisteredConnection(ctx, input.alias);
|
|
161
165
|
const capabilityLookup = {};
|
|
162
166
|
if (connection.resolvedAuth)
|
|
163
167
|
capabilityLookup.auth = connection.resolvedAuth;
|