@cyanheads/openalex-mcp-server 0.6.20 → 0.6.21

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 (32) hide show
  1. package/AGENTS.md +2 -1
  2. package/CLAUDE.md +2 -1
  3. package/README.md +15 -3
  4. package/dist/index.js +8 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/mcp-server/tools/definitions/analyze-trends.tool.d.ts +6 -1
  7. package/dist/mcp-server/tools/definitions/analyze-trends.tool.d.ts.map +1 -1
  8. package/dist/mcp-server/tools/definitions/analyze-trends.tool.js +7 -1
  9. package/dist/mcp-server/tools/definitions/analyze-trends.tool.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/citation-graph.tool.d.ts +7 -2
  11. package/dist/mcp-server/tools/definitions/citation-graph.tool.d.ts.map +1 -1
  12. package/dist/mcp-server/tools/definitions/citation-graph.tool.js +7 -1
  13. package/dist/mcp-server/tools/definitions/citation-graph.tool.js.map +1 -1
  14. package/dist/mcp-server/tools/definitions/describe-fields.tool.d.ts +29 -0
  15. package/dist/mcp-server/tools/definitions/describe-fields.tool.d.ts.map +1 -0
  16. package/dist/mcp-server/tools/definitions/describe-fields.tool.js +68 -0
  17. package/dist/mcp-server/tools/definitions/describe-fields.tool.js.map +1 -0
  18. package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts +6 -1
  19. package/dist/mcp-server/tools/definitions/search-entities.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/search-entities.tool.js +7 -1
  21. package/dist/mcp-server/tools/definitions/search-entities.tool.js.map +1 -1
  22. package/dist/services/openalex/field-catalog.json +660 -0
  23. package/dist/services/openalex/field-ranker.d.ts +19 -0
  24. package/dist/services/openalex/field-ranker.d.ts.map +1 -0
  25. package/dist/services/openalex/field-ranker.js +102 -0
  26. package/dist/services/openalex/field-ranker.js.map +1 -0
  27. package/dist/services/openalex/openalex-service.d.ts +9 -1
  28. package/dist/services/openalex/openalex-service.d.ts.map +1 -1
  29. package/dist/services/openalex/openalex-service.js +98 -8
  30. package/dist/services/openalex/openalex-service.js.map +1 -1
  31. package/package.json +3 -2
  32. package/server.json +3 -3
@@ -0,0 +1,660 @@
1
+ {
2
+ "works": {
3
+ "filter": [
4
+ "abstract.search",
5
+ "abstract.search.exact",
6
+ "apc_list.currency",
7
+ "apc_list.provenance",
8
+ "apc_list.value",
9
+ "apc_list.value_usd",
10
+ "apc_paid.currency",
11
+ "apc_paid.provenance",
12
+ "apc_paid.value",
13
+ "apc_paid.value_usd",
14
+ "author.id",
15
+ "author.orcid",
16
+ "authors_count",
17
+ "authorships.affiliations.institution_ids",
18
+ "authorships.author.id",
19
+ "authorships.author.orcid",
20
+ "authorships.countries",
21
+ "authorships.institutions.continent",
22
+ "authorships.institutions.country_code",
23
+ "authorships.institutions.id",
24
+ "authorships.institutions.is_global_south",
25
+ "authorships.institutions.lineage",
26
+ "authorships.institutions.ror",
27
+ "authorships.institutions.type",
28
+ "authorships.is_corresponding",
29
+ "authorships.raw_orcid",
30
+ "awards.doi",
31
+ "awards.funder_award_id",
32
+ "awards.funder_display_name",
33
+ "awards.funder_id",
34
+ "awards.id",
35
+ "best_oa_location.is_accepted",
36
+ "best_oa_location.is_oa",
37
+ "best_oa_location.is_published",
38
+ "best_oa_location.landing_page_url",
39
+ "best_oa_location.license",
40
+ "best_oa_location.license_id",
41
+ "best_oa_location.raw_type",
42
+ "best_oa_location.source.host_organization",
43
+ "best_oa_location.source.host_organization_lineage",
44
+ "best_oa_location.source.id",
45
+ "best_oa_location.source.is_in_doaj",
46
+ "best_oa_location.source.is_oa",
47
+ "best_oa_location.source.issn",
48
+ "best_oa_location.source.type",
49
+ "best_oa_location.version",
50
+ "best_open_version",
51
+ "biblio.first_page",
52
+ "biblio.issue",
53
+ "biblio.last_page",
54
+ "biblio.volume",
55
+ "citation_normalized_percentile.is_in_top_10_percent",
56
+ "citation_normalized_percentile.is_in_top_1_percent",
57
+ "citation_normalized_percentile.value",
58
+ "cited_by",
59
+ "cited_by_count",
60
+ "cited_by_percentile_year.max",
61
+ "cited_by_percentile_year.min",
62
+ "cites",
63
+ "collection",
64
+ "concept.id",
65
+ "concepts.id",
66
+ "concepts.wikidata",
67
+ "concepts_count",
68
+ "corresponding_author_ids",
69
+ "corresponding_institution_ids",
70
+ "countries_distinct_count",
71
+ "created_date",
72
+ "datasets",
73
+ "default.search",
74
+ "default.search.exact",
75
+ "display_name",
76
+ "display_name.search",
77
+ "display_name.search.exact",
78
+ "doi",
79
+ "doi_starts_with",
80
+ "from_created_date",
81
+ "from_publication_date",
82
+ "fulltext.search",
83
+ "fulltext.search.exact",
84
+ "fulltext_origin",
85
+ "funders.id",
86
+ "fwci",
87
+ "has_abstract",
88
+ "has_content.grobid_xml",
89
+ "has_content.pdf",
90
+ "has_doi",
91
+ "has_embeddings",
92
+ "has_fulltext",
93
+ "has_oa_accepted_or_published_version",
94
+ "has_oa_submitted_version",
95
+ "has_old_authors",
96
+ "has_orcid",
97
+ "has_pdf_url",
98
+ "has_pmcid",
99
+ "has_pmid",
100
+ "has_raw_affiliation_strings",
101
+ "has_references",
102
+ "ids.mag",
103
+ "ids.openalex",
104
+ "ids.pmcid",
105
+ "ids.pmid",
106
+ "indexed_in",
107
+ "institution.id",
108
+ "institution_assertions.country_code",
109
+ "institution_assertions.id",
110
+ "institution_assertions.lineage",
111
+ "institution_assertions.ror",
112
+ "institution_assertions.type",
113
+ "institutions.continent",
114
+ "institutions.country_code",
115
+ "institutions.id",
116
+ "institutions.is_global_south",
117
+ "institutions.ror",
118
+ "institutions.type",
119
+ "institutions_distinct_count",
120
+ "is_corresponding",
121
+ "is_oa",
122
+ "is_paratext",
123
+ "is_retracted",
124
+ "is_xpac",
125
+ "journal",
126
+ "keyword.search",
127
+ "keywords.id",
128
+ "language",
129
+ "locations.is_accepted",
130
+ "locations.is_oa",
131
+ "locations.is_published",
132
+ "locations.landing_page_url",
133
+ "locations.license",
134
+ "locations.license_id",
135
+ "locations.raw_type",
136
+ "locations.source.has_issn",
137
+ "locations.source.host_institution_lineage",
138
+ "locations.source.host_organization",
139
+ "locations.source.host_organization_lineage",
140
+ "locations.source.id",
141
+ "locations.source.is_core",
142
+ "locations.source.is_in_doaj",
143
+ "locations.source.is_oa",
144
+ "locations.source.issn",
145
+ "locations.source.publisher_lineage",
146
+ "locations.source.type",
147
+ "locations.version",
148
+ "locations_count",
149
+ "mag",
150
+ "mag_only",
151
+ "oa_status",
152
+ "open_access.any_repository_has_fulltext",
153
+ "open_access.is_oa",
154
+ "open_access.oa_status",
155
+ "openalex",
156
+ "openalex_id",
157
+ "pmcid",
158
+ "pmid",
159
+ "primary_location.is_accepted",
160
+ "primary_location.is_oa",
161
+ "primary_location.is_published",
162
+ "primary_location.landing_page_url",
163
+ "primary_location.license",
164
+ "primary_location.license_id",
165
+ "primary_location.raw_type",
166
+ "primary_location.source.has_issn",
167
+ "primary_location.source.host_institution_lineage",
168
+ "primary_location.source.host_organization",
169
+ "primary_location.source.host_organization_lineage",
170
+ "primary_location.source.id",
171
+ "primary_location.source.is_core",
172
+ "primary_location.source.is_in_doaj",
173
+ "primary_location.source.is_oa",
174
+ "primary_location.source.issn",
175
+ "primary_location.source.publisher_lineage",
176
+ "primary_location.source.type",
177
+ "primary_location.version",
178
+ "primary_topic.domain.id",
179
+ "primary_topic.field.id",
180
+ "primary_topic.id",
181
+ "primary_topic.subfield.id",
182
+ "publication_date",
183
+ "publication_year",
184
+ "raw_affiliation_strings",
185
+ "raw_affiliation_strings.search",
186
+ "raw_author_name.search",
187
+ "referenced_works",
188
+ "referenced_works_count",
189
+ "related_to",
190
+ "repository",
191
+ "semantic.search",
192
+ "sustainable_development_goals.id",
193
+ "sustainable_development_goals.score",
194
+ "title.search",
195
+ "title.search.exact",
196
+ "title_and_abstract.search",
197
+ "title_and_abstract.search.exact",
198
+ "to_created_date",
199
+ "to_publication_date",
200
+ "to_updated_date",
201
+ "topics.domain.id",
202
+ "topics.field.id",
203
+ "topics.id",
204
+ "topics.subfield.id",
205
+ "topics_count",
206
+ "type",
207
+ "type_crossref",
208
+ "updated_date",
209
+ "version"
210
+ ],
211
+ "select": [
212
+ "id",
213
+ "doi",
214
+ "title",
215
+ "display_name",
216
+ "relevance_score",
217
+ "publication_year",
218
+ "publication_date",
219
+ "ids",
220
+ "language",
221
+ "primary_location",
222
+ "sources",
223
+ "type",
224
+ "type_crossref",
225
+ "indexed_in",
226
+ "open_access",
227
+ "authorships",
228
+ "institution_assertions",
229
+ "institutions",
230
+ "countries_distinct_count",
231
+ "institutions_distinct_count",
232
+ "corresponding_author_ids",
233
+ "corresponding_institution_ids",
234
+ "apc_list",
235
+ "apc_paid",
236
+ "fwci",
237
+ "is_authors_truncated",
238
+ "has_fulltext",
239
+ "fulltext_origin",
240
+ "cited_by_count",
241
+ "citation_normalized_percentile",
242
+ "cited_by_percentile_year",
243
+ "biblio",
244
+ "is_retracted",
245
+ "is_paratext",
246
+ "is_xpac",
247
+ "primary_topic",
248
+ "topics",
249
+ "keywords",
250
+ "concepts",
251
+ "mesh",
252
+ "locations_count",
253
+ "locations",
254
+ "best_oa_location",
255
+ "sustainable_development_goals",
256
+ "awards",
257
+ "funders",
258
+ "datasets",
259
+ "versions",
260
+ "has_content",
261
+ "content_urls",
262
+ "referenced_works_count",
263
+ "referenced_works",
264
+ "related_works",
265
+ "abstract_inverted_index",
266
+ "cited_by_api_url",
267
+ "counts_by_year",
268
+ "updated_date",
269
+ "created_date"
270
+ ]
271
+ },
272
+ "authors": {
273
+ "filter": [
274
+ "affiliations.institution.country_code",
275
+ "affiliations.institution.id",
276
+ "affiliations.institution.lineage",
277
+ "affiliations.institution.ror",
278
+ "affiliations.institution.type",
279
+ "block_key",
280
+ "cited_by_count",
281
+ "collection",
282
+ "concept.id",
283
+ "concepts.id",
284
+ "default.search",
285
+ "display_name",
286
+ "display_name.search",
287
+ "from_created_date",
288
+ "has_orcid",
289
+ "id",
290
+ "ids.openalex",
291
+ "last_known_institutions.continent",
292
+ "last_known_institutions.country_code",
293
+ "last_known_institutions.id",
294
+ "last_known_institutions.is_global_south",
295
+ "last_known_institutions.lineage",
296
+ "last_known_institutions.ror",
297
+ "last_known_institutions.type",
298
+ "openalex",
299
+ "openalex_id",
300
+ "orcid",
301
+ "parsed_longest_name.first",
302
+ "parsed_longest_name.last",
303
+ "parsed_longest_name.middle",
304
+ "parsed_longest_name.suffix",
305
+ "scopus",
306
+ "summary_stats.2yr_mean_citedness",
307
+ "summary_stats.h_index",
308
+ "summary_stats.i10_index",
309
+ "to_created_date",
310
+ "to_updated_date",
311
+ "topic_share.id",
312
+ "topics.id",
313
+ "works_count",
314
+ "x_concepts.id"
315
+ ],
316
+ "select": [
317
+ "id",
318
+ "orcid",
319
+ "display_name",
320
+ "raw_author_names",
321
+ "full_name",
322
+ "relevance_score",
323
+ "works_count",
324
+ "cited_by_count",
325
+ "summary_stats",
326
+ "ids",
327
+ "affiliations",
328
+ "last_known_institutions",
329
+ "topics",
330
+ "topic_share",
331
+ "x_concepts",
332
+ "counts_by_year",
333
+ "display_name_alternatives",
334
+ "block_key",
335
+ "works_api_url",
336
+ "updated_date",
337
+ "created_date"
338
+ ]
339
+ },
340
+ "sources": {
341
+ "filter": [
342
+ "apc_prices.currency",
343
+ "apc_prices.price",
344
+ "apc_usd",
345
+ "cited_by_count",
346
+ "collection",
347
+ "concept.id",
348
+ "concepts.id",
349
+ "continent",
350
+ "country_code",
351
+ "default.search",
352
+ "display_name",
353
+ "display_name.search",
354
+ "first_publication_year",
355
+ "from_created_date",
356
+ "has_issn",
357
+ "host_organization",
358
+ "host_organization.id",
359
+ "host_organization_lineage",
360
+ "ids.mag",
361
+ "ids.openalex",
362
+ "is_core",
363
+ "is_global_south",
364
+ "is_high_oa_rate",
365
+ "is_high_oa_rate_since_year",
366
+ "is_in_doaj",
367
+ "is_in_doaj_since_year",
368
+ "is_in_jstage",
369
+ "is_in_jstage_since_year",
370
+ "is_oa",
371
+ "is_ojs",
372
+ "issn",
373
+ "issn_l",
374
+ "last_publication_year",
375
+ "oa_flip_year",
376
+ "openalex",
377
+ "openalex_id",
378
+ "summary_stats.2yr_mean_citedness",
379
+ "summary_stats.h_index",
380
+ "summary_stats.i10_index",
381
+ "to_created_date",
382
+ "to_updated_date",
383
+ "topic_share.id",
384
+ "topics.id",
385
+ "type",
386
+ "works_count",
387
+ "x_concepts.id"
388
+ ],
389
+ "select": [
390
+ "id",
391
+ "issn_l",
392
+ "issn",
393
+ "display_name",
394
+ "host_organization",
395
+ "host_organization_name",
396
+ "host_organization_lineage",
397
+ "relevance_score",
398
+ "works_count",
399
+ "oa_works_count",
400
+ "cited_by_count",
401
+ "summary_stats",
402
+ "is_oa",
403
+ "is_in_doaj",
404
+ "is_in_doaj_since_year",
405
+ "is_high_oa_rate",
406
+ "is_high_oa_rate_since_year",
407
+ "is_in_jstage",
408
+ "is_in_jstage_since_year",
409
+ "is_in_scielo",
410
+ "is_ojs",
411
+ "is_indexed_in_scopus",
412
+ "is_core",
413
+ "oa_flip_year",
414
+ "first_publication_year",
415
+ "last_publication_year",
416
+ "ids",
417
+ "homepage_url",
418
+ "apc_prices",
419
+ "apc_usd",
420
+ "country",
421
+ "country_code",
422
+ "societies",
423
+ "alternate_titles",
424
+ "abbreviated_title",
425
+ "type",
426
+ "topics",
427
+ "topic_share",
428
+ "x_concepts",
429
+ "counts_by_year",
430
+ "works_api_url",
431
+ "updated_date",
432
+ "created_date"
433
+ ]
434
+ },
435
+ "institutions": {
436
+ "filter": [
437
+ "cited_by_count",
438
+ "collection",
439
+ "concept.id",
440
+ "concepts.id",
441
+ "continent",
442
+ "country_code",
443
+ "default.search",
444
+ "display_name",
445
+ "display_name.search",
446
+ "from_created_date",
447
+ "has_ror",
448
+ "id",
449
+ "ids.openalex",
450
+ "is_global_south",
451
+ "is_super_system",
452
+ "lineage",
453
+ "openalex",
454
+ "openalex_id",
455
+ "repositories.host_organization",
456
+ "repositories.host_organization_lineage",
457
+ "repositories.id",
458
+ "roles.id",
459
+ "ror",
460
+ "status",
461
+ "summary_stats.2yr_mean_citedness",
462
+ "summary_stats.h_index",
463
+ "summary_stats.i10_index",
464
+ "topic_share.id",
465
+ "topics.id",
466
+ "type",
467
+ "works_count",
468
+ "x_concepts.id"
469
+ ],
470
+ "select": [
471
+ "id",
472
+ "ror",
473
+ "display_name",
474
+ "relevance_score",
475
+ "country_code",
476
+ "type",
477
+ "type_id",
478
+ "lineage",
479
+ "homepage_url",
480
+ "image_url",
481
+ "image_thumbnail_url",
482
+ "display_name_acronyms",
483
+ "display_name_alternatives",
484
+ "repositories",
485
+ "works_count",
486
+ "cited_by_count",
487
+ "summary_stats",
488
+ "ids",
489
+ "geo",
490
+ "international",
491
+ "associated_institutions",
492
+ "counts_by_year",
493
+ "roles",
494
+ "topics",
495
+ "topic_share",
496
+ "x_concepts",
497
+ "is_super_system",
498
+ "status",
499
+ "works_api_url",
500
+ "updated_date",
501
+ "created_date"
502
+ ]
503
+ },
504
+ "topics": {
505
+ "filter": [
506
+ "cited_by_count",
507
+ "collection",
508
+ "default.search",
509
+ "description.search",
510
+ "display_name",
511
+ "display_name.search",
512
+ "domain.id",
513
+ "field.id",
514
+ "from_created_date",
515
+ "id",
516
+ "ids.openalex",
517
+ "keywords.search",
518
+ "openalex",
519
+ "subfield.id",
520
+ "works_count"
521
+ ],
522
+ "select": [
523
+ "id",
524
+ "display_name",
525
+ "description",
526
+ "keywords",
527
+ "ids",
528
+ "subfield",
529
+ "field",
530
+ "domain",
531
+ "siblings",
532
+ "relevance_score",
533
+ "works_count",
534
+ "cited_by_count",
535
+ "works_api_url",
536
+ "updated_date",
537
+ "created_date"
538
+ ]
539
+ },
540
+ "keywords": {
541
+ "filter": [
542
+ "cited_by_count",
543
+ "collection",
544
+ "default.search",
545
+ "display_name",
546
+ "display_name.search",
547
+ "from_created_date",
548
+ "id",
549
+ "works_count"
550
+ ],
551
+ "select": [
552
+ "id",
553
+ "display_name",
554
+ "relevance_score",
555
+ "works_count",
556
+ "cited_by_count",
557
+ "works_api_url",
558
+ "updated_date",
559
+ "created_date"
560
+ ]
561
+ },
562
+ "publishers": {
563
+ "filter": [
564
+ "cited_by_count",
565
+ "collection",
566
+ "continent",
567
+ "country_codes",
568
+ "default.search",
569
+ "display_name",
570
+ "display_name.search",
571
+ "from_created_date",
572
+ "hierarchy_level",
573
+ "ids.openalex",
574
+ "ids.ror",
575
+ "ids.wikidata",
576
+ "lineage",
577
+ "openalex",
578
+ "openalex_id",
579
+ "parent_publisher",
580
+ "roles.id",
581
+ "ror",
582
+ "summary_stats.2yr_mean_citedness",
583
+ "summary_stats.h_index",
584
+ "summary_stats.i10_index",
585
+ "wikidata",
586
+ "works_count"
587
+ ],
588
+ "select": [
589
+ "id",
590
+ "display_name",
591
+ "alternate_titles",
592
+ "hierarchy_level",
593
+ "parent_publisher",
594
+ "lineage",
595
+ "relevance_score",
596
+ "country_codes",
597
+ "homepage_url",
598
+ "image_url",
599
+ "image_thumbnail_url",
600
+ "works_count",
601
+ "cited_by_count",
602
+ "summary_stats",
603
+ "ids",
604
+ "counts_by_year",
605
+ "roles",
606
+ "sources_api_url",
607
+ "updated_date",
608
+ "created_date"
609
+ ]
610
+ },
611
+ "funders": {
612
+ "filter": [
613
+ "awards_count",
614
+ "cited_by_count",
615
+ "collection",
616
+ "continent",
617
+ "country_code",
618
+ "default.search",
619
+ "description.search",
620
+ "display_name",
621
+ "display_name.search",
622
+ "from_created_date",
623
+ "ids.crossref",
624
+ "ids.doi",
625
+ "ids.openalex",
626
+ "ids.ror",
627
+ "ids.wikidata",
628
+ "is_global_south",
629
+ "openalex",
630
+ "openalex_id",
631
+ "roles.id",
632
+ "ror",
633
+ "summary_stats.2yr_mean_citedness",
634
+ "summary_stats.h_index",
635
+ "summary_stats.i10_index",
636
+ "wikidata",
637
+ "works_count"
638
+ ],
639
+ "select": [
640
+ "id",
641
+ "display_name",
642
+ "alternate_titles",
643
+ "country_code",
644
+ "description",
645
+ "homepage_url",
646
+ "image_url",
647
+ "image_thumbnail_url",
648
+ "relevance_score",
649
+ "awards_count",
650
+ "works_count",
651
+ "cited_by_count",
652
+ "summary_stats",
653
+ "ids",
654
+ "counts_by_year",
655
+ "roles",
656
+ "updated_date",
657
+ "created_date"
658
+ ]
659
+ }
660
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @fileoverview Field name ranking for ranked invalid-field suggestions.
3
+ *
4
+ * Blends token-set overlap (split on `.`/`_`) with Jaro-Winkler similarity.
5
+ * Zero dependencies. Designed for short structured identifiers like OpenAlex
6
+ * field names — not document-search use cases.
7
+ *
8
+ * @module services/openalex/field-ranker
9
+ */
10
+ /**
11
+ * Return the top-N candidate field names from `pool` ranked by similarity
12
+ * to `query`. Results are ordered by score descending.
13
+ *
14
+ * @param query - The rejected field name submitted by the caller.
15
+ * @param pool - All valid field names for this entity_type + context.
16
+ * @param topN - Maximum number of suggestions to return. Default 5.
17
+ */
18
+ export declare function rankFields(query: string, pool: string[], topN?: number): string[];
19
+ //# sourceMappingURL=field-ranker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-ranker.d.ts","sourceRoot":"","sources":["../../../src/services/openalex/field-ranker.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAoFH;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,SAAI,GAAG,MAAM,EAAE,CAS5E"}