@cyanheads/protein-mcp-server 0.5.2 → 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.
Files changed (35) hide show
  1. package/AGENTS.md +5 -5
  2. package/CLAUDE.md +5 -5
  3. package/README.md +10 -5
  4. package/changelog/0.5.x/0.5.3.md +20 -0
  5. package/changelog/0.6.x/0.6.0.md +34 -0
  6. package/dist/mcp-server/tools/definitions/_schemas.d.ts +15 -0
  7. package/dist/mcp-server/tools/definitions/_schemas.d.ts.map +1 -1
  8. package/dist/mcp-server/tools/definitions/_schemas.js +46 -2
  9. package/dist/mcp-server/tools/definitions/_schemas.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/analyze-collection.tool.d.ts +3 -7
  11. package/dist/mcp-server/tools/definitions/analyze-collection.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/analyze-collection.tool.js +43 -21
  13. package/dist/mcp-server/tools/definitions/analyze-collection.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/find-similar.tool.d.ts +3 -0
  15. package/dist/mcp-server/tools/definitions/find-similar.tool.d.ts.map +1 -1
  16. package/dist/mcp-server/tools/definitions/find-similar.tool.js +20 -3
  17. package/dist/mcp-server/tools/definitions/find-similar.tool.js.map +1 -1
  18. package/dist/mcp-server/tools/definitions/search-structures.tool.d.ts +11 -2
  19. package/dist/mcp-server/tools/definitions/search-structures.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/search-structures.tool.js +81 -13
  21. package/dist/mcp-server/tools/definitions/search-structures.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/track-ligands.tool.d.ts +3 -0
  23. package/dist/mcp-server/tools/definitions/track-ligands.tool.d.ts.map +1 -1
  24. package/dist/mcp-server/tools/definitions/track-ligands.tool.js +21 -2
  25. package/dist/mcp-server/tools/definitions/track-ligands.tool.js.map +1 -1
  26. package/dist/services/rcsb/facets.d.ts +20 -1
  27. package/dist/services/rcsb/facets.d.ts.map +1 -1
  28. package/dist/services/rcsb/facets.js +36 -3
  29. package/dist/services/rcsb/facets.js.map +1 -1
  30. package/dist/services/rcsb/rcsb-service.d.ts +2 -0
  31. package/dist/services/rcsb/rcsb-service.d.ts.map +1 -1
  32. package/dist/services/rcsb/rcsb-service.js +5 -5
  33. package/dist/services/rcsb/rcsb-service.js.map +1 -1
  34. package/package.json +8 -8
  35. package/server.json +3 -3
package/AGENTS.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** protein-mcp-server
4
- **Version:** 0.5.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
4
+ **Version:** 0.6.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.7`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
8
- **Zod:** ^4.4.3
8
+ **Zod:** ^4.5.4
9
9
  **TypeScript:** ^7.0.2
10
10
 
11
11
  > **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.
@@ -204,7 +204,7 @@ Handlers receive a unified `ctx` object. Key properties:
204
204
 
205
205
  Handlers throw — the framework catches, classifies, and formats.
206
206
 
207
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
207
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
208
208
 
209
209
  ```ts
210
210
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -386,7 +386,7 @@ security: false # optional — true ONLY for a source
386
386
 
387
387
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
388
388
 
389
- **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
389
+ **Section order:** the Keep a Changelog sequence — Added, Changed, Deprecated, Removed, Fixed, Security — then `Dependencies` last. Include only sections with entries — don't ship empty headers.
390
390
 
391
391
  **Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
392
392
 
package/CLAUDE.md CHANGED
@@ -1,11 +1,11 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** protein-mcp-server
4
- **Version:** 0.5.2
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.3`
4
+ **Version:** 0.6.0
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.12.7`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/server` ^2.0.0
8
- **Zod:** ^4.4.3
8
+ **Zod:** ^4.5.4
9
9
  **TypeScript:** ^7.0.2
10
10
 
11
11
  > **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.
@@ -204,7 +204,7 @@ Handlers receive a unified `ctx` object. Key properties:
204
204
 
205
205
  Handlers throw — the framework catches, classifies, and formats.
206
206
 
207
- **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely and don't need declaring.
207
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` / `resource()` to receive `ctx.fail(reason, …)` typed against the reason union. TypeScript catches typos at compile time, `data.reason` is auto-populated for observability, linter enforces conformance against the handler body. `recovery` is required (≥ 5 words, lint-validated) — the single source of truth for the agent's next move. Pass `ctx.recoveryFor('reason')` as the throw's data to put it on the wire (`data.recovery.hint`, mirrored into `content[]` text); override with an explicit `{ recovery: { hint: '...' } }` when dynamic runtime context matters. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`, `RequestCancelled`) bubble freely and don't need declaring.
208
208
 
209
209
  ```ts
210
210
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
@@ -386,7 +386,7 @@ security: false # optional — true ONLY for a source
386
386
 
387
387
  `agent-notes` is an optional free-form field for maintenance agents processing the release downstream. Content here won't appear in the rendered CHANGELOG — it's consumed by agents running the `maintenance` skill. Use it for adoption instructions that don't fit the human-facing sections: new files to create, fields to populate, one-time migration steps. Omit entirely when there's nothing to say.
388
388
 
389
- **Section order** (Keep a Changelog): Added, Changed, Deprecated, Removed, Fixed, Security. Include only sections with entries — don't ship empty headers.
389
+ **Section order:** the Keep a Changelog sequence — Added, Changed, Deprecated, Removed, Fixed, Security — then `Dependencies` last. Include only sections with entries — don't ship empty headers.
390
390
 
391
391
  **Tag annotations** render as GitHub Release bodies via `--notes-from-tag`. They must be structured markdown — never a flat comma-separated string. Subject omits the version number (GitHub prepends it). See `changelog/template.md` for the full format reference.
392
392
 
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.5.2-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/protein-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/protein-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/protein-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.6.0-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/protein-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/protein-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/protein-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -47,8 +47,9 @@ Federated search across experimental (PDB) and predicted (computed-model) struct
47
47
 
48
48
  - Free-text, protein-sequence (triggers an mmseqs2 similarity search), and organism / method / resolution filters
49
49
  - `content_type` scopes the search to `experimental`, `predicted`, or `all` — the default `all` is a genuine union of both universes, so computed models appear alongside PDB entries
50
- - Every hit names its `source`; experimental hits are enriched with title, method, resolution, and organism, while computed models carry the UniProt accession parsed from their ID
51
- - Optional `facets` return a method / organism / release-year breakdown alongside the hits at no extra call, each reporting how many matches carry no value for that dimension; each dimension may be listed once
50
+ - Every hit names its `source`; experimental sequence hits expose a chainable PDB entry `id` plus the matched polymer `entityId`, with title, method, resolution, and organism enrichment, while computed models retain their complete model ID and parsed UniProt accession
51
+ - `start` and `limit` page through ranked results; `nextStart` is returned while another page remains
52
+ - Optional `facets` return a method / organism / release-year breakdown alongside the hits at no extra call, each reporting how many matches carry no value for that dimension; each dimension may be listed once. A dimension whose buckets hit the server-side cap is named in `notice`, with `protein_analyze_collection` and a larger `bucket_limit` as the route to the long tail (a sequence search gets a narrowing step instead, since that tool has no sequence input)
52
53
  - Chain hit IDs straight into `protein_get_structure`
53
54
 
54
55
  ---
@@ -72,6 +73,7 @@ Find structurally or evolutionarily related proteins, by sequence or by fold.
72
73
 
73
74
  - `by: sequence` runs a synchronous RCSB mmseqs2 search; `by: structure` runs an asynchronous Foldseek search against experimental and predicted databases
74
75
  - Query from a raw one-letter sequence, a PDB ID, or a UniProt accession
76
+ - Sequence searches accept `start` with `limit` and return `nextStart` while another page remains
75
77
  - Foldseek targets default to `pdb100` + `afdb50`; override via `databases` (e.g. `afdb-swissprot`, `BFVD`)
76
78
  - Async jobs that exceed the poll budget return `status: computing` with a `ticketId` — re-call with `ticket_id` set to that value to poll the same job instead of resubmitting
77
79
  - Each hit names the engine and source database it came from
@@ -84,9 +86,12 @@ Ligand discovery and binding-site analysis across the PDB.
84
86
 
85
87
  - `mode: find_ligand` resolves a name or formula to chemical component IDs with formula, weight, SMILES, and InChIKey
86
88
  - `mode: structures_with_ligand` returns PDB entries containing a ligand by exact component ID
89
+ - `mode: structures_with_ligand` accepts `start` with `limit` and returns `nextStart` while another page remains
87
90
  - `mode: binding_site` returns the protein residues lining a ligand's pocket in a structure, with contact distances
88
91
  - Binding sites are experimental-only — computed from deposited coordinates (predicted models carry no bound ligands)
89
92
 
93
+ Paged RCSB results preserve the upstream order within each response. Resolution ties and changes in the live corpus mean traversal is best-effort across calls, not a stable export snapshot.
94
+
90
95
  ---
91
96
 
92
97
  ### `protein_compare_structures`
@@ -109,9 +114,9 @@ Profile the PDB into distributions and trends over an optional scoping query —
109
114
 
110
115
  - Group by `method`, `organism`, `polymer_type`, `resolution`, `release_year`, or `molecular_weight`
111
116
  - One `group_by` dimension for a breakdown, or two distinct dimensions for a cross-tab (the first nests the second); a repeated dimension is rejected
112
- - `interval` sets the bin width for value histograms or the period for date histograms (`year` / `month` / `quarter`)
117
+ - `interval` sets the bin width for a value histogram (a number, for `resolution` or `molecular_weight`) or the period for a date histogram (`year` the only period RCSB accepts). It applies to whichever requested `group_by` dimension can consume that value type, primary or nested child, so `["method", "resolution"]` bins its nested `resolution` child; when both dimensions can consume it the primary takes it and the child keeps its default, and when neither can the call is rejected rather than silently ignoring the override
113
118
  - Scope with a free-text `query`, `organism`, `method`, or `max_resolution`; `content_type` selects the structure universe
114
- - `bucket_limit` caps buckets per dimension level, not per response — a cross-tab applies it separately to the parent dimension and to the nested child inside each parent bucket, so up to `bucket_limit × (1 + bucket_limit)` buckets come back. Each level flags its own truncation, and `bucketsReturned` gives the realized total
119
+ - `bucket_limit` caps buckets per dimension level, not per response — a cross-tab applies it separately to the parent dimension and to the nested child inside each parent bucket, so up to `bucket_limit × (1 + bucket_limit)` buckets come back. Each level flags its own truncation, `notice` names every capped position (the top-level dimension and each nested child, with how many parent buckets it was capped under), and `bucketsReturned` gives the realized total
115
120
  - Every dimension reports `missingValueCount` — matches in scope carrying no value for that attribute, which therefore fall in no bucket (a `resolution` breakdown does not cover NMR entries, and neither `method` nor `resolution` covers computed models)
116
121
 
117
122
  ---
@@ -0,0 +1,20 @@
1
+ ---
2
+ summary: "RCSB-backed tools support offset pagination; structure searches accept method or resolution criteria alone, retain chainable sequence-hit IDs, and enrich every entry on a returned sequence page."
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.5.3 — 2026-08-30
8
+
9
+ ## Added
10
+
11
+ - **RCSB result pagination**: `protein_search_structures`, sequence-mode `protein_find_similar`, and `structures_with_ligand` mode in `protein_track_ligands` accept `start` and return `nextStart` while more results remain ([#41](https://github.com/cyanheads/protein-mcp-server/issues/41)).
12
+
13
+ ## Changed
14
+
15
+ - **Experimental sequence hits**: `protein_search_structures` exposes the chainable PDB entry as `id` and retains the matched polymer entity as `entityId` ([#39](https://github.com/cyanheads/protein-mcp-server/issues/39)).
16
+ - **Filter-only structure searches**: experimental `method` and `max_resolution` now form valid RCSB search criteria without text, sequence, or organism input ([#40](https://github.com/cyanheads/protein-mcp-server/issues/40)).
17
+
18
+ ## Fixed
19
+
20
+ - **Sequence-result enrichment**: `protein_find_similar` enriches every distinct entry returned on a sequence page instead of limiting metadata by the facet bucket cap ([#44](https://github.com/cyanheads/protein-mcp-server/issues/44)).
@@ -0,0 +1,34 @@
1
+ ---
2
+ summary: "protein_analyze_collection's truncation notice covers nested cross-tab children and empty scopes, interval routes to whichever group_by dimension can consume it and is narrowed to RCSB's supported values, and protein_search_structures rejects sequence-only thresholds and surfaces capped-facet recovery guidance."
3
+ breaking: true
4
+ security: false
5
+ ---
6
+
7
+ # 0.6.0 — 2026-09-08
8
+
9
+ ## Changed
10
+
11
+ - **`protein_analyze_collection` truncation notice** names every capped dimension position — the top-level dimension and each nested cross-tab child — instead of only the first one `Array.prototype.find` happened to reach; a cross-tab can cap a child even when its parent fits under the cap ([#37](https://github.com/cyanheads/protein-mcp-server/issues/37)).
12
+ - **`interval`** applies to whichever requested `group_by` dimension can consume it — primary or nested child — instead of the primary position only; a numeric width binds to `resolution`/`molecular_weight`, `"year"` binds to `release_year` ([#51](https://github.com/cyanheads/protein-mcp-server/issues/51)).
13
+ - **`interval`'s date-histogram arm is narrowed to `"year"`** — the only period RCSB's Search API accepts. `month` and `quarter` previously reached RCSB and failed there as an unclassified upstream error rather than a schema rejection ([#58](https://github.com/cyanheads/protein-mcp-server/issues/58)).
14
+
15
+ ## Removed
16
+
17
+ - **`unknown_dimension` error reason** on `protein_analyze_collection` — no reachable input hit its throw site; `group_by`'s enum already rejects an invalid dimension before the handler runs ([#47](https://github.com/cyanheads/protein-mcp-server/issues/47)).
18
+ - **`shown` and `cap` output fields** on `protein_analyze_collection` — redundant with the cap already named in `notice` ([#37](https://github.com/cyanheads/protein-mcp-server/issues/37)).
19
+
20
+ ## Fixed
21
+
22
+ - **Zero-match scope** on `protein_analyze_collection` now emits a `notice` explaining every requested dimension came back empty, instead of a bare success with no explanation ([#54](https://github.com/cyanheads/protein-mcp-server/issues/54)).
23
+ - **`protein_search_structures`** rejects `min_identity`/`max_evalue` supplied without `sequence` via a new `sequence_modifier_without_sequence` reason, instead of silently running the request unfiltered ([#56](https://github.com/cyanheads/protein-mcp-server/issues/56)).
24
+ - **`protein_search_structures`** names capped facet dimensions in `notice` with a route to the long tail — `protein_analyze_collection` with a larger `bucket_limit`, or narrowing the request when the search used `sequence` ([#52](https://github.com/cyanheads/protein-mcp-server/issues/52)).
25
+
26
+ ## Dependencies
27
+
28
+ - `@cyanheads/mcp-ts-core` ^0.12.3 → ^0.12.7
29
+ - `zod` ^4.4.3 → ^4.5.4
30
+ - `@biomejs/biome` 2.5.10 → 2.5.12
31
+ - `@types/node` 26.2.0 → 26.4.1
32
+ - `ignore` ^7.0.6 → ^7.0.8
33
+ - `tsc-alias` ^1.9.2 → ^1.9.4
34
+ - `vitest` ^4.1.11 → ^5.0.0
@@ -91,6 +91,21 @@ export declare function renderFacets(facets: FacetDimensionOutput[]): string[];
91
91
  * report it, and quantifying a 100% gap on top adds nothing.
92
92
  */
93
93
  export declare function coverageNotices(facets: FacetDimensionOutput[], total: number): string[];
94
+ /**
95
+ * Advisory fragments for the dimension positions the bucket cap sliced, ready to
96
+ * join into the shared `notice` field alongside a caller's other advisories.
97
+ *
98
+ * Walks the same positions as {@link coverageNotices}: the top-level dimension,
99
+ * then each distinct child dimension aggregated across the parent buckets that
100
+ * carry it. A cross-tab caps each position independently, so the parent can fit
101
+ * under the cap while a child does not — and a child can be capped under some
102
+ * parent buckets and not others, which is what the per-position counts report.
103
+ * A single fragment naming one dimension would misstate all three cases.
104
+ *
105
+ * The list closes with the cap itself and the way past it, so a caller reading
106
+ * only `notice` has the recovery without re-deriving it per position.
107
+ */
108
+ export declare function truncationNotices(facets: FacetDimensionOutput[], cap: number): string[];
94
109
  /** License + citation for one upstream data source that contributed to a response. */
95
110
  export declare const attributionSchema: z.ZodObject<{
96
111
  source: z.ZodString;
@@ -1 +1 @@
1
- {"version":3,"file":"_schemas.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,EAAe,cAAc,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GAAG,MAAM,EAAE,CAM7E"}
@@ -97,8 +97,8 @@ function withRange(b) {
97
97
  *
98
98
  * - `buckets` must be the UNCAPPED list. Measured after {@link toFacetOutput}
99
99
  * slices to the bucket cap, the difference would fold in what the cap removed
100
- * — a separate condition the response already discloses through `truncated` /
101
- * `shown` / `cap`.
100
+ * — a separate condition the response already discloses through the
101
+ * per-position `truncated` flags and {@link truncationNotices}.
102
102
  * - The result floors at 0. A multi-valued attribute puts one match in several
103
103
  * buckets (an entry with two source organisms lands in both), so the sum can
104
104
  * legitimately exceed the total. That is over-counting, a different phenomenon
@@ -280,6 +280,50 @@ export function coverageNotices(facets, total) {
280
280
  }
281
281
  return notices;
282
282
  }
283
+ /**
284
+ * Advisory fragments for the dimension positions the bucket cap sliced, ready to
285
+ * join into the shared `notice` field alongside a caller's other advisories.
286
+ *
287
+ * Walks the same positions as {@link coverageNotices}: the top-level dimension,
288
+ * then each distinct child dimension aggregated across the parent buckets that
289
+ * carry it. A cross-tab caps each position independently, so the parent can fit
290
+ * under the cap while a child does not — and a child can be capped under some
291
+ * parent buckets and not others, which is what the per-position counts report.
292
+ * A single fragment naming one dimension would misstate all three cases.
293
+ *
294
+ * The list closes with the cap itself and the way past it, so a caller reading
295
+ * only `notice` has the recovery without re-deriving it per position.
296
+ */
297
+ export function truncationNotices(facets, cap) {
298
+ const notices = [];
299
+ for (const f of facets) {
300
+ if (f.truncated) {
301
+ notices.push(`${f.dimension} was capped to the ${f.buckets.length} highest-count buckets.`);
302
+ }
303
+ const children = new Map();
304
+ for (const b of f.buckets) {
305
+ const c = b.child;
306
+ if (!c)
307
+ continue;
308
+ const acc = children.get(c.dimension) ?? { buckets: 0, parents: 0, truncated: 0 };
309
+ acc.parents += 1;
310
+ if (c.truncated) {
311
+ acc.truncated += 1;
312
+ acc.buckets = Math.max(acc.buckets, c.buckets.length);
313
+ }
314
+ children.set(c.dimension, acc);
315
+ }
316
+ for (const [dimension, acc] of children) {
317
+ if (acc.truncated === 0)
318
+ continue;
319
+ notices.push(`${dimension} (nested under ${f.dimension}) was capped to ${acc.buckets} buckets in ${acc.truncated} of the ${acc.parents} ${f.dimension} buckets shown.`);
320
+ }
321
+ }
322
+ if (notices.length === 0)
323
+ return [];
324
+ notices.push(`Each dimension level is capped at ${cap} buckets independently; raise bucket_limit (up to 500) or scope the query tighter to reach the long tail.`);
325
+ return notices;
326
+ }
283
327
  /** License + citation for one upstream data source that contributed to a response. */
284
328
  export const attributionSchema = z
285
329
  .object({
@@ -1 +1 @@
1
- {"version":3,"file":"_schemas.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/_schemas.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAG3C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,YAAY,EAAE,CAAC,cAAc,CAAC;IAC9B,SAAS,EAAE,CAAC,eAAe,CAAC;IAC5B,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,CAAC;CAC+B,CAAC;AAExE,kCAAkC;AAClC,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;IACpF,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kCAAkC,CAAC;IAC9D,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,4JAA4J,CAC7J;IACH,OAAO,EAAE,CAAC;SACP,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CACP,uJAAuJ,CACxJ;CACJ,CAAC;KACD,QAAQ,CAAC,yDAAyD,CAAC,CAAC;AAEvE,kEAAkE;AAClE,MAAM,oBAAoB,GAAG,CAAC;KAC3B,MAAM,CAAC;IACN,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAA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Q,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,iCAAiC,CAAC;CACjE,CAAC;KACD,QAAQ,CAAC,oEAAoE,CAAC,CAAC;AAIlF,gGAAgG;AAChG,MAAM,UAAU,iBAAiB,CAAC,YAAiC;IACjE,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,CAAC,IAAI,YAAY,EAAE,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,OAAO,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,QAAQ,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -27,8 +27,6 @@ export declare const analyzeCollection: import("@cyanheads/mcp-ts-core").ToolDef
27
27
  predicted: "predicted";
28
28
  }>>;
29
29
  interval: z.ZodOptional<z.ZodUnion<readonly [z.ZodCoercedNumber<unknown>, z.ZodEnum<{
30
- month: "month";
31
- quarter: "quarter";
32
30
  year: "year";
33
31
  }>]>>;
34
32
  bucket_limit: z.ZodOptional<z.ZodCoercedNumber<unknown>>;
@@ -57,10 +55,10 @@ export declare const analyzeCollection: import("@cyanheads/mcp-ts-core").ToolDef
57
55
  }, z.core.$strip>>;
58
56
  }, z.core.$strip>>;
59
57
  }, z.core.$strip>, readonly [{
60
- readonly reason: "unknown_dimension";
58
+ readonly reason: "interval_not_applicable";
61
59
  readonly code: JsonRpcErrorCode.InvalidParams;
62
- readonly when: "A group_by value is outside the supported dimension set.";
63
- readonly recovery: "Use a supported dimension: method, organism, polymer_type, resolution, release_year, or molecular_weight.";
60
+ readonly when: "interval was supplied but neither requested group_by dimension aggregates by a histogram that accepts a value of that type.";
61
+ readonly recovery: "Group by resolution or molecular_weight for a numeric interval, or release_year for the \"year\" period; otherwise drop interval and let each dimension use its own default.";
64
62
  }, {
65
63
  readonly reason: "duplicate_dimension";
66
64
  readonly code: JsonRpcErrorCode.InvalidParams;
@@ -70,8 +68,6 @@ export declare const analyzeCollection: import("@cyanheads/mcp-ts-core").ToolDef
70
68
  readonly scope: z.ZodOptional<z.ZodString>;
71
69
  readonly notice: z.ZodOptional<z.ZodString>;
72
70
  readonly truncated: z.ZodOptional<z.ZodBoolean>;
73
- readonly shown: z.ZodOptional<z.ZodNumber>;
74
- readonly cap: z.ZodOptional<z.ZodNumber>;
75
71
  readonly bucketsReturned: z.ZodNumber;
76
72
  }>;
77
73
  //# sourceMappingURL=analyze-collection.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-collection.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-collection.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAyBjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0L5B,CAAC"}
1
+ {"version":3,"file":"analyze-collection.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-collection.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAuCjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0M5B,CAAC"}
@@ -9,9 +9,9 @@
9
9
  import { tool, z } from '@cyanheads/mcp-ts-core';
10
10
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
11
11
  import { getServerConfig } from '../../../config/server-config.js';
12
- import { buildFacetSpec, FACET_DIMENSION_NAMES, } from '../../../services/rcsb/facets.js';
12
+ import { buildFacetSpec, FACET_DIMENSION_NAMES, INTERVAL_DIMENSION_NAMES, intervalTarget, } from '../../../services/rcsb/facets.js';
13
13
  import { getRcsbService } from '../../../services/rcsb/rcsb-service.js';
14
- import { CONTENT_TYPE_SCOPES, countBuckets, coverageNotices, facetDimensionSchema, renderFacets, toFacetOutput, } from './_schemas.js';
14
+ import { CONTENT_TYPE_SCOPES, countBuckets, coverageNotices, facetDimensionSchema, renderFacets, toFacetOutput, truncationNotices, } from './_schemas.js';
15
15
  /**
16
16
  * Dimensions RCSB cannot aggregate over computed models: an AlphaFold /
17
17
  * ModelArchive record carries no experimental method or resolution, so the
@@ -19,6 +19,16 @@ import { CONTENT_TYPE_SCOPES, countBuckets, coverageNotices, facetDimensionSchem
19
19
  * The other four dimensions aggregate normally under predicted content.
20
20
  */
21
21
  const EXPERIMENTAL_ONLY_DIMENSIONS = new Set(['method', 'resolution']);
22
+ /**
23
+ * Zero-match advice, per scope. Mirrors `protein_search_structures`: only the two
24
+ * single-universe scopes have a wider one to switch to, so under `all` the advice
25
+ * is to loosen the filters rather than to widen a scope already at its widest.
26
+ */
27
+ const ZERO_MATCH_NOTICE = {
28
+ experimental: `No experimental structures matched this scope, so every requested dimension aggregated to nothing. Broaden or drop the query, organism, method, and max_resolution filters, or widen content_type to "all" to include computed models.`,
29
+ predicted: `No predicted models matched this scope, so every requested dimension aggregated to nothing. Broaden or drop the query, organism, method, and max_resolution filters, or widen content_type to "all" to include experimental structures.`,
30
+ all: `No structures matched this scope in either the experimental or computed-model universe — content_type "all" is already the widest scope. Broaden or drop the query, organism, method, and max_resolution filters.`,
31
+ };
22
32
  export const analyzeCollection = tool('protein_analyze_collection', {
23
33
  title: 'protein-mcp-server: analyze collection',
24
34
  description: 'Profile the PDB into distributions and trends over an optional scoping query: counts by method, ' +
@@ -31,10 +41,10 @@ export const analyzeCollection = tool('protein_analyze_collection', {
31
41
  annotations: { readOnlyHint: true, openWorldHint: true },
32
42
  errors: [
33
43
  {
34
- reason: 'unknown_dimension',
44
+ reason: 'interval_not_applicable',
35
45
  code: JsonRpcErrorCode.InvalidParams,
36
- when: 'A group_by value is outside the supported dimension set.',
37
- recovery: 'Use a supported dimension: method, organism, polymer_type, resolution, release_year, or molecular_weight.',
46
+ when: 'interval was supplied but neither requested group_by dimension aggregates by a histogram that accepts a value of that type.',
47
+ recovery: `Group by resolution or molecular_weight for a numeric interval, or release_year for the "year" period; otherwise drop interval and let each dimension use its own default.`,
38
48
  },
39
49
  {
40
50
  reason: 'duplicate_dimension',
@@ -74,10 +84,15 @@ export const analyzeCollection = tool('protein_analyze_collection', {
74
84
  .number()
75
85
  .positive()
76
86
  .describe('Numeric bin width for a value histogram (e.g. resolution Å).'),
77
- z.enum(['year', 'month', 'quarter']).describe('Period granularity for a date histogram.'),
78
- ])
87
+ // RCSB's date_histogram schema accepts only "year"; month and quarter fail
88
+ // upstream JSON-schema validation, so they are not advertised here.
89
+ z.enum(['year']).describe('Period granularity for a date histogram. Only "year".'),
90
+ ],
91
+ // A union reports a bare "Invalid input" by default, so the rejection would
92
+ // name neither arm; spell the accepted set out instead.
93
+ { error: `Expected a positive number (histogram bin width) or "year" (date period).` })
79
94
  .optional()
80
- .describe('Bin width for a histogram dimension (number) or period for a date histogram (year/month/quarter).'),
95
+ .describe(`Bin width for a histogram dimension (a number, for resolution or molecular_weight) or period for a date histogram ("year", for release_year). Applies to whichever requested group_by dimension can consume that value type — primary or nested child — so a cross-tab like ["method","resolution"] bins its nested resolution child. When both requested dimensions can consume it the primary takes it and the child keeps its default. When neither can, the call is rejected rather than silently ignoring the override.`),
81
96
  bucket_limit: z.coerce
82
97
  .number()
83
98
  .int()
@@ -98,13 +113,11 @@ export const analyzeCollection = tool('protein_analyze_collection', {
98
113
  notice: z
99
114
  .string()
100
115
  .optional()
101
- .describe('Advisory note (bucket truncation, empty scope, dimensions with no data under the requested content_type, dimensions whose buckets cover materially less than the total). Carries every applicable advisory in one string.'),
116
+ .describe('Advisory note (per-position bucket truncation, a scope that matched nothing, dimensions with no data under the requested content_type, dimensions whose buckets cover materially less than the total). Carries every applicable advisory in one string.'),
102
117
  truncated: z
103
118
  .boolean()
104
119
  .optional()
105
- .describe('True when a dimension had more buckets than the applied cap.'),
106
- shown: z.number().optional().describe('Buckets returned for the capped dimension.'),
107
- cap: z.number().optional().describe('Per-dimension bucket cap that was applied.'),
120
+ .describe('True when at least one dimension position — the top-level dimension or a nested cross-tab child — had more buckets than the applied cap. Which positions, and by how much, is named in notice.'),
108
121
  bucketsReturned: z
109
122
  .number()
110
123
  .describe('Buckets in this response, summed over every dimension level: the top-level buckets plus, for a ' +
@@ -115,17 +128,19 @@ export const analyzeCollection = tool('protein_analyze_collection', {
115
128
  const cfg = getServerConfig();
116
129
  const rcsb = getRcsbService();
117
130
  const cap = input.bucket_limit ?? cfg.facetBucketCap;
131
+ // `.min(1)` on the schema guarantees a primary; the array type does not carry
132
+ // that, and an out-of-enum or empty group_by is rejected before the handler runs.
118
133
  const [primary, secondary] = input.group_by;
119
- if (!primary)
120
- throw ctx.fail('unknown_dimension', 'group_by requires at least one dimension.', {
121
- ...ctx.recoveryFor('unknown_dimension'),
122
- });
123
134
  // A repeated dimension would nest a facet inside itself upstream. RCSB answers
124
135
  // that with same-attribute overlap, not a cross-tab between two dimensions —
125
136
  // an undocumented shape no caller can read, so reject before the call.
126
137
  const duplicate = input.group_by.find((d, i, all) => all.indexOf(d) !== i);
127
138
  if (duplicate)
128
139
  throw ctx.fail('duplicate_dimension', `group_by lists "${duplicate}" twice; a cross-tab needs two distinct dimensions.`, { ...ctx.recoveryFor('duplicate_dimension') });
140
+ // An override no requested position can consume would reach RCSB as nothing at
141
+ // all — the call would succeed with default bins, looking like a filtered result.
142
+ if (input.interval !== undefined && !intervalTarget(input.interval, primary, secondary))
143
+ throw ctx.fail('interval_not_applicable', `interval ${input.interval} does not apply to ${input.group_by.join(' or ')}; only ${INTERVAL_DIMENSION_NAMES.join(', ')} bin by an interval, and a numeric width needs resolution or molecular_weight while "year" needs release_year.`, { ...ctx.recoveryFor('interval_not_applicable') });
129
144
  const spec = buildFacetSpec(primary, input.interval, secondary);
130
145
  const { total, facets } = await rcsb.analyzeFacets({
131
146
  ...(input.query ? { text: input.query } : {}),
@@ -144,12 +159,19 @@ export const analyzeCollection = tool('protein_analyze_collection', {
144
159
  // through it and is last-wins), and a cross-tab under predicted content can
145
160
  // trip several at once — collect the fragments and emit them as ONE notice.
146
161
  const notices = [];
147
- const capped = out.find((f) => f.truncated);
148
- if (capped) {
149
- ctx.enrich({ truncated: true, shown: capped.buckets.length, cap });
150
- notices.push(`One or more dimensions exceeded ${cap} buckets and were capped; scope the query tighter for the long tail.`);
162
+ // Every position the cap sliced is named, not just the first one `.find()` would
163
+ // reach: a cross-tab caps the parent and each nested child independently.
164
+ const truncations = truncationNotices(out, cap);
165
+ if (truncations.length > 0) {
166
+ ctx.enrich({ truncated: true });
167
+ notices.push(...truncations);
168
+ }
169
+ if (total === 0) {
170
+ // A scope that matched nothing explains every empty dimension by itself.
171
+ // Stacking the predicted-content caveat on top would misattribute the cause.
172
+ notices.push(ZERO_MATCH_NOTICE[input.content_type]);
151
173
  }
152
- if (input.content_type === 'predicted') {
174
+ else if (input.content_type === 'predicted') {
153
175
  const blind = input.group_by.filter((d) => EXPERIMENTAL_ONLY_DIMENSIONS.has(d));
154
176
  if (blind.length > 0) {
155
177
  notices.push(`${blind.join(' and ')} ${blind.length > 1 ? 'are' : 'is'} empty under content_type "predicted": computed models carry no experimental method or resolution metadata. Use content_type "experimental" or "all", or group by organism, polymer_type, release_year, or molecular_weight.`);
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-collection.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-collection.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BA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SAAS,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9E,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,CAAC,2BAA2B,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC;QAC5E,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"analyze-collection.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-collection.tool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,cAAc,EACd,qBAAqB,EAErB,wBAAwB,EACxB,cAAc,GACf,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EACL,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,YAAY,EACZ,aAAa,EACb,iBAAiB,GAClB,MAAM,e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,CAAC,MAAM,GAAG,CAAC;YAAE,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;QAE7D,MAAM,SAAS,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC9E,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC;YAAE,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAEvE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;IAChC,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,CAAC,2BAA2B,MAAM,CAAC,KAAK,UAAU,CAAC,CAAC;QAC5E,KAAK,CAAC,IAAI,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAC3C,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -20,6 +20,7 @@ export declare const findSimilar: import("@cyanheads/mcp-ts-core").ToolDefinitio
20
20
  max_evalue: z.ZodOptional<z.ZodNumber>;
21
21
  min_identity: z.ZodOptional<z.ZodNumber>;
22
22
  limit: z.ZodDefault<z.ZodNumber>;
23
+ start: z.ZodDefault<z.ZodNumber>;
23
24
  }, z.core.$strip>, z.ZodObject<{
24
25
  by: z.ZodEnum<{
25
26
  sequence: "sequence";
@@ -69,6 +70,8 @@ export declare const findSimilar: import("@cyanheads/mcp-ts-core").ToolDefinitio
69
70
  readonly recovery: "Tickets expire once results age out; drop ticket_id and re-run the by:structure search from pdb_id or uniprot to get a fresh one.";
70
71
  }], {
71
72
  totalCount: z.ZodOptional<z.ZodNumber>;
73
+ start: z.ZodOptional<z.ZodNumber>;
74
+ nextStart: z.ZodOptional<z.ZodNumber>;
72
75
  notice: z.ZodOptional<z.ZodString>;
73
76
  }>;
74
77
  //# sourceMappingURL=find-similar.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"find-similar.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-similar.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA6B,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAkHjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEtB,CAAC"}
1
+ {"version":3,"file":"find-similar.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/find-similar.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAA6B,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA6HjE,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwEtB,CAAC"}