@cyanheads/zenodo-mcp-server 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +435 -0
- package/CLAUDE.md +435 -0
- package/Dockerfile +140 -0
- package/LICENSE +201 -0
- package/README.md +292 -0
- package/changelog/0.1.x/0.1.1.md +21 -0
- package/changelog/template.md +151 -0
- package/dist/config/server-config.d.ts +13 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +19 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/get-record.tool.d.ts +186 -0
- package/dist/mcp-server/tools/definitions/get-record.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/get-record.tool.js +568 -0
- package/dist/mcp-server/tools/definitions/get-record.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/index.d.ts +721 -0
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/index.js +21 -0
- package/dist/mcp-server/tools/definitions/index.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-files.tool.d.ts +108 -0
- package/dist/mcp-server/tools/definitions/list-files.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-files.tool.js +348 -0
- package/dist/mcp-server/tools/definitions/list-files.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/list-versions.tool.d.ts +92 -0
- package/dist/mcp-server/tools/definitions/list-versions.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/list-versions.tool.js +268 -0
- package/dist/mcp-server/tools/definitions/list-versions.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/lookup-vocabulary.tool.d.ts +99 -0
- package/dist/mcp-server/tools/definitions/lookup-vocabulary.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/lookup-vocabulary.tool.js +324 -0
- package/dist/mcp-server/tools/definitions/lookup-vocabulary.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/read-file.tool.d.ts +104 -0
- package/dist/mcp-server/tools/definitions/read-file.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/read-file.tool.js +370 -0
- package/dist/mcp-server/tools/definitions/read-file.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.d.ts +181 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.js +531 -0
- package/dist/mcp-server/tools/definitions/search-records.tool.js.map +1 -0
- package/dist/mcp-server/tools/record-miss.d.ts +37 -0
- package/dist/mcp-server/tools/record-miss.d.ts.map +1 -0
- package/dist/mcp-server/tools/record-miss.js +51 -0
- package/dist/mcp-server/tools/record-miss.js.map +1 -0
- package/dist/mcp-server/tools/render.d.ts +31 -0
- package/dist/mcp-server/tools/render.d.ts.map +1 -0
- package/dist/mcp-server/tools/render.js +53 -0
- package/dist/mcp-server/tools/render.js.map +1 -0
- package/dist/mcp-server/tools/schema-helpers.d.ts +20 -0
- package/dist/mcp-server/tools/schema-helpers.d.ts.map +1 -0
- package/dist/mcp-server/tools/schema-helpers.js +44 -0
- package/dist/mcp-server/tools/schema-helpers.js.map +1 -0
- package/dist/services/zenodo/cache.d.ts +25 -0
- package/dist/services/zenodo/cache.d.ts.map +1 -0
- package/dist/services/zenodo/cache.js +58 -0
- package/dist/services/zenodo/cache.js.map +1 -0
- package/dist/services/zenodo/html-to-text.d.ts +23 -0
- package/dist/services/zenodo/html-to-text.d.ts.map +1 -0
- package/dist/services/zenodo/html-to-text.js +148 -0
- package/dist/services/zenodo/html-to-text.js.map +1 -0
- package/dist/services/zenodo/http.d.ts +73 -0
- package/dist/services/zenodo/http.d.ts.map +1 -0
- package/dist/services/zenodo/http.js +378 -0
- package/dist/services/zenodo/http.js.map +1 -0
- package/dist/services/zenodo/identifiers.d.ts +104 -0
- package/dist/services/zenodo/identifiers.d.ts.map +1 -0
- package/dist/services/zenodo/identifiers.js +261 -0
- package/dist/services/zenodo/identifiers.js.map +1 -0
- package/dist/services/zenodo/normalize.d.ts +29 -0
- package/dist/services/zenodo/normalize.d.ts.map +1 -0
- package/dist/services/zenodo/normalize.js +324 -0
- package/dist/services/zenodo/normalize.js.map +1 -0
- package/dist/services/zenodo/query-builder.d.ts +87 -0
- package/dist/services/zenodo/query-builder.d.ts.map +1 -0
- package/dist/services/zenodo/query-builder.js +221 -0
- package/dist/services/zenodo/query-builder.js.map +1 -0
- package/dist/services/zenodo/resource-types.d.ts +34 -0
- package/dist/services/zenodo/resource-types.d.ts.map +1 -0
- package/dist/services/zenodo/resource-types.js +97 -0
- package/dist/services/zenodo/resource-types.js.map +1 -0
- package/dist/services/zenodo/text-preview.d.ts +56 -0
- package/dist/services/zenodo/text-preview.d.ts.map +1 -0
- package/dist/services/zenodo/text-preview.js +151 -0
- package/dist/services/zenodo/text-preview.js.map +1 -0
- package/dist/services/zenodo/types.d.ts +517 -0
- package/dist/services/zenodo/types.d.ts.map +1 -0
- package/dist/services/zenodo/types.js +8 -0
- package/dist/services/zenodo/types.js.map +1 -0
- package/dist/services/zenodo/zenodo-service.d.ts +98 -0
- package/dist/services/zenodo/zenodo-service.d.ts.map +1 -0
- package/dist/services/zenodo/zenodo-service.js +392 -0
- package/dist/services/zenodo/zenodo-service.js.map +1 -0
- package/package.json +110 -0
- package/server.json +113 -0
|
@@ -0,0 +1,531 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview zenodo_search_records — keyword search over Zenodo deposits with
|
|
3
|
+
* verified filters (resource type, community, funder, award, creator ORCID, file
|
|
4
|
+
* type, license, access status, publication date), returning manifest-free
|
|
5
|
+
* summaries plus facet counts over the full match set, every filter applied.
|
|
6
|
+
* @module mcp-server/tools/definitions/search-records
|
|
7
|
+
*/
|
|
8
|
+
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
9
|
+
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
10
|
+
import { isValidOrcid, isWholeIdentifier, normalizeOrcid, ORCID_PATTERN, parseAwardRef, parseCommunityRef, parseFunderRef, } from '../../../services/zenodo/identifiers.js';
|
|
11
|
+
import { ACCESS_STATUSES, expandPartialDate, hasUnpairedSlash, isValidPartialDate, SEARCH_SORTS, } from '../../../services/zenodo/query-builder.js';
|
|
12
|
+
import { RESOURCE_TYPE_IDS, resolveResourceTypeId } from '../../../services/zenodo/resource-types.js';
|
|
13
|
+
import { getZenodoService } from '../../../services/zenodo/zenodo-service.js';
|
|
14
|
+
import { inline } from '../render.js';
|
|
15
|
+
import { blankToUndefined, enumPreprocess, toOptionalArray } from '../schema-helpers.js';
|
|
16
|
+
const RESULT_WINDOW = 10_000;
|
|
17
|
+
const PARTIAL_DATE_PATTERN = /^\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\d|3[01]))?)?$/;
|
|
18
|
+
/**
|
|
19
|
+
* Resource type preprocess: a lone string or array, each value resolved to its id
|
|
20
|
+
* (any case; `publication::publication-article` → `publication-article`). A value
|
|
21
|
+
* that names no resource type raises its own issue here rather than reaching the
|
|
22
|
+
* enum: the enum's issue would point at an array index a lone-string input never
|
|
23
|
+
* had, and read as a missing field.
|
|
24
|
+
*/
|
|
25
|
+
const resourceTypeInput = z.preprocess((v, ctx) => {
|
|
26
|
+
const arr = toOptionalArray(v);
|
|
27
|
+
if (!Array.isArray(arr))
|
|
28
|
+
return arr;
|
|
29
|
+
const unknown = arr.filter((x) => typeof x === 'string' && !resolveResourceTypeId(x));
|
|
30
|
+
if (unknown.length) {
|
|
31
|
+
ctx.addIssue({
|
|
32
|
+
code: 'custom',
|
|
33
|
+
input: v,
|
|
34
|
+
message: `${unknown.map((x) => JSON.stringify(x.slice(0, 100))).join(', ')} ${unknown.length > 1 ? 'are not Zenodo resource type ids' : 'is not a Zenodo resource type id'}. Expected one of: ${RESOURCE_TYPE_IDS.join(', ')} (a subtype may also be written <type>::<id>, e.g. publication::publication-article). Look types up with zenodo_lookup_vocabulary (vocabulary: resource_types).`,
|
|
35
|
+
});
|
|
36
|
+
return z.NEVER;
|
|
37
|
+
}
|
|
38
|
+
return arr.map((x) => (typeof x === 'string' ? (resolveResourceTypeId(x) ?? x) : x));
|
|
39
|
+
}, z.array(z.enum(RESOURCE_TYPE_IDS)).max(10).optional());
|
|
40
|
+
/** A lone string or array of strings, blanks dropped, each value lowercased with a leading `.` stripped (`.CSV` → `csv`). */
|
|
41
|
+
const toFileTypes = (v) => {
|
|
42
|
+
const arr = toOptionalArray(v);
|
|
43
|
+
return Array.isArray(arr)
|
|
44
|
+
? arr.map((x) => (typeof x === 'string' ? x.toLowerCase().replace(/^\./, '') : x))
|
|
45
|
+
: arr;
|
|
46
|
+
};
|
|
47
|
+
const lowerBlank = (v) => {
|
|
48
|
+
const b = blankToUndefined(v);
|
|
49
|
+
return typeof b === 'string' ? b.toLowerCase() : b;
|
|
50
|
+
};
|
|
51
|
+
const orcidBlank = (v) => {
|
|
52
|
+
const b = blankToUndefined(v);
|
|
53
|
+
return typeof b === 'string' ? normalizeOrcid(b) : b;
|
|
54
|
+
};
|
|
55
|
+
const dateField = (description) => z
|
|
56
|
+
.preprocess(blankToUndefined, z
|
|
57
|
+
.string()
|
|
58
|
+
.regex(PARTIAL_DATE_PATTERN, 'Expected YYYY, YYYY-MM, or YYYY-MM-DD.')
|
|
59
|
+
.refine(isValidPartialDate, 'Not a real calendar date.')
|
|
60
|
+
.optional())
|
|
61
|
+
.describe(description);
|
|
62
|
+
const FacetSchema = z
|
|
63
|
+
.object({
|
|
64
|
+
id: z.string().describe('Facet value id; feeds the matching zenodo_search_records filter.'),
|
|
65
|
+
label: z.string().describe('Display label.'),
|
|
66
|
+
count: z.number().describe('Matching records with this value.'),
|
|
67
|
+
})
|
|
68
|
+
.describe('One facet bucket.');
|
|
69
|
+
const HitSchema = z
|
|
70
|
+
.object({
|
|
71
|
+
recid: z.string().describe('Record id of this version — pass to zenodo_get_record as id.'),
|
|
72
|
+
doi: z.string().optional().describe('DOI of this version; absent on some old records.'),
|
|
73
|
+
doi_provider: z
|
|
74
|
+
.string()
|
|
75
|
+
.optional()
|
|
76
|
+
.describe('datacite (minted by Zenodo) or external (publisher-minted).'),
|
|
77
|
+
concept_recid: z
|
|
78
|
+
.string()
|
|
79
|
+
.optional()
|
|
80
|
+
.describe('Concept record id naming the whole version series; absent if Zenodo omits it.'),
|
|
81
|
+
concept_doi: z
|
|
82
|
+
.string()
|
|
83
|
+
.optional()
|
|
84
|
+
.describe('Concept DOI of the version series; absent for external DOIs.'),
|
|
85
|
+
title: z.string().describe('Title as deposited.'),
|
|
86
|
+
publication_date: z
|
|
87
|
+
.string()
|
|
88
|
+
.optional()
|
|
89
|
+
.describe('Publication date (EDTF as given: 2026-09-11, 2020, 2020-05); absent when not recorded.'),
|
|
90
|
+
resource_type: z
|
|
91
|
+
.object({
|
|
92
|
+
id: z.string().describe('Resource type id, e.g. dataset or publication-article.'),
|
|
93
|
+
title: z.string().optional().describe('Resource type label, when Zenodo supplies one.'),
|
|
94
|
+
})
|
|
95
|
+
.optional()
|
|
96
|
+
.describe('Resource type; absent when not recorded.'),
|
|
97
|
+
version: z
|
|
98
|
+
.string()
|
|
99
|
+
.optional()
|
|
100
|
+
.describe('Version label as deposited; absent when the depositor set none.'),
|
|
101
|
+
is_latest: z
|
|
102
|
+
.boolean()
|
|
103
|
+
.optional()
|
|
104
|
+
.describe('True when this is the newest version; absent if Zenodo omits version data.'),
|
|
105
|
+
version_index: z
|
|
106
|
+
.number()
|
|
107
|
+
.optional()
|
|
108
|
+
.describe('Position of this version in its series (1 = first); absent if Zenodo omits version data.'),
|
|
109
|
+
creators: z
|
|
110
|
+
.array(z
|
|
111
|
+
.object({
|
|
112
|
+
name: z.string().describe('Creator name as deposited.'),
|
|
113
|
+
orcid: z.string().optional().describe('Creator ORCID iD, when supplied.'),
|
|
114
|
+
})
|
|
115
|
+
.describe('One creator.'))
|
|
116
|
+
.describe('First 5 creators.'),
|
|
117
|
+
creator_count: z.number().describe('Total creators.'),
|
|
118
|
+
license_ids: z
|
|
119
|
+
.array(z.string())
|
|
120
|
+
.describe('License ids (custom rights without an id are omitted; see zenodo_get_record).'),
|
|
121
|
+
access: z
|
|
122
|
+
.object({
|
|
123
|
+
status: z
|
|
124
|
+
.string()
|
|
125
|
+
.describe('open, restricted, embargoed, or metadata-only (unknown if Zenodo omits it).'),
|
|
126
|
+
files: z
|
|
127
|
+
.string()
|
|
128
|
+
.optional()
|
|
129
|
+
.describe('File access: public or restricted; absent when not reported.'),
|
|
130
|
+
embargo_until: z.string().optional().describe('Embargo end date, when active.'),
|
|
131
|
+
})
|
|
132
|
+
.describe('Access status.'),
|
|
133
|
+
communities: z.array(z.string()).describe('First 5 community slugs holding this record.'),
|
|
134
|
+
file_count: z
|
|
135
|
+
.number()
|
|
136
|
+
.optional()
|
|
137
|
+
.describe('Number of files; absent when files are restricted or embargoed.'),
|
|
138
|
+
total_bytes: z
|
|
139
|
+
.number()
|
|
140
|
+
.optional()
|
|
141
|
+
.describe('Total file size in bytes; absent when files are restricted or embargoed.'),
|
|
142
|
+
views: z
|
|
143
|
+
.number()
|
|
144
|
+
.optional()
|
|
145
|
+
.describe('Unique views across all versions; absent when Zenodo reports no usage counts.'),
|
|
146
|
+
downloads: z
|
|
147
|
+
.number()
|
|
148
|
+
.optional()
|
|
149
|
+
.describe('Unique downloads across all versions; absent when Zenodo reports no usage counts.'),
|
|
150
|
+
description_snippet: z
|
|
151
|
+
.string()
|
|
152
|
+
.optional()
|
|
153
|
+
.describe('First ~280 characters of the plain-text description; absent when the record has none.'),
|
|
154
|
+
zenodo_url: z.string().describe('Record landing page on zenodo.org.'),
|
|
155
|
+
})
|
|
156
|
+
.describe('One matching deposit.');
|
|
157
|
+
export const searchRecords = tool('zenodo_search_records', {
|
|
158
|
+
title: 'Search Zenodo records',
|
|
159
|
+
description: 'Search Zenodo\'s open research repository — datasets, software releases, publications, and other deposits — by keyword query plus filters for resource type, community, funder, grant, creator ORCID, file type, license, access status, and publication date. Returns one summary per deposit (ids, DOIs, title, type, version, creators, license, access, file totals, usage counts) plus facet counts over the full match set, every filter applied. Query terms are OR-ed unless joined with AND, quoted phrases match exactly, and field syntax works on record fields (metadata.title:"…", metadata.subjects.subject:"…"). Only the latest version of each deposit is searched unless all_versions is true, and only the first 10,000 matches are reachable by paging. Resolve community, funder, and grant names to ids with zenodo_lookup_vocabulary first; open one deposit in full with zenodo_get_record.',
|
|
160
|
+
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
161
|
+
input: z.object({
|
|
162
|
+
query: z
|
|
163
|
+
.preprocess(blankToUndefined, z.string().max(1000).optional())
|
|
164
|
+
.describe('Keyword query. Terms are OR-ed unless joined with AND; "quoted phrases" match exactly; field syntax such as metadata.title:"…" or doi:"10.5281/zenodo.N" works. Escape a literal / as \\/. A bare DOI or record URL is rejected; open it with zenodo_get_record instead. Omit to browse with filters only.'),
|
|
165
|
+
resource_type: resourceTypeInput.describe('Resource type ids, OR-ed (a single string is accepted): dataset, software, publication, publication-article, image-photo, … Any case; a subtype may also be written in the <type>::<id> form zenodo_lookup_vocabulary shows as its search value (publication::publication-article). A top-level type includes its subtypes. Look ids up with zenodo_lookup_vocabulary (vocabulary: resource_types).'),
|
|
166
|
+
community: z
|
|
167
|
+
.preprocess(blankToUndefined, z.string().max(200).optional())
|
|
168
|
+
.describe('One community: its slug, UUID, or zenodo.org/communities/<slug> URL. Find slugs with zenodo_lookup_vocabulary (vocabulary: communities).'),
|
|
169
|
+
funder: z
|
|
170
|
+
.preprocess(blankToUndefined, z.string().max(200).optional())
|
|
171
|
+
.describe('One funder: a ROR id (01cwqze88), a ROR URL, or a Crossref Funder DOI (10.13039/100000002). Resolve a funder name with zenodo_lookup_vocabulary (vocabulary: funders).'),
|
|
172
|
+
award: z
|
|
173
|
+
.preprocess(blankToUndefined, z.string().max(200).optional())
|
|
174
|
+
.describe('One grant: an award id <funder-ror>::<number> (00k4n6c32::101135562), a bare grant number, or a CORDIS award DOI (10.3030/101135562). Find ids with zenodo_lookup_vocabulary (vocabulary: awards).'),
|
|
175
|
+
creator_orcid: z
|
|
176
|
+
.preprocess(orcidBlank, z
|
|
177
|
+
.string()
|
|
178
|
+
.regex(ORCID_PATTERN, 'Expected an ORCID iD such as 0000-0002-1825-0097.')
|
|
179
|
+
.refine(isValidOrcid, 'ORCID iD check digit does not match.')
|
|
180
|
+
.optional())
|
|
181
|
+
.describe('Creator ORCID iD, e.g. 0000-0002-1825-0097; an https://orcid.org/ prefix is stripped and a trailing x uppercased.'),
|
|
182
|
+
file_type: z
|
|
183
|
+
.preprocess(toFileTypes, z
|
|
184
|
+
.array(z
|
|
185
|
+
.string()
|
|
186
|
+
.regex(/^[a-z0-9]{1,16}$/, 'Expected a file extension such as csv or zip.')
|
|
187
|
+
.describe('A file extension, e.g. csv.'))
|
|
188
|
+
.max(10)
|
|
189
|
+
.optional())
|
|
190
|
+
.describe('File extensions, OR-ed (a single string is accepted): csv, zip, pdf, … Lowercased with any leading dot stripped.'),
|
|
191
|
+
license: z
|
|
192
|
+
.preprocess(lowerBlank, z
|
|
193
|
+
.string()
|
|
194
|
+
.regex(/^[a-z0-9][a-z0-9.+-]{0,63}$/, 'Expected a license id such as cc-by-4.0 or mit.')
|
|
195
|
+
.optional())
|
|
196
|
+
.describe('License id, e.g. cc-by-4.0, cc0-1.0, mit (lowercased). Find ids with zenodo_lookup_vocabulary (vocabulary: licenses).'),
|
|
197
|
+
access_status: z
|
|
198
|
+
.preprocess(enumPreprocess(ACCESS_STATUSES), z.enum(ACCESS_STATUSES).optional())
|
|
199
|
+
.describe('Access status: open, restricted, embargoed, or metadata-only. Case, spaces, hyphens, and underscores are ignored when matching (Metadata Only reads as metadata-only).'),
|
|
200
|
+
published_from: dateField('Earliest publication date, YYYY, YYYY-MM, or YYYY-MM-DD; a partial date starts at its first day.'),
|
|
201
|
+
published_to: dateField('Latest publication date, YYYY, YYYY-MM, or YYYY-MM-DD; a partial date ends at its last day.'),
|
|
202
|
+
all_versions: z
|
|
203
|
+
.boolean()
|
|
204
|
+
.default(false)
|
|
205
|
+
.describe('Include superseded versions; by default only the latest version is searched.'),
|
|
206
|
+
sort: z
|
|
207
|
+
.preprocess(enumPreprocess(SEARCH_SORTS), z.enum(SEARCH_SORTS).optional())
|
|
208
|
+
.describe('Sort order: bestmatch, newest, oldest, mostviewed, mostdownloaded, updated-desc, updated-asc. Case, spaces, hyphens, and underscores are ignored when matching (MostViewed reads as mostviewed). Defaults to bestmatch with a query, newest without.'),
|
|
209
|
+
page: z
|
|
210
|
+
.number()
|
|
211
|
+
.int()
|
|
212
|
+
.min(1)
|
|
213
|
+
.default(1)
|
|
214
|
+
.describe('Result page, starting at 1. page × size may not exceed 10,000.'),
|
|
215
|
+
size: z.number().int().min(1).max(25).default(10).describe('Results per page (1–25).'),
|
|
216
|
+
}),
|
|
217
|
+
output: z.object({
|
|
218
|
+
total: z.number().describe('Exact number of matching records.'),
|
|
219
|
+
reachable: z.number().describe('Matches reachable by paging: min(total, 10,000).'),
|
|
220
|
+
page: z.number().describe('Page returned.'),
|
|
221
|
+
size: z.number().describe('Page size applied.'),
|
|
222
|
+
has_more: z.boolean().describe('True when another reachable page follows.'),
|
|
223
|
+
next_page: z.number().optional().describe('The next page number, when has_more.'),
|
|
224
|
+
hits: z.array(HitSchema).describe('Matching deposits on this page.'),
|
|
225
|
+
facets: z
|
|
226
|
+
.object({
|
|
227
|
+
resource_type: z
|
|
228
|
+
.array(FacetSchema.extend({
|
|
229
|
+
subtypes: z
|
|
230
|
+
.array(FacetSchema)
|
|
231
|
+
.optional()
|
|
232
|
+
.describe('Top 5 subtypes of this resource type.'),
|
|
233
|
+
}).describe('One resource type bucket.'))
|
|
234
|
+
.describe('Top 10 resource types; ids feed resource_type.'),
|
|
235
|
+
access_status: z.array(FacetSchema).describe('Access status buckets.'),
|
|
236
|
+
file_type: z.array(FacetSchema).describe('Top 10 file types; ids feed file_type.'),
|
|
237
|
+
subject: z
|
|
238
|
+
.array(z
|
|
239
|
+
.object({
|
|
240
|
+
label: z.string().describe('Subject keyword.'),
|
|
241
|
+
count: z.number().describe('Matching records with this subject.'),
|
|
242
|
+
})
|
|
243
|
+
.describe('One subject bucket.'))
|
|
244
|
+
.describe('Top 10 subjects; query them as metadata.subjects.subject:"<label>".'),
|
|
245
|
+
publication_year: z
|
|
246
|
+
.array(z
|
|
247
|
+
.object({
|
|
248
|
+
year: z.string().describe('Publication year.'),
|
|
249
|
+
count: z.number().describe('Matching records published that year.'),
|
|
250
|
+
})
|
|
251
|
+
.describe('One year bucket.'))
|
|
252
|
+
.describe('The 10 most recent publication years present.'),
|
|
253
|
+
})
|
|
254
|
+
.describe('Facet counts over the full match set (every filter applied, so they agree with total), not just this page.'),
|
|
255
|
+
}),
|
|
256
|
+
enrichment: {
|
|
257
|
+
truncated: z.boolean().describe('True when more reachable matches follow this page.'),
|
|
258
|
+
shown: z.number().describe('Hits returned on this page.'),
|
|
259
|
+
cap: z.number().describe('Page size applied.'),
|
|
260
|
+
totalCount: z.number().describe('Exact number of matching records.'),
|
|
261
|
+
effectiveQuery: z.string().optional().describe('The exact q sent to Zenodo.'),
|
|
262
|
+
appliedSort: z.enum(SEARCH_SORTS).describe('The sort order applied.'),
|
|
263
|
+
allVersions: z.boolean().describe('Whether superseded versions were searched.'),
|
|
264
|
+
notice: z
|
|
265
|
+
.string()
|
|
266
|
+
.optional()
|
|
267
|
+
.describe('Guidance on empty results, the 10,000-result window, or further pages.'),
|
|
268
|
+
},
|
|
269
|
+
errors: [
|
|
270
|
+
{
|
|
271
|
+
reason: 'query_is_identifier',
|
|
272
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
273
|
+
when: 'The query is a single DOI, doi.org URL, or zenodo.org record URL',
|
|
274
|
+
recovery: 'Pass this identifier to zenodo_get_record as id instead of searching for it.',
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
reason: 'query_syntax',
|
|
278
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
279
|
+
when: 'The query has an unpaired unescaped / outside quotes',
|
|
280
|
+
recovery: 'Escape the slash as \\/ or wrap that term in double quotes, then call zenodo_search_records again.',
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
reason: 'query_failed',
|
|
284
|
+
code: JsonRpcErrorCode.ServiceUnavailable,
|
|
285
|
+
when: 'Zenodo answered HTTP 500 for a query that passed the local checks',
|
|
286
|
+
retryable: false,
|
|
287
|
+
thrownBy: 'service',
|
|
288
|
+
recovery: 'Simplify the query (quote phrases, escape : and / with a backslash, or move identifiers into the dedicated filters) and call zenodo_search_records again; if a plain keyword query also fails, Zenodo is degraded, so retry in a few minutes.',
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
reason: 'upstream_timeout',
|
|
292
|
+
code: JsonRpcErrorCode.Timeout,
|
|
293
|
+
when: 'The search attempt got no complete response within its time budget',
|
|
294
|
+
retryable: false,
|
|
295
|
+
thrownBy: 'service',
|
|
296
|
+
recovery: 'Call zenodo_search_records again with a smaller size (5) or narrower filters so the page holds fewer large deposits.',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
reason: 'unknown_community',
|
|
300
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
301
|
+
when: 'community resolves to no Zenodo community',
|
|
302
|
+
recovery: 'Find the community’s slug with zenodo_lookup_vocabulary (vocabulary: communities), then pass it as community.',
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
reason: 'unknown_funder',
|
|
306
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
307
|
+
when: 'funder is not a known ROR id and no funder carries that Crossref Funder DOI',
|
|
308
|
+
recovery: 'Resolve the funder with zenodo_lookup_vocabulary (vocabulary: funders) and pass the returned ROR id as funder.',
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
reason: 'invalid_date_range',
|
|
312
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
313
|
+
when: 'The expanded published_from is after published_to',
|
|
314
|
+
recovery: 'Set published_from to a date on or before published_to and call zenodo_search_records again.',
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
reason: 'result_window_exceeded',
|
|
318
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
319
|
+
when: 'page × size exceeds 10,000',
|
|
320
|
+
recovery: 'Zenodo serves only the first 10,000 matches; add filters or a published_from/published_to range to zenodo_search_records instead of paging deeper.',
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
reason: 'rate_limited',
|
|
324
|
+
code: JsonRpcErrorCode.RateLimited,
|
|
325
|
+
when: "Zenodo answered HTTP 429, or this server's shared Zenodo request budget is spent for the current window",
|
|
326
|
+
retryable: true,
|
|
327
|
+
thrownBy: 'service',
|
|
328
|
+
recovery: 'Wait for the retryAfter seconds in the error data, then call zenodo_search_records again with the same arguments.',
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
async handler(input, ctx) {
|
|
332
|
+
const sort = input.sort ?? (input.query ? 'bestmatch' : 'newest');
|
|
333
|
+
ctx.enrich({
|
|
334
|
+
truncated: false,
|
|
335
|
+
shown: 0,
|
|
336
|
+
cap: input.size,
|
|
337
|
+
totalCount: 0,
|
|
338
|
+
appliedSort: sort,
|
|
339
|
+
allVersions: input.all_versions,
|
|
340
|
+
});
|
|
341
|
+
if (input.page * input.size > RESULT_WINDOW) {
|
|
342
|
+
throw ctx.fail('result_window_exceeded', `page ${input.page} × size ${input.size} is past the first ${RESULT_WINDOW.toLocaleString('en-US')} matches.`, ctx.recoveryFor('result_window_exceeded'));
|
|
343
|
+
}
|
|
344
|
+
if (input.query && isWholeIdentifier(input.query)) {
|
|
345
|
+
throw ctx.fail('query_is_identifier', `The query "${inline(input.query)}" is a record identifier, not search terms.`, ctx.recoveryFor('query_is_identifier'));
|
|
346
|
+
}
|
|
347
|
+
if (input.query && hasUnpairedSlash(input.query)) {
|
|
348
|
+
throw ctx.fail('query_syntax', 'The query has an unpaired / outside quotes, which Zenodo parses as an unterminated regular expression.', ctx.recoveryFor('query_syntax'));
|
|
349
|
+
}
|
|
350
|
+
const publishedFrom = input.published_from
|
|
351
|
+
? expandPartialDate(input.published_from, 'from')
|
|
352
|
+
: undefined;
|
|
353
|
+
const publishedTo = input.published_to
|
|
354
|
+
? expandPartialDate(input.published_to, 'to')
|
|
355
|
+
: undefined;
|
|
356
|
+
if (publishedFrom && publishedTo && publishedFrom > publishedTo) {
|
|
357
|
+
throw ctx.fail('invalid_date_range', `published_from ${publishedFrom} is after published_to ${publishedTo}.`, ctx.recoveryFor('invalid_date_range'));
|
|
358
|
+
}
|
|
359
|
+
const service = getZenodoService();
|
|
360
|
+
let communityId;
|
|
361
|
+
if (input.community) {
|
|
362
|
+
const ref = parseCommunityRef(input.community);
|
|
363
|
+
const community = ref ? await service.getCommunity(ref, ctx) : undefined;
|
|
364
|
+
if (!community) {
|
|
365
|
+
throw ctx.fail('unknown_community', `No Zenodo community matches "${inline(input.community)}" as a slug, UUID, or community URL.`, ctx.recoveryFor('unknown_community'));
|
|
366
|
+
}
|
|
367
|
+
communityId = community.uuid;
|
|
368
|
+
}
|
|
369
|
+
let funderRor;
|
|
370
|
+
if (input.funder) {
|
|
371
|
+
const ref = parseFunderRef(input.funder);
|
|
372
|
+
const funder = ref ? await service.resolveFunder(ref, ctx) : undefined;
|
|
373
|
+
if (!funder) {
|
|
374
|
+
throw ctx.fail('unknown_funder', `"${inline(input.funder)}" is not a known ROR id and no funder carries that Crossref Funder DOI.`, ctx.recoveryFor('unknown_funder'));
|
|
375
|
+
}
|
|
376
|
+
funderRor = funder.ror_id;
|
|
377
|
+
}
|
|
378
|
+
const filters = {
|
|
379
|
+
allVersions: input.all_versions,
|
|
380
|
+
page: input.page,
|
|
381
|
+
size: input.size,
|
|
382
|
+
sort,
|
|
383
|
+
...(input.query ? { query: input.query } : {}),
|
|
384
|
+
...(input.resource_type ? { resourceTypes: input.resource_type } : {}),
|
|
385
|
+
...(input.file_type ? { fileTypes: input.file_type } : {}),
|
|
386
|
+
...(input.access_status ? { accessStatus: input.access_status } : {}),
|
|
387
|
+
...(communityId ? { communityId } : {}),
|
|
388
|
+
...(funderRor ? { funderRor } : {}),
|
|
389
|
+
...(input.award ? { award: parseAwardRef(input.award) } : {}),
|
|
390
|
+
...(input.creator_orcid ? { creatorOrcid: input.creator_orcid } : {}),
|
|
391
|
+
...(input.license ? { license: input.license } : {}),
|
|
392
|
+
...(publishedFrom ? { publishedFrom } : {}),
|
|
393
|
+
...(publishedTo ? { publishedTo } : {}),
|
|
394
|
+
};
|
|
395
|
+
const result = await service.searchRecords(filters, ctx);
|
|
396
|
+
const total = result.total;
|
|
397
|
+
const reachable = Math.min(total, RESULT_WINDOW);
|
|
398
|
+
const hasMore = input.page * input.size < reachable;
|
|
399
|
+
ctx.enrich({ shown: result.hits.length });
|
|
400
|
+
ctx.enrich.total(total);
|
|
401
|
+
if (result.q)
|
|
402
|
+
ctx.enrich.echo(result.q);
|
|
403
|
+
const notice = [];
|
|
404
|
+
if (total === 0) {
|
|
405
|
+
notice.push('No records matched.');
|
|
406
|
+
const narrowing = [
|
|
407
|
+
['resource_type', input.resource_type],
|
|
408
|
+
['file_type', input.file_type],
|
|
409
|
+
['access_status', input.access_status],
|
|
410
|
+
['license', input.license],
|
|
411
|
+
]
|
|
412
|
+
.filter(([, v]) => v !== undefined)
|
|
413
|
+
.map(([name]) => name);
|
|
414
|
+
if (narrowing.length) {
|
|
415
|
+
notice.push(narrowing.length === 1
|
|
416
|
+
? `The ${narrowing[0]} filter narrows the set; drop it and call zenodo_search_records again.`
|
|
417
|
+
: `The ${narrowing.join(', ')} filters narrow the set; drop one and call zenodo_search_records again.`);
|
|
418
|
+
}
|
|
419
|
+
const ids = [
|
|
420
|
+
['community', input.community],
|
|
421
|
+
['funder', input.funder],
|
|
422
|
+
['award', input.award],
|
|
423
|
+
]
|
|
424
|
+
.filter(([, v]) => v !== undefined)
|
|
425
|
+
.map(([name]) => name);
|
|
426
|
+
if (ids.length) {
|
|
427
|
+
notice.push(`Check the ${ids.join(', ')} id${ids.length > 1 ? 's' : ''} with zenodo_lookup_vocabulary.`);
|
|
428
|
+
}
|
|
429
|
+
if (!input.all_versions) {
|
|
430
|
+
notice.push('Only the latest version of each deposit is searched; set all_versions to true to include superseded versions.');
|
|
431
|
+
}
|
|
432
|
+
if (input.query && /\bAND\b|"/.test(input.query)) {
|
|
433
|
+
notice.push('Terms joined by AND must all match and quoted phrases must match exactly; loosen the query.');
|
|
434
|
+
}
|
|
435
|
+
if (input.published_from || input.published_to) {
|
|
436
|
+
notice.push('Widen or drop published_from/published_to.');
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
else if (result.hits.length === 0) {
|
|
440
|
+
const last = Math.max(1, Math.ceil(reachable / input.size));
|
|
441
|
+
notice.push(`Page ${input.page} is past the last page (${last}); call again with page ${last} or lower.`);
|
|
442
|
+
}
|
|
443
|
+
if (total > RESULT_WINDOW) {
|
|
444
|
+
notice.push(`Only the first 10,000 of ${total.toLocaleString('en-US')} matches are reachable; add filters or a date range, or change sort.`);
|
|
445
|
+
}
|
|
446
|
+
if (hasMore) {
|
|
447
|
+
notice.push(`Showing ${result.hits.length} of ${reachable.toLocaleString('en-US')}; call again with page ${input.page + 1}.`);
|
|
448
|
+
ctx.enrich.truncated({
|
|
449
|
+
shown: result.hits.length,
|
|
450
|
+
cap: input.size,
|
|
451
|
+
guidance: notice.join(' '),
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
else if (notice.length) {
|
|
455
|
+
ctx.enrich.notice(notice.join(' '));
|
|
456
|
+
}
|
|
457
|
+
return {
|
|
458
|
+
total,
|
|
459
|
+
reachable,
|
|
460
|
+
page: input.page,
|
|
461
|
+
size: input.size,
|
|
462
|
+
has_more: hasMore,
|
|
463
|
+
...(hasMore ? { next_page: input.page + 1 } : {}),
|
|
464
|
+
hits: result.hits,
|
|
465
|
+
facets: result.facets,
|
|
466
|
+
};
|
|
467
|
+
},
|
|
468
|
+
format: (result) => {
|
|
469
|
+
const lines = [
|
|
470
|
+
`## Zenodo search: ${result.total} matches (${result.reachable} reachable)`,
|
|
471
|
+
`**Page:** ${result.page} | **Size:** ${result.size} | **Has more:** ${result.has_more}${result.next_page !== undefined ? ` | **Next page:** ${result.next_page}` : ''}`,
|
|
472
|
+
];
|
|
473
|
+
for (const h of result.hits) {
|
|
474
|
+
lines.push('', `### ${inline(h.title)}`);
|
|
475
|
+
lines.push(`**Record:** ${h.recid}${h.concept_recid ? ` | **Concept record:** ${h.concept_recid}` : ''} | **URL:** ${h.zenodo_url}`);
|
|
476
|
+
const ids = [
|
|
477
|
+
h.doi
|
|
478
|
+
? `**DOI:** ${inline(h.doi)}${h.doi_provider ? ` (${inline(h.doi_provider)})` : ''}`
|
|
479
|
+
: undefined,
|
|
480
|
+
h.concept_doi ? `**Concept DOI:** ${inline(h.concept_doi)}` : undefined,
|
|
481
|
+
].filter(Boolean);
|
|
482
|
+
if (ids.length)
|
|
483
|
+
lines.push(ids.join(' | '));
|
|
484
|
+
const facts = [
|
|
485
|
+
h.resource_type
|
|
486
|
+
? `**Type:** ${h.resource_type.title ? `${inline(h.resource_type.title)} ` : ''}(${inline(h.resource_type.id)})`
|
|
487
|
+
: undefined,
|
|
488
|
+
h.publication_date ? `**Published:** ${inline(h.publication_date)}` : undefined,
|
|
489
|
+
h.version ? `**Version:** ${inline(h.version)}` : undefined,
|
|
490
|
+
h.version_index !== undefined ? `**Version index:** ${h.version_index}` : undefined,
|
|
491
|
+
h.is_latest !== undefined ? `**Latest:** ${h.is_latest}` : undefined,
|
|
492
|
+
].filter(Boolean);
|
|
493
|
+
if (facts.length)
|
|
494
|
+
lines.push(facts.join(' | '));
|
|
495
|
+
const creators = h.creators
|
|
496
|
+
.map((c) => `${inline(c.name)}${c.orcid ? ` (ORCID ${inline(c.orcid)})` : ''}`)
|
|
497
|
+
.join('; ');
|
|
498
|
+
lines.push(`**Creators (${h.creator_count}):** ${creators || 'none listed'}${h.creator_count > h.creators.length ? '; …' : ''}`);
|
|
499
|
+
lines.push(`**Access:** ${inline(h.access.status)}${h.access.files ? `, files ${inline(h.access.files)}` : ''}${h.access.embargo_until ? `, embargoed until ${inline(h.access.embargo_until)}` : ''} | **Licenses:** ${h.license_ids.length ? h.license_ids.map(inline).join(', ') : 'none with an id'}`);
|
|
500
|
+
lines.push(`**Files:** ${h.file_count ?? 'not disclosed'} (${h.total_bytes ?? 'not disclosed'} bytes) | **Views:** ${h.views ?? 'not available'} | **Downloads:** ${h.downloads ?? 'not available'}`);
|
|
501
|
+
if (h.communities.length)
|
|
502
|
+
lines.push(`**Communities:** ${h.communities.map(inline).join(', ')}`);
|
|
503
|
+
if (h.description_snippet)
|
|
504
|
+
lines.push(`**Snippet:** ${inline(h.description_snippet)}`);
|
|
505
|
+
}
|
|
506
|
+
const f = result.facets;
|
|
507
|
+
const bucketList = (buckets) => buckets.map((b) => `${inline(b.label)} \`${inline(b.id)}\` (${b.count})`).join('; ');
|
|
508
|
+
const facetsHeading = '### Facets (full match set, every filter applied)';
|
|
509
|
+
lines.push('', facetsHeading);
|
|
510
|
+
if (f.resource_type.length) {
|
|
511
|
+
lines.push('**Resource types:**');
|
|
512
|
+
for (const b of f.resource_type) {
|
|
513
|
+
lines.push(`- ${inline(b.label)} \`${inline(b.id)}\` (${b.count})${b.subtypes?.length ? ` — ${bucketList(b.subtypes)}` : ''}`);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
if (f.access_status.length)
|
|
517
|
+
lines.push(`**Access status:** ${bucketList(f.access_status)}`);
|
|
518
|
+
if (f.file_type.length)
|
|
519
|
+
lines.push(`**File types:** ${bucketList(f.file_type)}`);
|
|
520
|
+
if (f.subject.length) {
|
|
521
|
+
lines.push(`**Subjects:** ${f.subject.map((s) => `${inline(s.label)} (${s.count})`).join('; ')}`);
|
|
522
|
+
}
|
|
523
|
+
if (f.publication_year.length) {
|
|
524
|
+
lines.push(`**Publication years:** ${f.publication_year.map((y) => `${inline(y.year)} (${y.count})`).join('; ')}`);
|
|
525
|
+
}
|
|
526
|
+
if (lines.at(-1) === facetsHeading)
|
|
527
|
+
lines.push('No facet counts (nothing matched).');
|
|
528
|
+
return [{ type: 'text', text: lines.join('\n') }];
|
|
529
|
+
},
|
|
530
|
+
});
|
|
531
|
+
//# sourceMappingURL=search-records.tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-records.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-records.tool.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,YAAY,GAEb,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEzF,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,MAAM,oBAAoB,GAAG,qDAAqD,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;IAChD,MAAM,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC;IAC/B,IAAI,CAAC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QACD,IAAI,CAAC,CAAC,gBAAgB,CAAC,MAAM,EAAE,CAAC;YAC9B,KAAK,CAAC,IAAI,CACR,0BAA0B,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvG,CAAC;QACJ,CAAC;QACD,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,aAAa;YAAE,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAC;QACrF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The `found: false` outcome zenodo_get_record and zenodo_list_versions
|
|
3
|
+
* share: the removal-tombstone schema and the `miss_kind` + guidance for each way an
|
|
4
|
+
* id can fail to resolve, so both tools describe a miss identically.
|
|
5
|
+
* @module mcp-server/tools/record-miss
|
|
6
|
+
*/
|
|
7
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
8
|
+
import type { RecordLookup } from '../../services/zenodo/types.js';
|
|
9
|
+
/** Output schema of a deleted record's removal tombstone. */
|
|
10
|
+
export declare const TombstoneSchema: z.ZodObject<{
|
|
11
|
+
removal_date: z.ZodOptional<z.ZodString>;
|
|
12
|
+
removal_reason: z.ZodOptional<z.ZodString>;
|
|
13
|
+
note: z.ZodOptional<z.ZodString>;
|
|
14
|
+
citation_text: z.ZodOptional<z.ZodString>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
/** `miss_kind`, guidance, and (for a deleted record) the tombstone of a record GET that found nothing. */
|
|
17
|
+
export declare function recordMiss(recid: string, lookup: Exclude<RecordLookup, {
|
|
18
|
+
status: 'found';
|
|
19
|
+
}>): {
|
|
20
|
+
miss_kind: 'not_found';
|
|
21
|
+
guidance: string;
|
|
22
|
+
tombstone?: never;
|
|
23
|
+
} | {
|
|
24
|
+
miss_kind: 'deleted';
|
|
25
|
+
guidance: string;
|
|
26
|
+
tombstone: import("../../services/zenodo/types.js").Tombstone;
|
|
27
|
+
} | {
|
|
28
|
+
tombstone?: never;
|
|
29
|
+
miss_kind: 'restricted';
|
|
30
|
+
guidance: string;
|
|
31
|
+
};
|
|
32
|
+
/** `miss_kind` and guidance for a non-Zenodo DOI that no Zenodo record carries. */
|
|
33
|
+
export declare function notOnZenodoMiss(doi: string): {
|
|
34
|
+
miss_kind: 'not_on_zenodo';
|
|
35
|
+
guidance: string;
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=record-miss.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-miss.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/tools/record-miss.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE/D,6DAA6D;AAC7D,eAAO,MAAM,eAAe;;;;;iBAYyB,CAAC;AAEtD,0GAA0G;AAC1G,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAC;eAIzE,WAAW;;;;eAOX,SAAS;;;;;eAOT,YAAY;;EAI9B;AAED,mFAAmF;AACnF,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM;IAEvC,SAAS,EAAE,eAAe;IAC1B,QAAQ;EAEX"}
|