@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
|
@@ -7,6 +7,7 @@ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
|
|
|
7
7
|
export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
|
|
8
8
|
entity_type: z.ZodEnum<{
|
|
9
9
|
authors: "authors";
|
|
10
|
+
awards: "awards";
|
|
10
11
|
funders: "funders";
|
|
11
12
|
institutions: "institutions";
|
|
12
13
|
keywords: "keywords";
|
|
@@ -28,14 +29,15 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
28
29
|
}, z.core.$strip>, unknown>>;
|
|
29
30
|
sort: z.ZodOptional<z.ZodString>;
|
|
30
31
|
select: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
|
-
per_page: z.
|
|
32
|
+
per_page: z.ZodOptional<z.ZodLazy<z.ZodNumber>>;
|
|
32
33
|
cursor: z.ZodOptional<z.ZodString>;
|
|
33
34
|
page: z.ZodOptional<z.ZodNumber>;
|
|
34
|
-
sample: z.ZodOptional<z.ZodNumber
|
|
35
|
+
sample: z.ZodOptional<z.ZodLazy<z.ZodNumber>>;
|
|
35
36
|
seed: z.ZodOptional<z.ZodString>;
|
|
36
37
|
slice: z.ZodOptional<z.ZodObject<{
|
|
37
38
|
field: z.ZodString;
|
|
38
39
|
offset: z.ZodDefault<z.ZodNumber>;
|
|
40
|
+
limit: z.ZodDefault<z.ZodLazy<z.ZodNumber>>;
|
|
39
41
|
}, z.core.$strip>>;
|
|
40
42
|
}, z.core.$strip>, z.ZodObject<{
|
|
41
43
|
meta: z.ZodObject<{
|
|
@@ -47,13 +49,6 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
47
49
|
id: z.ZodString;
|
|
48
50
|
display_name: z.ZodNullable<z.ZodString>;
|
|
49
51
|
}, z.core.$loose>>;
|
|
50
|
-
omitted: z.ZodOptional<z.ZodObject<{
|
|
51
|
-
ids: z.ZodArray<z.ZodString>;
|
|
52
|
-
next: z.ZodObject<{
|
|
53
|
-
tool: z.ZodLiteral<"openalex_search_entities">;
|
|
54
|
-
arguments: z.ZodObject<{}, z.core.$loose>;
|
|
55
|
-
}, z.core.$strip>;
|
|
56
|
-
}, z.core.$strip>>;
|
|
57
52
|
windows: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
58
53
|
id: z.ZodString;
|
|
59
54
|
field: z.ZodString;
|
|
@@ -66,7 +61,6 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
66
61
|
arguments: z.ZodObject<{}, z.core.$loose>;
|
|
67
62
|
}, z.core.$strip>>;
|
|
68
63
|
}, z.core.$strip>>>;
|
|
69
|
-
over_budget: z.ZodOptional<z.ZodBoolean>;
|
|
70
64
|
}, z.core.$strip>, readonly [{
|
|
71
65
|
readonly reason: "invalid_filter_string";
|
|
72
66
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -88,8 +82,13 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
88
82
|
}, {
|
|
89
83
|
readonly reason: "semantic_per_page_cap";
|
|
90
84
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
91
|
-
readonly when: "A search (no `id`) set per_page above
|
|
85
|
+
readonly when: "A semantic search (no `id`) set per_page above its cap of 50 on a server with OPENALEX_CLAMP_PER_PAGE=false; with clamping on (the default), it returns 50 and says so.";
|
|
92
86
|
readonly recovery: "Reduce per_page to 50 or less, or switch search_mode to keyword.";
|
|
87
|
+
}, {
|
|
88
|
+
readonly reason: "response_too_large";
|
|
89
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
90
|
+
readonly when: "The response's structuredContent or content[] text would exceed 8,000,000 bytes — a wide `select` on a large page, or a record with very long arrays. A page is never shortened to fit.";
|
|
91
|
+
readonly recovery: "Rerun with the per_page or slice.limit the error names when it names one, or narrow `select` to the fields you need; for a single oversized record, page its largest array with `slice`.";
|
|
93
92
|
}, {
|
|
94
93
|
readonly reason: "semantic_without_query";
|
|
95
94
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -103,18 +102,23 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
103
102
|
}, {
|
|
104
103
|
readonly reason: "page_without_semantic";
|
|
105
104
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
106
|
-
readonly when: "A search supplied `page`
|
|
107
|
-
readonly recovery: "Drop `page` and paginate with `cursor`,
|
|
105
|
+
readonly when: "A search supplied `page` with neither search_mode \"semantic\" nor `sample`.";
|
|
106
|
+
readonly recovery: "Drop `page` and paginate with `cursor`, set search_mode to \"semantic\", or pass `sample` with a `seed` — the only searches `page` walks.";
|
|
108
107
|
}, {
|
|
109
108
|
readonly reason: "sample_with_cursor";
|
|
110
109
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
111
110
|
readonly when: "A search (no `id`) provided both `sample` and `cursor`.";
|
|
112
|
-
readonly recovery: "
|
|
111
|
+
readonly recovery: "A sample walks its draw with `page` and a `seed`, not `cursor`; remove `cursor`, or remove `sample`.";
|
|
112
|
+
}, {
|
|
113
|
+
readonly reason: "sample_page_without_seed";
|
|
114
|
+
readonly code: JsonRpcErrorCode.ValidationError;
|
|
115
|
+
readonly when: "A search (no `id`) provided `page` with `sample` but no `seed`, which OpenAlex refuses: an unseeded sample redraws on every call, so its pages would overlap.";
|
|
116
|
+
readonly recovery: "Pass `seed` to page a sample — an unseeded sample redraws on every call — or drop `page`.";
|
|
113
117
|
}, {
|
|
114
|
-
readonly reason: "
|
|
118
|
+
readonly reason: "sample_page_too_deep";
|
|
115
119
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
116
|
-
readonly when:
|
|
117
|
-
readonly recovery:
|
|
120
|
+
readonly when: `A sample page reaches past record ${string} (\`page\` × \`per_page\` above ${string}), the most of a sample OpenAlex serves by page number.`;
|
|
121
|
+
readonly recovery: `Keep \`page\` × \`per_page\` at or under ${string}, with a per_page that divides ${string} — 25, 50, or 100 — so the last page ends on record ${string}; at per_page 100 that is page 100.`;
|
|
118
122
|
}, {
|
|
119
123
|
readonly reason: "sample_with_semantic";
|
|
120
124
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
@@ -144,7 +148,7 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
|
|
|
144
148
|
readonly reason: "id_type_mismatch";
|
|
145
149
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
146
150
|
readonly when: "`id` is a native OpenAlex ID whose letter names another entity type than `entity_type`, or a concept ID (C…), a type this server does not serve.";
|
|
147
|
-
readonly recovery: "Pass the entity_type the ID letter names — W works, A authors, S sources, I institutions, T topics, P publishers, F funders. A concept ID (C…) has no entity_type here; search topics for the concept by name with openalex_resolve_name instead.";
|
|
151
|
+
readonly recovery: "Pass the entity_type the ID letter names — W works, A authors, S sources, I institutions, T topics, P publishers, F funders, G awards. A concept ID (C…) has no entity_type here; search topics for the concept by name with openalex_resolve_name instead.";
|
|
148
152
|
readonly thrownBy: "service";
|
|
149
153
|
}, {
|
|
150
154
|
readonly reason: "id_dot_segment";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-entities.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"search-entities.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA4IjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2zB7B,CAAC"}
|