@cyanheads/openalex-mcp-server 0.10.0 → 0.11.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/AGENTS.md +30 -15
- package/CLAUDE.md +30 -15
- package/Dockerfile +6 -0
- package/README.md +55 -116
- package/changelog/0.10.x/0.10.1.md +28 -0
- package/changelog/0.11.x/0.11.0.md +41 -0
- package/dist/config/server-config.d.ts.map +1 -1
- package/dist/config/server-config.js +1 -1
- package/dist/config/server-config.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp-server/prompts/definitions/literature-review.prompt.js +1 -1
- package/dist/mcp-server/prompts/definitions/research-landscape.prompt.js +1 -1
- package/dist/mcp-server/tools/definitions/analyze-trends.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/analyze-trends.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/analyze-trends.tool.js +10 -5
- package/dist/mcp-server/tools/definitions/analyze-trends.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/citation-graph.tool.d.ts +6 -9
- package/dist/mcp-server/tools/definitions/citation-graph.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/citation-graph.tool.js +43 -33
- package/dist/mcp-server/tools/definitions/citation-graph.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/describe-fields.tool.d.ts +1 -0
- package/dist/mcp-server/tools/definitions/describe-fields.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/describe-fields.tool.js +25 -1
- package/dist/mcp-server/tools/definitions/describe-fields.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/resolve-name.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/resolve-name.tool.js +44 -16
- package/dist/mcp-server/tools/definitions/resolve-name.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts +22 -18
- package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/search-entities.tool.js +194 -85
- package/dist/mcp-server/tools/definitions/search-entities.tool.js.map +1 -1
- package/dist/mcp-server/tools/escape-markdown.d.ts +26 -11
- package/dist/mcp-server/tools/escape-markdown.d.ts.map +1 -1
- package/dist/mcp-server/tools/escape-markdown.js +95 -26
- package/dist/mcp-server/tools/escape-markdown.js.map +1 -1
- package/dist/mcp-server/tools/page-size.d.ts +38 -7
- package/dist/mcp-server/tools/page-size.d.ts.map +1 -1
- package/dist/mcp-server/tools/page-size.js +37 -11
- package/dist/mcp-server/tools/page-size.js.map +1 -1
- package/dist/mcp-server/tools/record-page.d.ts +174 -0
- package/dist/mcp-server/tools/record-page.d.ts.map +1 -0
- package/dist/mcp-server/tools/record-page.js +392 -0
- package/dist/mcp-server/tools/record-page.js.map +1 -0
- package/dist/mcp-server/tools/render-entity-record.d.ts +3 -1
- package/dist/mcp-server/tools/render-entity-record.d.ts.map +1 -1
- package/dist/mcp-server/tools/render-entity-record.js +7 -2
- package/dist/mcp-server/tools/render-entity-record.js.map +1 -1
- package/dist/services/openalex/field-catalog.json +107 -0
- package/dist/services/openalex/openalex-service.d.ts +18 -7
- package/dist/services/openalex/openalex-service.d.ts.map +1 -1
- package/dist/services/openalex/openalex-service.js +84 -63
- package/dist/services/openalex/openalex-service.js.map +1 -1
- package/dist/services/openalex/types.d.ts +13 -2
- package/dist/services/openalex/types.d.ts.map +1 -1
- package/dist/services/openalex/types.js +28 -1
- package/dist/services/openalex/types.js.map +1 -1
- package/package.json +7 -6
- package/server.json +5 -5
- package/skills/openalex-guide/SKILL.md +77 -0
- package/dist/mcp-server/tools/response-budget.d.ts +0 -159
- package/dist/mcp-server/tools/response-budget.d.ts.map +0 -1
- package/dist/mcp-server/tools/response-budget.js +0 -509
- package/dist/mcp-server/tools/response-budget.js.map +0 -1
|
@@ -26,13 +26,6 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
|
|
|
26
26
|
id: z.ZodString;
|
|
27
27
|
display_name: z.ZodNullable<z.ZodString>;
|
|
28
28
|
}, z.core.$loose>>;
|
|
29
|
-
omitted: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
ids: z.ZodArray<z.ZodString>;
|
|
31
|
-
next: z.ZodObject<{
|
|
32
|
-
tool: z.ZodLiteral<"openalex_search_entities">;
|
|
33
|
-
arguments: z.ZodObject<{}, z.core.$loose>;
|
|
34
|
-
}, z.core.$strip>;
|
|
35
|
-
}, z.core.$strip>>;
|
|
36
29
|
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
37
30
|
id: z.ZodString;
|
|
38
31
|
field: z.ZodString;
|
|
@@ -45,7 +38,6 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
|
|
|
45
38
|
arguments: z.ZodObject<{}, z.core.$loose>;
|
|
46
39
|
}, z.core.$strip>>;
|
|
47
40
|
}, z.core.$strip>>>;
|
|
48
|
-
over_budget: z.ZodOptional<z.ZodBoolean>;
|
|
49
41
|
}, z.core.$strip>, readonly [{
|
|
50
42
|
readonly reason: "unmatched_quote_in_filter_value";
|
|
51
43
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -155,7 +147,7 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
|
|
|
155
147
|
}, {
|
|
156
148
|
readonly reason: "id_type_mismatch";
|
|
157
149
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
158
|
-
readonly when: "seed_id is a native OpenAlex ID of another entity type — an author, source, institution, topic, publisher, funder, or concept ID rather than a work ID.";
|
|
150
|
+
readonly when: "seed_id is a native OpenAlex ID of another entity type — an author, source, institution, topic, publisher, funder, award, or concept ID rather than a work ID.";
|
|
159
151
|
readonly recovery: "seed_id must identify a work — pass the work's OpenAlex ID (W…), DOI, or PMID. To walk the works of an author or other entity, list them first with openalex_search_entities filters.";
|
|
160
152
|
readonly thrownBy: "service";
|
|
161
153
|
}, {
|
|
@@ -169,6 +161,11 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
|
|
|
169
161
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
170
162
|
readonly when: "OpenAlex has no work matching the seed_id.";
|
|
171
163
|
readonly recovery: "Verify seed_id with openalex_resolve_name, or pass a known OpenAlex work ID (W…), DOI, or PMID. OpenAlex indexes no PMCIDs, so convert a PMCID to a PMID or DOI before passing it.";
|
|
164
|
+
}, {
|
|
165
|
+
readonly reason: "response_too_large";
|
|
166
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
167
|
+
readonly when: "The response's structuredContent or content[] text would exceed 8,000,000 bytes — a wide `select` on a large page. A page is never shortened to fit.";
|
|
168
|
+
readonly recovery: "Rerun with the per_page the error names when it names one, or narrow `select` to the fields you need; if one work alone is too large, fetch it by `id` with openalex_search_entities and page its largest array with `slice`.";
|
|
172
169
|
}], {
|
|
173
170
|
readonly echo: z.ZodString;
|
|
174
171
|
readonly totalCount: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citation-graph.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2CjE,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"citation-graph.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2CjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAka/B,CAAC"}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
6
6
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
7
|
+
import { escapeMarkdown } from '../escape-markdown.js';
|
|
7
8
|
import { clampPageSize, pageSizeSchema } from '../page-size.js';
|
|
9
|
+
import { buildRecordPage, formatRecordPage, windowsOutputSchema, } from '../record-page.js';
|
|
8
10
|
import { renderBudgetTrailer } from '../render-budget.js';
|
|
9
|
-
import { fitRecordsToBudget, formatRecordPage, joinNotices, measurePageFrame, omittedOutputSchema, overBudgetOutputSchema, windowsOutputSchema, } from '../response-budget.js';
|
|
10
11
|
import { quoteCallerText } from '../../../services/openalex/filter-values.js';
|
|
11
12
|
import { buildSearchFilter, getOpenAlexService, translateFilterKey, } from '../../../services/openalex/openalex-service.js';
|
|
12
13
|
const OPENALEX_URL_PREFIX = 'https://openalex.org/';
|
|
@@ -14,7 +15,10 @@ const OPENALEX_URL_PREFIX = 'https://openalex.org/';
|
|
|
14
15
|
const EDGE_NOUN = 'edge(s)';
|
|
15
16
|
const DIRECTIONS = ['cites', 'cited_by', 'related_to'];
|
|
16
17
|
const RESERVED_FILTER_KEYS = new Set(DIRECTIONS);
|
|
17
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* The request as one line: caller text is JSON-encoded, so a line break in it stays escaped.
|
|
20
|
+
* Raw, as the `echo` field carries it; a notice repeating it escapes it for Markdown.
|
|
21
|
+
*/
|
|
18
22
|
function buildCitationEcho(input) {
|
|
19
23
|
const parts = [`seed_id=${JSON.stringify(input.seed_id)}`, `direction=${input.direction}`];
|
|
20
24
|
if (input.filters && Object.keys(input.filters).length > 0) {
|
|
@@ -25,7 +29,7 @@ function buildCitationEcho(input) {
|
|
|
25
29
|
return parts.join(' | ');
|
|
26
30
|
}
|
|
27
31
|
export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
28
|
-
description: "Walk the citation graph one hop from a seed work. Direction picks the edge: incoming citations (`cites`), the seed's own references (`cited_by`), or OpenAlex's algorithmically-related works (`related_to`). Note: `direction` follows OpenAlex's filter convention, which inverts the common English reading — `cites` returns works that cite the seed; `cited_by` returns works the seed cites. Results use the works schema; combine with filters/sort to narrow further.
|
|
32
|
+
description: "Walk the citation graph one hop from a seed work. Direction picks the edge: incoming citations (`cites`), the seed's own references (`cited_by`), or OpenAlex's algorithmically-related works (`related_to`). Note: `direction` follows OpenAlex's filter convention, which inverts the common English reading — `cites` returns works that cite the seed; `cited_by` returns works the seed cites. Results use the works schema; combine with filters/sort to narrow further. A page holds `per_page` works and `next_cursor` continues it.",
|
|
29
33
|
sourceUrl: 'https://github.com/cyanheads/openalex-mcp-server/blob/main/src/mcp-server/tools/definitions/citation-graph.tool.ts',
|
|
30
34
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
31
35
|
errors: [
|
|
@@ -155,7 +159,7 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
155
159
|
{
|
|
156
160
|
reason: 'id_type_mismatch',
|
|
157
161
|
code: JsonRpcErrorCode.ValidationError,
|
|
158
|
-
when: 'seed_id is a native OpenAlex ID of another entity type — an author, source, institution, topic, publisher, funder, or concept ID rather than a work ID.',
|
|
162
|
+
when: 'seed_id is a native OpenAlex ID of another entity type — an author, source, institution, topic, publisher, funder, award, or concept ID rather than a work ID.',
|
|
159
163
|
recovery: "seed_id must identify a work — pass the work's OpenAlex ID (W…), DOI, or PMID. To walk the works of an author or other entity, list them first with openalex_search_entities filters.",
|
|
160
164
|
thrownBy: 'service',
|
|
161
165
|
},
|
|
@@ -172,6 +176,12 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
172
176
|
when: 'OpenAlex has no work matching the seed_id.',
|
|
173
177
|
recovery: 'Verify seed_id with openalex_resolve_name, or pass a known OpenAlex work ID (W…), DOI, or PMID. OpenAlex indexes no PMCIDs, so convert a PMCID to a PMID or DOI before passing it.',
|
|
174
178
|
},
|
|
179
|
+
{
|
|
180
|
+
reason: 'response_too_large',
|
|
181
|
+
code: JsonRpcErrorCode.ValidationError,
|
|
182
|
+
when: "The response's structuredContent or content[] text would exceed 8,000,000 bytes — a wide `select` on a large page. A page is never shortened to fit.",
|
|
183
|
+
recovery: 'Rerun with the per_page the error names when it names one, or narrow `select` to the fields you need; if one work alone is too large, fetch it by `id` with openalex_search_entities and page its largest array with `slice`.',
|
|
184
|
+
},
|
|
175
185
|
],
|
|
176
186
|
inputAliases: { filter: 'filters' },
|
|
177
187
|
input: z.object({
|
|
@@ -193,10 +203,10 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
193
203
|
select: z
|
|
194
204
|
.array(z.string())
|
|
195
205
|
.optional()
|
|
196
|
-
.describe('OpenAlex work field names to return. Always returned: id, display_name. Defaults to the curated works select if omitted. `author_list` returns each author in authorship order as `{id, display_name, orcid}` (`orcid` null when absent), a compact alternative to `authorships`, which also carries institutions and affiliations; neither the default nor `["*"]` includes it.
|
|
206
|
+
.describe('OpenAlex work field names to return. Always returned: id, display_name. Defaults to the curated works select if omitted. `author_list` returns each author in authorship order as `{id, display_name, orcid}` (`orcid` null when absent), a compact alternative to `authorships`, which also carries institutions and affiliations; neither the default nor `["*"]` includes it. A wide projection on a large page makes a large response, so name the fields you need.'),
|
|
197
207
|
per_page: pageSizeSchema(100)
|
|
198
208
|
.default(25)
|
|
199
|
-
.describe('Results per page. Default 25;
|
|
209
|
+
.describe('Results per page. Default 25; a larger value returns at most 100 and says so (rejected instead on a server set to OPENALEX_CLAMP_PER_PAGE=false).'),
|
|
200
210
|
cursor: z
|
|
201
211
|
.string()
|
|
202
212
|
.min(1)
|
|
@@ -211,11 +221,11 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
211
221
|
.describe('Total edges from seed_id in this direction (across all pages).'),
|
|
212
222
|
per_page: z
|
|
213
223
|
.number()
|
|
214
|
-
.describe('Page size OpenAlex echoed for this request — the applied per_page after clamping, not the number of records returned. A short or exhausted page carries fewer records than this
|
|
224
|
+
.describe('Page size OpenAlex echoed for this request — the applied per_page after clamping, not the number of records returned. A short or exhausted page carries fewer records than this.'),
|
|
215
225
|
next_cursor: z
|
|
216
226
|
.string()
|
|
217
227
|
.nullable()
|
|
218
|
-
.describe('Cursor for next page
|
|
228
|
+
.describe('Cursor for the next page; pass it back unchanged as `cursor`. null when no further page exists, except on a final page that exactly fills `per_page`: OpenAlex still returns a cursor there, and it leads to an empty page.'),
|
|
219
229
|
})
|
|
220
230
|
.describe('Result metadata including pagination.'),
|
|
221
231
|
results: z
|
|
@@ -229,10 +239,8 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
229
239
|
})
|
|
230
240
|
.loose()
|
|
231
241
|
.describe('A single OpenAlex work record on the citation graph. Additional fields vary by `select`.'))
|
|
232
|
-
.describe('Works on the citation graph in this direction. Text values are plain text — HTML entities decoded, HTML/JATS/MathML markup removed — except identifier and URL fields such as `id`, `doi`, `ids`, and `*_url`, returned exactly as OpenAlex stores them; an abstract arrives reconstructed as `abstract`, and a selected `author_list` as one `{id, display_name, orcid}` entry per author.
|
|
233
|
-
omitted: omittedOutputSchema,
|
|
242
|
+
.describe('Works on the citation graph in this direction. Text values are plain text — HTML entities decoded, HTML/JATS/MathML markup removed — except identifier and URL fields such as `id`, `doi`, `ids`, and `*_url`, returned exactly as OpenAlex stores them; an abstract arrives reconstructed as `abstract`, and a selected `author_list` as one `{id, display_name, orcid}` entry per author. Possibly capped author arrays are in `windows`.'),
|
|
234
243
|
windows: windowsOutputSchema,
|
|
235
|
-
over_budget: overBudgetOutputSchema,
|
|
236
244
|
}),
|
|
237
245
|
// Agent-facing context for the success path — the query as parsed (seed + direction),
|
|
238
246
|
// the total edge count, and recovery guidance for empty traversals. Populated via
|
|
@@ -245,7 +253,7 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
245
253
|
notice: z
|
|
246
254
|
.string()
|
|
247
255
|
.optional()
|
|
248
|
-
.describe('Guidance notice. Set when per_page was clamped (requested and applied sizes), when no edges are returned — a first call suggests verifying the seed_id, broadening filters, or trying a different direction; a cursor continuation says the walk is already past its last edge —
|
|
256
|
+
.describe('Guidance notice. Set when per_page was clamped (requested and applied sizes), when no edges are returned — a first call suggests verifying the seed_id, broadening filters, or trying a different direction; a cursor continuation says the walk is already past its last edge — and when a work carries exactly 100 authorships or author_list entries (possibly capped). Absent otherwise.'),
|
|
249
257
|
budget: z
|
|
250
258
|
.object({
|
|
251
259
|
costUsd: z
|
|
@@ -321,33 +329,35 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
|
|
|
321
329
|
const echo = buildCitationEcho(input);
|
|
322
330
|
ctx.enrich({ echo, totalCount: result.meta.count });
|
|
323
331
|
// An empty page on a `cursor` continuation means the walk already returned every edge it
|
|
324
|
-
// had, so the verify-the-seed advice would send the caller after a seed that is fine.
|
|
332
|
+
// had, so the verify-the-seed advice would send the caller after a seed that is fine. A
|
|
333
|
+
// notice is authored Markdown, so the caller text the echo repeats is escaped in it.
|
|
325
334
|
const emptyNotice = result.results.length > 0
|
|
326
335
|
? undefined
|
|
327
336
|
: input.cursor === undefined
|
|
328
|
-
? `No edges for ${echo}. Verify the seed_id with openalex_resolve_name, broaden filters, or try a different direction.`
|
|
329
|
-
: `Pagination exhausted for ${echo} — the previous page held the last edge, so this one came back empty. Stop paging rather than broadening filters or changing direction.`;
|
|
330
|
-
const
|
|
331
|
-
count: result.meta.count,
|
|
332
|
-
per_page: result.meta.per_page,
|
|
333
|
-
next_cursor: result.meta.next_cursor,
|
|
334
|
-
};
|
|
335
|
-
const page = fitRecordsToBudget({
|
|
336
|
-
records: result.results,
|
|
337
|
+
? `No edges for ${escapeMarkdown(echo)}. Verify the seed_id with openalex_resolve_name, broaden filters, or try a different direction.`
|
|
338
|
+
: `Pagination exhausted for ${escapeMarkdown(echo)} — the previous page held the last edge, so this one came back empty. Stop paging rather than broadening filters or changing direction.`;
|
|
339
|
+
const outcome = buildRecordPage({
|
|
337
340
|
entityType: 'works',
|
|
341
|
+
meta: {
|
|
342
|
+
count: result.meta.count,
|
|
343
|
+
per_page: result.meta.per_page,
|
|
344
|
+
next_cursor: result.meta.next_cursor,
|
|
345
|
+
},
|
|
346
|
+
noun: EDGE_NOUN,
|
|
347
|
+
echo,
|
|
348
|
+
totalCount: result.meta.count,
|
|
349
|
+
totalLabel: 'Total Edges',
|
|
350
|
+
notices: [pageSize.notice, emptyNotice],
|
|
351
|
+
records: result.results,
|
|
338
352
|
path: 'list',
|
|
339
|
-
|
|
340
|
-
measureFrame: (disclosure, budgetNotice) => measurePageFrame({ meta, results: [], ...disclosure }, EDGE_NOUN, {
|
|
341
|
-
echo,
|
|
342
|
-
totalCount: result.meta.count,
|
|
343
|
-
totalLabel: 'Total Edges',
|
|
344
|
-
notice: joinNotices([pageSize.notice, emptyNotice, budgetNotice]),
|
|
345
|
-
}),
|
|
353
|
+
continuation: 'cursor',
|
|
346
354
|
});
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
355
|
+
if (outcome.kind === 'too_large') {
|
|
356
|
+
throw ctx.fail('response_too_large', outcome.message, outcome.data);
|
|
357
|
+
}
|
|
358
|
+
if (outcome.notice)
|
|
359
|
+
ctx.enrich.notice(outcome.notice);
|
|
360
|
+
return outcome.page;
|
|
351
361
|
},
|
|
352
362
|
format: (result) => formatRecordPage(result, EDGE_NOUN),
|
|
353
363
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"citation-graph.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"citation-graph.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AAEjD,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AACpD,wDAAwD;AACxD,MAAM,SAAS,GAAG,SAAS,CAAC;AAE5B,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAU,CAAC;AAGhE,MAAM,oBAAoB,GAAwB,IAAI,GAAG,CAAS,UAAU,CAAC,CAAC;AAE9E;;;GAGG;AACH,SAAS,iBAAiB,CAAC,KAK1B;IACC,MAAM,KAAK,GAAG,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE,aAAa,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC;IAC3F,IAAI,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CA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IAAI,CAAC;IACtB,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,gBAAgB,CAAC,MAAM,EAAE,SAAS,CAAC;CACxD,CAAC,CAAC"}
|
|
@@ -6,6 +6,7 @@ import { z } from '@cyanheads/mcp-ts-core';
|
|
|
6
6
|
export declare const describeFieldsTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
7
7
|
entity_type: z.ZodEnum<{
|
|
8
8
|
authors: "authors";
|
|
9
|
+
awards: "awards";
|
|
9
10
|
funders: "funders";
|
|
10
11
|
institutions: "institutions";
|
|
11
12
|
keywords: "keywords";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-fields.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/describe-fields.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"describe-fields.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/describe-fields.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAiKjD,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;wCAqE7B,CAAC"}
|
|
@@ -38,6 +38,11 @@ const NON_GROUPABLE_DATE_FIELDS = new Set([
|
|
|
38
38
|
* institutions' own `geo.city` groups while works' `authorships.institutions.geo.city` does not.
|
|
39
39
|
* Probe each new field after regenerating the field catalog; the generator rewrites only the JSON,
|
|
40
40
|
* so these exclusions survive it.
|
|
41
|
+
*
|
|
42
|
+
* The 2026-10-28 regeneration added awards, whose 56 non-search filter fields were swept the same
|
|
43
|
+
* way, and two institutions count fields, each grouped once. Sources' `is_in_jstage` matches the
|
|
44
|
+
* filter it names but answers "Cannot group by is_in_jstage: OpenAlex doesn't record which sources
|
|
45
|
+
* are in J-STAGE."
|
|
41
46
|
*/
|
|
42
47
|
const GROUP_BY_REJECTED_FIELDS = {
|
|
43
48
|
works: new Set([
|
|
@@ -87,17 +92,31 @@ const GROUP_BY_REJECTED_FIELDS = {
|
|
|
87
92
|
'ids.mag',
|
|
88
93
|
'is_high_oa_rate_since_year',
|
|
89
94
|
'is_in_doaj_since_year',
|
|
95
|
+
'is_in_jstage',
|
|
90
96
|
'is_in_jstage_since_year',
|
|
91
97
|
'last_publication_year',
|
|
92
98
|
'oa_flip_year',
|
|
93
99
|
// looked up from a related entity at query time (2026-10-18)
|
|
94
100
|
'host_organization.country_code',
|
|
95
101
|
]),
|
|
96
|
-
institutions: new Set([
|
|
102
|
+
institutions: new Set([
|
|
103
|
+
'display_name',
|
|
104
|
+
'works_count_with_children',
|
|
105
|
+
'works_count_with_children_and_predecessors',
|
|
106
|
+
]),
|
|
97
107
|
topics: new Set(['display_name']),
|
|
98
108
|
keywords: new Set(['display_name']),
|
|
99
109
|
publishers: new Set(['display_name']),
|
|
100
110
|
funders: new Set(['display_name']),
|
|
111
|
+
awards: new Set([
|
|
112
|
+
'amount',
|
|
113
|
+
'amount_usd',
|
|
114
|
+
'doi',
|
|
115
|
+
'funded_outputs_count',
|
|
116
|
+
'sub_awards_count',
|
|
117
|
+
// looked up from a related entity at query time
|
|
118
|
+
'funder.country_code',
|
|
119
|
+
]),
|
|
101
120
|
};
|
|
102
121
|
/**
|
|
103
122
|
* Fields OpenAlex lists as valid filters but answers with an HTTP 500 on every group_by attempt
|
|
@@ -116,6 +135,11 @@ const GROUP_BY_UPSTREAM_FAILURES = {
|
|
|
116
135
|
'primary_location.raw_type',
|
|
117
136
|
]),
|
|
118
137
|
sources: new Set(['is_preprint_repository']),
|
|
138
|
+
awards: new Set([
|
|
139
|
+
'lead_investigator.affiliation.name',
|
|
140
|
+
'lead_investigator.family_name',
|
|
141
|
+
'lead_investigator.given_name',
|
|
142
|
+
]),
|
|
119
143
|
};
|
|
120
144
|
/**
|
|
121
145
|
* Whether a filter field of `entityType` is also a valid group_by target. group_by is a subset of
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"describe-fields.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/describe-fields.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAmB,MAAM,8BAA8B,CAAC;AAE7E,mFAAmF;AACnF,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAG3D,+FAA+F;AAC/F,SAAS,cAAc,CAAC,OAAqB;IAC3C,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;AACpD,CAAC;AAED,wGAAwG;AACxG,MAAM,yBAAyB,GAAwB,IAAI,GAAG,CAAC;IAC7D,kBAAkB;IAClB,cAAc;IACd,cAAc;CACf,CAAC,CAAC;AAEH
|
|
1
|
+
{"version":3,"file":"describe-fields.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/describe-fields.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,yCAAyC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAmB,MAAM,8BAA8B,CAAC;AAE7E,mFAAmF;AACnF,MAAM,QAAQ,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,QAAQ,CAAU,CAAC;AAG3D,+FAA+F;AAC/F,SAAS,cAAc,CAAC,O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IAAI,EAAE,EAAE,CAAC,CAAC;IAC3D,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-name.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"resolve-name.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAuGjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAma1B,CAAC"}
|
|
@@ -6,9 +6,10 @@
|
|
|
6
6
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
7
7
|
import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
8
8
|
import { escapeMarkdown } from '../escape-markdown.js';
|
|
9
|
+
import { codeSpan } from '../record-page.js';
|
|
9
10
|
import { renderBudgetTrailer } from '../render-budget.js';
|
|
10
11
|
import { getOpenAlexService, inferIdentifier, PMCID_NOT_INDEXED_HINT, } from '../../../services/openalex/openalex-service.js';
|
|
11
|
-
import {
|
|
12
|
+
import { AUTOCOMPLETE_ENTITY_TYPES, } from '../../../services/openalex/types.js';
|
|
12
13
|
/** The singular noun for an entity type, as a record of it is named: `funders` → `funder`. */
|
|
13
14
|
function entityNoun(entityType) {
|
|
14
15
|
return entityType.replace(/s$/, '');
|
|
@@ -22,17 +23,28 @@ function orList(words) {
|
|
|
22
23
|
? words.join(' or ')
|
|
23
24
|
: `${words.slice(0, -1).join(', ')}, or ${words.at(-1)}`;
|
|
24
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The `openalex_search_entities` call that opens an award, as code spans fenced the way a
|
|
28
|
+
* window's continuation call is.
|
|
29
|
+
*/
|
|
30
|
+
function openAwardCall(id) {
|
|
31
|
+
return `${codeSpan('openalex_search_entities')} ${codeSpan(JSON.stringify({ entity_type: 'awards', id }))}`;
|
|
32
|
+
}
|
|
25
33
|
function hasFilters(input) {
|
|
26
34
|
return input.filters !== undefined && Object.keys(input.filters).length > 0;
|
|
27
35
|
}
|
|
28
36
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
37
|
+
* Caller text as a notice repeats it: JSON-encoded, the form the search tools echo it in, so a
|
|
38
|
+
* quote or line break in it cannot leave the notice's line, then escaped, since a notice is
|
|
39
|
+
* authored Markdown that the trailer quotes as written.
|
|
32
40
|
*/
|
|
41
|
+
function noticeText(value) {
|
|
42
|
+
return escapeMarkdown(JSON.stringify(value));
|
|
43
|
+
}
|
|
44
|
+
/** Where a name search looked: ` among institutions with filters={…}`, or ` across all entity types`. */
|
|
33
45
|
function nameSearchScope(input) {
|
|
34
46
|
const types = input.entity_type ? ` among ${input.entity_type}` : ' across all entity types';
|
|
35
|
-
return hasFilters(input) ? `${types} with filters=${
|
|
47
|
+
return hasFilters(input) ? `${types} with filters=${noticeText(input.filters)}` : types;
|
|
36
48
|
}
|
|
37
49
|
/**
|
|
38
50
|
* What to try after a name search matched nothing. Filters come first when they applied, since
|
|
@@ -65,7 +77,7 @@ function idMissNotice(missed, nameFallback, matched, input) {
|
|
|
65
77
|
: `${missed}, and as a name it matched nothing${nameSearchScope(input)}. ${nameMissAdvice(input)}`;
|
|
66
78
|
}
|
|
67
79
|
export const resolveNameTool = tool('openalex_resolve_name', {
|
|
68
|
-
description: "Resolve a name or an identifier to an OpenAlex ID. ALWAYS use this before filtering by entity — names are ambiguous, IDs are not. A name returns up to 10 autocomplete matches with disambiguation hints. An identifier — OpenAlex ID, DOI, ORCID, ROR, PMID, or ISSN, bare or in URL form — resolves directly to the record it addresses instead of running a name search. Short names share the bare OpenAlex ID shape (keyword p53 reads as publisher ID P53), so a bare OpenAlex ID that resolves nothing is searched as a name next. Two identifiers can address more than one entity type: a ROR names an organization's institution, funder, and publisher records alike, so it returns each one that exists (institution first) unless entity_type picks one of those three; and a Crossref Funder Registry DOI (10.13039/…) resolves to the funder unless entity_type is works. A PMCID is recognized as well, bare or as a PubMed Central URL, but OpenAlex indexes no PMCIDs, so it resolves nothing — pass the work's PMID or DOI instead.",
|
|
80
|
+
description: "Resolve a name or an identifier to an OpenAlex ID. ALWAYS use this before filtering by entity — names are ambiguous, IDs are not. A name returns up to 10 autocomplete matches with disambiguation hints. An identifier — OpenAlex ID, DOI, ORCID, ROR, PMID, or ISSN, bare or in URL form — resolves directly to the record it addresses instead of running a name search. Short names share the bare OpenAlex ID shape (keyword p53 reads as publisher ID P53), so a bare OpenAlex ID that resolves nothing is searched as a name next. Two identifiers can address more than one entity type: a ROR names an organization's institution, funder, and publisher records alike, so it returns each one that exists (institution first) unless entity_type picks one of those three; and a Crossref Funder Registry DOI (10.13039/…) resolves to the funder unless entity_type is works. A PMCID is recognized as well, bare or as a PubMed Central URL, but OpenAlex indexes no PMCIDs, so it resolves nothing — pass the work's PMID or DOI instead. An award ID (G…, bare or as an OpenAlex URL) is not looked up, since OpenAlex has no award autocomplete: it returns no matches and a notice naming the openalex_search_entities call that opens the award. Under entity_type, a bare G… is searched as a name of that type instead.",
|
|
69
81
|
sourceUrl: 'https://github.com/cyanheads/openalex-mcp-server/blob/main/src/mcp-server/tools/definitions/resolve-name.tool.ts',
|
|
70
82
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
71
83
|
errors: [
|
|
@@ -211,13 +223,13 @@ export const resolveNameTool = tool('openalex_resolve_name', {
|
|
|
211
223
|
inputAliases: { name: 'query', filter: 'filters' },
|
|
212
224
|
input: z.object({
|
|
213
225
|
entity_type: z
|
|
214
|
-
.enum(
|
|
226
|
+
.enum(AUTOCOMPLETE_ENTITY_TYPES)
|
|
215
227
|
.optional()
|
|
216
|
-
.describe('Entity type to search. Omit for cross-entity search (useful when entity type is unknown). With an identifier `query` it narrows only an identifier that can address more than one type: a ROR to institutions, funders, or publishers (omit it to get every one of the three that exists), and a Funder Registry DOI (10.13039/…) to works instead of the funder. Every other identifier resolves as the type it belongs to, whatever this names — except under keywords, where a bare OpenAlex ID shape ("P53") is searched as a keyword name, since keyword IDs are slugs.'),
|
|
228
|
+
.describe('Entity type to search. Awards are not among them: OpenAlex has no award autocomplete, so search awards with openalex_search_entities. Omit for cross-entity search (useful when entity type is unknown). With an identifier `query` it narrows only an identifier that can address more than one type: a ROR to institutions, funders, or publishers (omit it to get every one of the three that exists), and a Funder Registry DOI (10.13039/…) to works instead of the funder. Every other identifier resolves as the type it belongs to, whatever this names — except under keywords, where a bare OpenAlex ID shape ("P53") is searched as a keyword name, since keyword IDs are slugs.'),
|
|
217
229
|
query: z
|
|
218
230
|
.string()
|
|
219
231
|
.min(1)
|
|
220
|
-
.describe('Name or partial name to resolve. Also accepts an identifier, bare or in URL form — OpenAlex ID ("W2741809807", "F4320332161", or an OpenAlex record-page or API URL such as "https://openalex.org/works/W2741809807"), DOI ("10.1038/nature12373", or a funder\'s Funder Registry DOI such as "10.13039/100000001"), ORCID ("0000-0002-1825-0097"), ROR ("https://ror.org/00hx57361"), PMID ("12345678" or "https://pubmed.ncbi.nlm.nih.gov/12345678"), ISSN ("1234-5678") — which resolves straight to the record it addresses, or for a ROR up to three (see entity_type), instead of running a name search. A bare OpenAlex ID that resolves nothing is then searched as a name — under entity_type when given, and not at all when filters come without entity_type — since short names share its shape ("P53" is a keyword); under entity_type keywords it is searched as a name from the start. A keyword URL ("https://openalex.org/keywords/groundwater") resolves the same way; a bare keyword slug reads as a name and runs a name search, which finds it too. A PMCID ("PMC1234567" or a PubMed Central URL) is recognized but OpenAlex indexes no PMCIDs, so it resolves nothing — pass the work\'s PMID or DOI instead.'),
|
|
232
|
+
.describe('Name or partial name to resolve. Also accepts an identifier, bare or in URL form — OpenAlex ID ("W2741809807", "F4320332161", or an OpenAlex record-page or API URL such as "https://openalex.org/works/W2741809807"), DOI ("10.1038/nature12373", or a funder\'s Funder Registry DOI such as "10.13039/100000001"), ORCID ("0000-0002-1825-0097"), ROR ("https://ror.org/00hx57361"), PMID ("12345678" or "https://pubmed.ncbi.nlm.nih.gov/12345678"), ISSN ("1234-5678") — which resolves straight to the record it addresses, or for a ROR up to three (see entity_type), instead of running a name search. A bare OpenAlex ID that resolves nothing is then searched as a name — under entity_type when given, and not at all when filters come without entity_type — since short names share its shape ("P53" is a keyword); under entity_type keywords it is searched as a name from the start. A keyword URL ("https://openalex.org/keywords/groundwater") resolves the same way; a bare keyword slug reads as a name and runs a name search, which finds it too. A PMCID ("PMC1234567" or a PubMed Central URL) is recognized but OpenAlex indexes no PMCIDs, so it resolves nothing — pass the work\'s PMID or DOI instead. An award ID ("G417894356", or "https://openalex.org/awards/G417894356") sends no request and names the openalex_search_entities call for it; with entity_type, a bare one is searched as a name of that type.'),
|
|
221
233
|
filters: z
|
|
222
234
|
.record(z.string(), z.string())
|
|
223
235
|
.optional()
|
|
@@ -262,7 +274,7 @@ export const resolveNameTool = tool('openalex_resolve_name', {
|
|
|
262
274
|
notice: z
|
|
263
275
|
.string()
|
|
264
276
|
.optional()
|
|
265
|
-
.describe('Guidance notice. Set when nothing matched (echoes the query, and the filters when a name search applied them, and suggests corrections), when a bare OpenAlex ID resolved nothing and the query was searched as a name instead (names both outcomes, or why the name search did not run or finish), when an identifier query was passed name-search parameters that do not apply to it,
|
|
277
|
+
.describe('Guidance notice. Set when nothing matched (echoes the query, and the filters when a name search applied them, and suggests corrections), when a bare OpenAlex ID resolved nothing and the query was searched as a name instead (names both outcomes, or why the name search did not run or finish), when an identifier query was passed name-search parameters that do not apply to it, when one of the lookups for a ROR failed upstream (names the entity type whose record may be missing), or when the query is an award ID (names the openalex_search_entities call that opens it). Caller text in it is JSON-encoded and Markdown-escaped, the same string on both surfaces. Absent otherwise.'),
|
|
266
278
|
budget: z
|
|
267
279
|
.object({
|
|
268
280
|
costUsd: z
|
|
@@ -294,9 +306,22 @@ export const resolveNameTool = tool('openalex_resolve_name', {
|
|
|
294
306
|
query: input.query,
|
|
295
307
|
filters: input.filters,
|
|
296
308
|
};
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
309
|
+
const query = noticeText(input.query);
|
|
310
|
+
// Awards have no autocomplete, and an award record carries none of the activity stats a
|
|
311
|
+
// match reports, so an award ID is never looked up here. A bare one under entity_type is
|
|
312
|
+
// read as a name of that type instead, which short names share ("G3" is a journal).
|
|
313
|
+
const awardId = identifier?.entityTypes.includes('awards') ? identifier.id : undefined;
|
|
314
|
+
if (awardId !== undefined && !(identifier?.mayBeName && input.entity_type)) {
|
|
315
|
+
ctx.log.info('Name resolved', {
|
|
316
|
+
query: input.query,
|
|
317
|
+
entityType: 'awards',
|
|
318
|
+
resolvedVia: 'none',
|
|
319
|
+
matchCount: 0,
|
|
320
|
+
});
|
|
321
|
+
ctx.enrich.notice(`${query} is an OpenAlex award ID; this tool resolves no awards — OpenAlex has no award autocomplete — so nothing was looked up. Open the award with ${openAwardCall(awardId)}; to find an award by title or grant number instead, call it with entity_type "awards" and a \`query\` or the \`funder_award_id\` filter, narrowed by \`funder.id\`.`);
|
|
322
|
+
return { results: [] };
|
|
323
|
+
}
|
|
324
|
+
if (!identifier || awardId !== undefined) {
|
|
300
325
|
// Cross-entity autocomplete rejects `filter` outright, so this pair can only fail upstream.
|
|
301
326
|
if (hasFilters(input) && !input.entity_type) {
|
|
302
327
|
throw ctx.fail('filters_without_entity_type', '`filters` applies to a name search only with entity_type — filter fields belong to one entity type, and a search across every type takes none.');
|
|
@@ -309,7 +334,10 @@ export const resolveNameTool = tool('openalex_resolve_name', {
|
|
|
309
334
|
matchCount: result.results.length,
|
|
310
335
|
});
|
|
311
336
|
if (result.results.length === 0) {
|
|
312
|
-
|
|
337
|
+
const award = awardId === undefined
|
|
338
|
+
? ''
|
|
339
|
+
: ` ${query} is also shaped like an OpenAlex award ID — open the award with ${openAwardCall(awardId)}.`;
|
|
340
|
+
ctx.enrich.notice(`No matches for ${query}${nameSearchScope(input)}. ${nameMissAdvice(input)}${award}`);
|
|
313
341
|
}
|
|
314
342
|
return result;
|
|
315
343
|
}
|
|
@@ -374,8 +402,8 @@ export const resolveNameTool = tool('openalex_resolve_name', {
|
|
|
374
402
|
}
|
|
375
403
|
const lines = [];
|
|
376
404
|
for (const r of result.results) {
|
|
377
|
-
//
|
|
378
|
-
const name = r.display_name === null ? '(untitled)' : escapeMarkdown(r.display_name
|
|
405
|
+
// Untrimmed: edge whitespace escapes to references, which `**` still opens and closes beside.
|
|
406
|
+
const name = r.display_name === null ? '(untitled)' : escapeMarkdown(r.display_name);
|
|
379
407
|
lines.push(`**${name}** (${escapeMarkdown(r.entity_type)})`);
|
|
380
408
|
const details = [escapeMarkdown(r.id, 'line-start')];
|
|
381
409
|
if (r.external_id)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-name.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EACL,kBAAkB,EAElB,eAAe,EACf,sBAAsB,GACvB,MAAM,yCAAyC,C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