@cyanheads/openalex-mcp-server 0.6.14 → 0.6.16

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 ADDED
@@ -0,0 +1,355 @@
1
+ # Agent Protocol
2
+
3
+ **Server:** openalex-mcp-server
4
+ **Version:** 0.6.16
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
6
+ **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
+
8
+ > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
9
+
10
+ ---
11
+
12
+ ## Domain
13
+
14
+ [OpenAlex](https://openalex.org) is a fully open catalog of the global research system — 270M+ works, 90M+ authors, 100K+ sources. CC0 data, no API key required (email address optional for polite pool access).
15
+
16
+ **Entity types:** works, authors, sources, institutions, topics, keywords, publishers, funders. All share a uniform API (list/filter, search, get-by-ID, group-by, autocomplete).
17
+
18
+ **Critical workflow:** Names are ambiguous, IDs are not. Always resolve names to IDs first via `openalex_resolve_name` before using them in filters.
19
+
20
+ **Reference docs:** `README.md` covers the current tool and prompt surface; `docs/tree.md` shows the current repository layout.
21
+
22
+ ### MCP Surface
23
+
24
+ | Type | Name | Purpose |
25
+ |:-----|:-----|:--------|
26
+ | Tool | `openalex_search_entities` | Search, filter, sort, or retrieve by ID |
27
+ | Tool | `openalex_analyze_trends` | Group-by aggregation for trends/distributions |
28
+ | Tool | `openalex_resolve_name` | Name-to-ID resolution via autocomplete |
29
+ | Tool | `openalex_get_citation_graph` | One-hop citation graph traversal (cites/cited_by/related_to) |
30
+ | Prompt | `openalex_literature_review` | Guided systematic literature search workflow |
31
+ | Prompt | `openalex_research_landscape` | Quantitative research landscape analysis |
32
+
33
+ No resources — entity lookups need `select` for payload control, which fits tools better than URI templates.
34
+
35
+ ### Config
36
+
37
+ | Env Var | Required | Description |
38
+ |:--------|:---------|:------------|
39
+ | `OPENALEX_API_KEY` | No | Email for the OpenAlex polite pool (10x faster rate limits); omit for anonymous access |
40
+ | `OPENALEX_BASE_URL` | No | Default: `https://api.openalex.org` |
41
+
42
+ ---
43
+
44
+ ## What's Next?
45
+
46
+ When the user asks what's next or needs direction, suggest options based on the current project state. Common next steps:
47
+
48
+ 1. **Re-run the `setup` skill** — ensures CLAUDE.md, skills, structure, and metadata are populated and up to date with the current codebase
49
+ 2. **Run the `design-mcp-server` skill** — if the tool/resource surface hasn't been mapped yet, work through domain design
50
+ 3. **Add tools/resources/prompts** — scaffold new definitions using the `add-tool`, `add-app-tool`, `add-resource`, `add-prompt` skills
51
+ 4. **Add services** — scaffold domain service integrations using the `add-service` skill
52
+ 5. **Add tests** — scaffold tests for existing definitions using the `add-test` skill
53
+ 6. **Field-test definitions** — exercise tools/resources/prompts with real inputs using the `field-test` skill, get a report of issues and pain points
54
+ 7. **Run `devcheck`** — lint, format, typecheck, and security audit
55
+ 8. **Run the `security-pass` skill** — audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation
56
+ 9. **Run the `polish-docs-meta` skill** — finalize README, CHANGELOG, metadata, and agent protocol for shipping
57
+ 10. **Run the `maintenance` skill** — investigate changelogs, adopt upstream changes, and sync skills after `bun update --latest`
58
+
59
+ Tailor suggestions to what's actually missing or stale — don't recite the full list every time.
60
+
61
+ ---
62
+
63
+ ## Core Rules
64
+
65
+ - **Logic throws, framework catches.** Tool/resource handlers are pure — throw on failure, no `try/catch`. Plain `Error` is fine; the framework catches, classifies, and formats. Use error factories (`notFound()`, `validationError()`, etc.) when the error code matters.
66
+ - **Use `ctx.log`** for request-scoped logging. No `console` calls.
67
+ - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
68
+ - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
69
+ - **Secrets in env vars only** — never hardcoded.
70
+ - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
71
+
72
+ ---
73
+
74
+ ## Patterns
75
+
76
+ ### Tool
77
+
78
+ ```ts
79
+ import { tool, z } from '@cyanheads/mcp-ts-core';
80
+ import { getOpenAlexService } from '@/services/openalex/openalex-service.js';
81
+ import { ENTITY_TYPES } from '@/services/openalex/types.js';
82
+
83
+ export const resolveNameTool = tool('openalex_resolve_name', {
84
+ description: 'Resolve a name or partial name to an OpenAlex ID. Returns up to 10 matches with disambiguation hints.',
85
+ annotations: { readOnlyHint: true, openWorldHint: true },
86
+ input: z.object({
87
+ entity_type: z.enum(ENTITY_TYPES).optional().describe('Entity type to search. Omit for cross-entity search.'),
88
+ query: z.string().describe('Name or partial name to resolve.'),
89
+ }),
90
+ output: z.object({
91
+ results: z.array(z.object({
92
+ id: z.string().describe('OpenAlex ID.'),
93
+ display_name: z.string().describe('Human-readable name.'),
94
+ entity_type: z.string().describe('Entity type.'),
95
+ })).describe('Autocomplete matches, up to 10.'),
96
+ }),
97
+
98
+ async handler(input, ctx) {
99
+ const service = getOpenAlexService();
100
+ const result = await service.autocomplete({ entityType: input.entity_type, query: input.query }, ctx);
101
+ ctx.log.info('Name resolved', { query: input.query, matchCount: result.results.length });
102
+ return result;
103
+ },
104
+
105
+ // format() populates content[] — the markdown twin of structuredContent.
106
+ // Different clients forward different surfaces (Claude Code → structuredContent,
107
+ // Claude Desktop → content[]); both must carry the same data.
108
+ // Enforced at lint time: every terminal field in `output` must appear in format()'s
109
+ // rendered text via sentinel injection. The linter is locale-aware — digit-group
110
+ // separators (commas, periods, spaces) are stripped before matching, so
111
+ // `.toLocaleString()` is fine on linted numbers. Compact/scientific forms still fail.
112
+ format: (result) => {
113
+ if (result.results.length === 0) {
114
+ return [{ type: 'text', text: 'No matches found.' }];
115
+ }
116
+ const lines = result.results.map((r) => `**${r.display_name}** (${r.entity_type}) — ${r.id}`);
117
+ return [{ type: 'text', text: lines.join('\n') }];
118
+ },
119
+ });
120
+ ```
121
+
122
+ ### Prompt
123
+
124
+ ```ts
125
+ import { prompt, z } from '@cyanheads/mcp-ts-core';
126
+
127
+ export const researchLandscapePrompt = prompt('openalex_research_landscape', {
128
+ description: 'Analyzes the research landscape for a topic: volume trends, top authors/institutions, open access rates.',
129
+ args: z.object({
130
+ topic: z.string().describe('Research area to analyze.'),
131
+ }),
132
+ generate: (args) => [
133
+ { role: 'user', content: { type: 'text', text: `Analyze the research landscape for: "${args.topic}"\n\nUse the OpenAlex tools to build a quantitative profile...` } },
134
+ ],
135
+ });
136
+ ```
137
+
138
+ ---
139
+
140
+ ## Context
141
+
142
+ Handlers receive a unified `ctx` object. Key properties:
143
+
144
+ | Property | Description |
145
+ |:---------|:------------|
146
+ | `ctx.log` | Request-scoped logger — `.debug()`, `.info()`, `.notice()`, `.warning()`, `.error()`. Auto-correlates requestId, traceId, tenantId. |
147
+ | `ctx.state` | Tenant-scoped KV — `.get(key)`, `.set(key, value, { ttl? })`, `.delete(key)`, `.list(prefix, { cursor, limit })`. Accepts any serializable value. |
148
+ | `ctx.elicit` | Ask user for structured input. **Check for presence first:** `if (ctx.elicit) { ... }` |
149
+ | `ctx.sample` | Request LLM completion from the client. **Check for presence first:** `if (ctx.sample) { ... }` |
150
+ | `ctx.signal` | `AbortSignal` for cancellation. Passed to `fetch()` in the OpenAlex service. |
151
+ | `ctx.progress` | Task progress (present when `task: true`) — `.setTotal(n)`, `.increment()`, `.update(message)`. |
152
+ | `ctx.fail` | Typed throw keyed by a declared `errors[]` contract — `ctx.fail(reason, msg?, data?)`. Auto-populates `data.reason` and resolves `code` from the contract. |
153
+ | `ctx.recoveryFor` | Opt-in resolver returning `{ recovery: { hint } }` for a declared reason. Spread into `data` at throw site to surface contract recovery on the wire. |
154
+ | `ctx.requestId` | Unique request ID. |
155
+ | `ctx.tenantId` | `'default'` for stdio and `MCP_AUTH_MODE=none` over HTTP; JWT `tid` claim for `MCP_AUTH_MODE=jwt`/`oauth`. |
156
+
157
+ ---
158
+
159
+ ## Errors
160
+
161
+ Handlers throw — the framework catches, classifies, and formats.
162
+
163
+ **Recommended: typed error contract.** Declare `errors: [{ reason, code, when, recovery, retryable? }]` on `tool()` to receive a typed `ctx.fail(reason, …)` keyed by the declared reason union — `ctx.fail('typo')` is a TS error, `data.reason` is auto-populated, and the linter enforces conformance against the handler. The `recovery` field is required (≥5 words). Spread `ctx.recoveryFor('reason')` into `data` to opt the contract recovery onto the wire.
164
+
165
+ ```ts
166
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
167
+
168
+ errors: [
169
+ { reason: 'semantic_per_page_cap', code: JsonRpcErrorCode.ValidationError,
170
+ when: 'per_page exceeds the semantic-search cap',
171
+ recovery: 'Reduce per_page to 50 or less, or switch search_mode to keyword.' },
172
+ ],
173
+ async handler(input, ctx) {
174
+ if (overCap) throw ctx.fail('semantic_per_page_cap', message, { ...ctx.recoveryFor('semantic_per_page_cap') });
175
+ }
176
+ ```
177
+
178
+ **Declare contracts inline on each tool, even when similar across tools.** The contract is part of the tool's documented public surface — reading one tool definition file should give the full picture. Don't extract a shared `errors[]` constant; per-tool repetition is the intended cost of locality.
179
+
180
+ The OpenAlex service throws factory errors (`notFound`, `rateLimited`, etc.) based on upstream status codes; those bubble through and are auto-classified. Baseline codes (`InternalError`, `ServiceUnavailable`, `Timeout`, `ValidationError`, `SerializationError`) bubble freely without needing to be declared on a contract.
181
+
182
+ **Fallback for ad-hoc throws:** error factories or plain `Error`.
183
+
184
+ ```ts
185
+ import { notFound, serviceUnavailable } from '@cyanheads/mcp-ts-core/errors';
186
+ throw notFound('Item not found', { itemId });
187
+ throw serviceUnavailable('API unavailable', { url }, { cause: err });
188
+ throw new Error('Item not found'); // → auto-classified to NotFound
189
+ ```
190
+
191
+ See framework CLAUDE.md for the full auto-classification table and all available factories.
192
+
193
+ ---
194
+
195
+ ## Structure
196
+
197
+ ```text
198
+ src/
199
+ index.ts # createApp() entry point
200
+ config/
201
+ server-config.ts # OPENALEX_API_KEY, OPENALEX_BASE_URL
202
+ services/
203
+ openalex/
204
+ openalex-service.ts # API client (init/accessor pattern)
205
+ types.ts # Domain types
206
+ mcp-server/
207
+ tools/definitions/
208
+ search-entities.tool.ts # openalex_search_entities
209
+ analyze-trends.tool.ts # openalex_analyze_trends
210
+ resolve-name.tool.ts # openalex_resolve_name
211
+ citation-graph.tool.ts # openalex_get_citation_graph
212
+ prompts/definitions/
213
+ literature-review.prompt.ts # openalex_literature_review
214
+ research-landscape.prompt.ts # openalex_research_landscape
215
+ ```
216
+
217
+ ---
218
+
219
+ ## Naming
220
+
221
+ | What | Convention | Example |
222
+ |:-----|:-----------|:--------|
223
+ | Files | kebab-case with suffix | `search-entities.tool.ts` |
224
+ | Tool/prompt names | snake_case with `openalex_` prefix | `openalex_search_entities` |
225
+ | Directories | kebab-case | `src/services/openalex/` |
226
+ | Descriptions | Single string or template literal, no `+` concatenation | `'Search items by query and filter.'` |
227
+
228
+ ---
229
+
230
+ ## Skills
231
+
232
+ Skills are modular instructions in `skills/` at the project root. Read them directly when a task matches — e.g., `skills/add-tool/SKILL.md` when adding a tool.
233
+
234
+ **Agent skill directory:** Copy skills into the directory your agent discovers (Claude Code: `.claude/skills/`, others: equivalent). This makes skills available as context without needing to reference `skills/` paths manually. After framework updates, run the `maintenance` skill — it re-syncs the agent directory automatically (Phase B).
235
+
236
+ Available skills:
237
+
238
+ | Skill | Purpose |
239
+ |:------|:--------|
240
+ | `setup` | Post-init project orientation |
241
+ | `design-mcp-server` | Design tool surface, resources, and services for a new server |
242
+ | `add-tool` | Scaffold a new tool definition |
243
+ | `add-app-tool` | Scaffold an MCP App tool + paired UI resource |
244
+ | `add-resource` | Scaffold a new resource definition |
245
+ | `add-prompt` | Scaffold a new prompt definition |
246
+ | `add-service` | Scaffold a new service integration |
247
+ | `add-test` | Scaffold test file for a tool, resource, or service |
248
+ | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
249
+ | `tool-defs-analysis` | Read-only audit of LLM-facing definition language (voice, leaks, recovery, sparsity, structure) across tools/resources/prompts |
250
+ | `security-pass` | Audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation |
251
+ | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
252
+ | `devcheck` | Lint, format, typecheck, audit |
253
+ | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
254
+ | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
255
+ | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
256
+ | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills |
257
+ | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` |
258
+ | `report-issue-local` | File a bug or feature request against this server's own repo |
259
+ | `api-auth` | Auth modes, scopes, JWT/OAuth |
260
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
261
+ | `api-config` | AppConfig, parseConfig, env vars |
262
+ | `api-context` | Context interface, logger, state, progress |
263
+ | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
264
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
265
+ | `api-services` | LLM, Speech, Graph services |
266
+ | `api-testing` | createMockContext, test patterns |
267
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
268
+ | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
269
+ | `api-workers` | Cloudflare Workers runtime |
270
+
271
+ When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
272
+
273
+ ---
274
+
275
+ ## Commands
276
+
277
+ | Command | Purpose |
278
+ |:--------|:--------|
279
+ | `bun run build` | Compile TypeScript |
280
+ | `bun run rebuild` | Clean + build |
281
+ | `bun run clean` | Remove build artifacts |
282
+ | `bun run devcheck` | Lint + format + typecheck + security + changelog sync |
283
+ | `bun run audit:refresh` | Delete `bun.lock`, reinstall, re-audit. Use when `devcheck` flags a transitive advisory — stale lockfile can mask already-patched deps. If advisory survives, it's real. |
284
+ | `bun run tree` | Generate directory structure doc |
285
+ | `bun run format` | Auto-fix formatting |
286
+ | `bun run lint:mcp` | Validate MCP tool/prompt definitions |
287
+ | `bun run list-skills` | List available skills |
288
+ | `bun run test` | Run tests |
289
+ | `bun run start:stdio` | Production mode (stdio, after `rebuild`) |
290
+ | `bun run start:http` | Production mode (HTTP, after `rebuild`) |
291
+ | `bun run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
292
+ | `bun run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
293
+ | `bun run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
294
+
295
+ ---
296
+
297
+ ## Bundling
298
+
299
+ `bun run bundle` produces a `.mcpb` extension bundle for one-click install in Claude Desktop. MCPB is stdio-only — HTTP deployments are unaffected. Consumers who don't need it can delete `manifest.json` and `.mcpbignore`; `lint:packaging` skips cleanly.
300
+
301
+ **Adding an env var requires both files:** `server.json` (registry discovery, `environmentVariables[]`) and `manifest.json` (bundle install UX, `mcp_config.env` + `user_config`). `lint:packaging` (run by `devcheck`) verifies the env var names match.
302
+
303
+ ---
304
+
305
+ ## Changelog
306
+
307
+ Directory-based, grouped by minor series via the `.x` semver-wildcard convention. Source of truth: `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.6.x/0.6.12.md`) — one file per release, shipped in the npm package. At release, author the per-version file with a concrete version and date, then run `bun run changelog:build` to regenerate the rollup. `changelog/template.md` is a **pristine format reference** — never edited or moved. `CHANGELOG.md` is a **navigation index** regenerated by `bun run changelog:build` — devcheck hard-fails on drift; never hand-edit it.
308
+
309
+ ---
310
+
311
+ ## Publishing
312
+
313
+ Run the `release-and-publish` skill — it runs the verification gate (`devcheck`, `rebuild`, `test`), pushes commits and tags, then publishes to every applicable destination. The full reference:
314
+
315
+ ```bash
316
+ bun publish --access public
317
+
318
+ docker buildx build --platform linux/amd64,linux/arm64 \
319
+ -t ghcr.io/cyanheads/openalex-mcp-server:<version> \
320
+ -t ghcr.io/cyanheads/openalex-mcp-server:latest \
321
+ --push .
322
+ ```
323
+
324
+ ---
325
+
326
+ ## Imports
327
+
328
+ ```ts
329
+ // Framework — z is re-exported, no separate zod import needed
330
+ import { tool, z } from '@cyanheads/mcp-ts-core';
331
+ import { McpError, JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
332
+
333
+ // Server's own code — via path alias
334
+ import { getOpenAlexService } from '@/services/openalex/openalex-service.js';
335
+ ```
336
+
337
+ ---
338
+
339
+ ## Checklist
340
+
341
+ - [ ] Zod schemas: all fields have `.describe()`, only JSON-Schema-serializable types (no `z.custom()`, `z.date()`, `z.transform()`, `z.bigint()`, `z.symbol()`, `z.void()`, `z.map()`, `z.set()`, `z.function()`, `z.nan()`)
342
+ - [ ] Optional nested objects: handler guards for empty inner values from form-based clients (`if (input.obj?.field && ...)`, not just `if (input.obj)`). When regex/length constraints matter, use `z.union([z.literal(''), z.string().regex(...).describe(...)])` — literal variants are exempt from `describe-on-fields`.
343
+ - [ ] `format()` renders every terminal field in `output` — enforced by `format-parity` linter via sentinel injection (locale-aware: digit-group separators stripped before matching)
344
+ - [ ] JSDoc `@fileoverview` + `@module` on every file
345
+ - [ ] `ctx.log` for logging, `ctx.state` for storage
346
+ - [ ] Handlers throw on failure — error factories or plain `Error`, no try/catch
347
+ - [ ] OpenAlex wrapping: raw/domain/output schemas reviewed against real upstream sparsity/nullability before finalizing required vs optional fields
348
+ - [ ] OpenAlex wrapping: normalization and `format()` preserve uncertainty — do not fabricate facts from missing upstream data
349
+ - [ ] OpenAlex wrapping: tests include at least one sparse payload case with omitted upstream fields
350
+ - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
351
+ - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
352
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
353
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
354
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
355
+ - [ ] `bun run devcheck` passes
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Agent Protocol
2
2
 
3
3
  **Server:** openalex-mcp-server
4
- **Version:** 0.6.14
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.6`
4
+ **Version:** 0.6.16
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
 
8
8
  > **Read the framework docs first:** `node_modules/@cyanheads/mcp-ts-core/CLAUDE.md` contains the full API reference — builders, Context, error codes, exports, patterns. This file covers server-specific conventions only.
@@ -26,6 +26,7 @@
26
26
  | Tool | `openalex_search_entities` | Search, filter, sort, or retrieve by ID |
27
27
  | Tool | `openalex_analyze_trends` | Group-by aggregation for trends/distributions |
28
28
  | Tool | `openalex_resolve_name` | Name-to-ID resolution via autocomplete |
29
+ | Tool | `openalex_get_citation_graph` | One-hop citation graph traversal (cites/cited_by/related_to) |
29
30
  | Prompt | `openalex_literature_review` | Guided systematic literature search workflow |
30
31
  | Prompt | `openalex_research_landscape` | Quantitative research landscape analysis |
31
32
 
@@ -66,6 +67,7 @@ Tailor suggestions to what's actually missing or stale — don't recite the full
66
67
  - **Use `ctx.state`** for tenant-scoped storage. Never access persistence directly.
67
68
  - **Check `ctx.elicit` / `ctx.sample`** for presence before calling.
68
69
  - **Secrets in env vars only** — never hardcoded.
70
+ - **Close the loop on issues.** When implementing work tracked by a GitHub issue, comment on the issue with what landed and close it. Do both — a comment without a close leaves stale issues open; a close without a comment leaves no record of what shipped. The comment is for future readers — state the concrete changes, not the conversation that produced them.
69
71
 
70
72
  ---
71
73
 
@@ -164,7 +166,7 @@ Handlers throw — the framework catches, classifies, and formats.
164
166
  import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
165
167
 
166
168
  errors: [
167
- { reason: 'semantic_per_page_cap', code: JsonRpcErrorCode.InvalidParams,
169
+ { reason: 'semantic_per_page_cap', code: JsonRpcErrorCode.ValidationError,
168
170
  when: 'per_page exceeds the semantic-search cap',
169
171
  recovery: 'Reduce per_page to 50 or less, or switch search_mode to keyword.' },
170
172
  ],
@@ -206,6 +208,7 @@ src/
206
208
  search-entities.tool.ts # openalex_search_entities
207
209
  analyze-trends.tool.ts # openalex_analyze_trends
208
210
  resolve-name.tool.ts # openalex_resolve_name
211
+ citation-graph.tool.ts # openalex_get_citation_graph
209
212
  prompts/definitions/
210
213
  literature-review.prompt.ts # openalex_literature_review
211
214
  research-landscape.prompt.ts # openalex_research_landscape
@@ -243,25 +246,27 @@ Available skills:
243
246
  | `add-service` | Scaffold a new service integration |
244
247
  | `add-test` | Scaffold test file for a tool, resource, or service |
245
248
  | `field-test` | Exercise tools/resources/prompts with real inputs, verify behavior, report issues |
246
- | `security-pass` | Audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation |
247
249
  | `tool-defs-analysis` | Read-only audit of LLM-facing definition language (voice, leaks, recovery, sparsity, structure) across tools/resources/prompts |
250
+ | `security-pass` | Audit handlers for MCP-specific security gaps: output injection, scope blast radius, input sinks, tenant isolation |
251
+ | `code-simplifier` | Post-session cleanup against `git diff` — modernize syntax, consolidate duplication, align with the codebase |
248
252
  | `devcheck` | Lint, format, typecheck, audit |
249
253
  | `polish-docs-meta` | Finalize docs, README, metadata, and agent protocol for shipping |
254
+ | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
255
+ | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
250
256
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills |
251
257
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` |
252
258
  | `report-issue-local` | File a bug or feature request against this server's own repo |
253
259
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
254
- | `api-canvas` | DataCanvas primitive — register tabular data, run SQL, export, `spillover()` helper. Tier 3 opt-in (DuckDB) |
260
+ | `api-canvas` | DataCanvas: register tabular data, run SQL, export, plus the `spillover()` helper — Tier 3 opt-in |
255
261
  | `api-config` | AppConfig, parseConfig, env vars |
256
262
  | `api-context` | Context interface, logger, state, progress |
257
263
  | `api-errors` | McpError, JsonRpcErrorCode, error patterns |
264
+ | `api-linter` | Definition linter rule catalog — invoked by `bun run lint:mcp` and `devcheck` |
258
265
  | `api-services` | LLM, Speech, Graph services |
259
266
  | `api-testing` | createMockContext, test patterns |
260
- | `api-utils` | Formatting, parsing, security, pagination, scheduling |
267
+ | `api-utils` | Formatting, parsing, security, pagination, scheduling, telemetry helpers |
261
268
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
262
269
  | `api-workers` | Cloudflare Workers runtime |
263
- | `api-linter` | MCP definition lint rules reference (rule IDs, severities, fixes) |
264
- | `release-and-publish` | End-to-end ship workflow (npm + MCP Registry + GHCR) |
265
270
 
266
271
  When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
267
272
 
@@ -344,4 +349,7 @@ import { getOpenAlexService } from '@/services/openalex/openalex-service.js';
344
349
  - [ ] OpenAlex wrapping: tests include at least one sparse payload case with omitted upstream fields
345
350
  - [ ] Registered in `createApp()` arrays (directly or via barrel exports)
346
351
  - [ ] Tests use `createMockContext()` from `@cyanheads/mcp-ts-core/testing`
352
+ - [ ] `.codex-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; `interface.displayName` = package name; `interface.shortDescription` from `package.json` description
353
+ - [ ] `.codex-plugin/mcp.json` updated — server name key matches `package.json` name; env vars added for any required API keys
354
+ - [ ] `.claude-plugin/plugin.json` populated — `name`, `version`, `description`, `repository`, `license` from `package.json`; inline `mcpServers` entry with server name key, env vars for any required API keys
347
355
  - [ ] `bun run devcheck` passes
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.6.14-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/openalex-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/openalex-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openalex-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.6.16-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/openalex-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-^1.29.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/openalex-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/openalex-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-^6.0.3-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.3.0-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
package/dist/index.js CHANGED
@@ -17,6 +17,7 @@ await createApp({
17
17
  instructions: 'Use the openalex_* tools to query the OpenAlex scholarly catalog (works, authors, sources, institutions, topics, keywords, publishers, funders): resolve names to IDs, search/filter/sort or fetch by ID, and group_by for trends. Names are ambiguous and IDs are not — call openalex_resolve_name before filtering by entity.',
18
18
  landing: {
19
19
  tagline: 'Search the OpenAlex catalog — 270M+ works, 90M+ authors, 100K+ sources.',
20
+ requireAuth: false,
20
21
  repoRoot: 'https://github.com/cyanheads/openalex-mcp-server',
21
22
  envExample: {
22
23
  OPENALEX_API_KEY: 'your-openalex-api-key',
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;GAGG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,MAAM,8DAA8D,CAAC;AACtG,OAAO,EAAE,uBAAuB,EAAE,MAAM,+DAA+D,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,uDAAuD,CAAC;AAC7F,OAAO,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wDAAwD,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAE9E,MAAM,SAAS,CAAC;IACd,KAAK,EAAE,CAAC,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,oBAAoB,CAAC;IACrF,OAAO,EAAE,CAAC,sBAAsB,EAAE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YACL,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,sBAAsB,EAAE;YACnD,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,2BAA2B,EAAE;SACzD;KACF;IACD,KAAK;QACH,mBAAmB,EAAE,CAAC;IACxB,CAAC;CACF,CAAC,CAAC"}
@@ -25,7 +25,6 @@ export declare const analyzeTrendsTool: import("@cyanheads/mcp-ts-core").ToolDef
25
25
  count: z.ZodNumber;
26
26
  groups_count: z.ZodNullable<z.ZodNumber>;
27
27
  next_cursor: z.ZodNullable<z.ZodString>;
28
- echo: z.ZodString;
29
28
  }, z.core.$strip>;
30
29
  groups: z.ZodArray<z.ZodObject<{
31
30
  key: z.ZodString;
@@ -50,7 +49,7 @@ export declare const analyzeTrendsTool: import("@cyanheads/mcp-ts-core").ToolDef
50
49
  readonly recovery: "Confirm the API key has access to this entity type or endpoint, then retry the request.";
51
50
  }, {
52
51
  readonly reason: "upstream_invalid_params";
53
- readonly code: JsonRpcErrorCode.InvalidParams;
52
+ readonly code: JsonRpcErrorCode.ValidationError;
54
53
  readonly when: "OpenAlex rejected the group_by or filter as malformed (HTTP 400).";
55
54
  readonly recovery: "OpenAlex rejected a token in group_by or filters. The upstream message names the rejected key and lists valid alternatives — read it, then retry with a valid filter key (e.g. abstract.search, title.search, default.search for full-text inside filters) or a valid group_by field for the entity_type.";
56
55
  }, {
@@ -58,5 +57,9 @@ export declare const analyzeTrendsTool: import("@cyanheads/mcp-ts-core").ToolDef
58
57
  readonly code: JsonRpcErrorCode.ValidationError;
59
58
  readonly when: "OpenAlex rejected the request as semantically invalid (HTTP 422).";
60
59
  readonly recovery: "Read the upstream message for the specific field, then adjust the request to satisfy validation.";
61
- }]>;
60
+ }], {
61
+ readonly echo: z.ZodString;
62
+ readonly entityTotal: z.ZodNumber;
63
+ readonly notice: z.ZodOptional<z.ZodString>;
64
+ }>;
62
65
  //# sourceMappingURL=analyze-trends.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-trends.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-trends.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyK5B,CAAC"}
1
+ {"version":3,"file":"analyze-trends.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-trends.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyM5B,CAAC"}
@@ -32,7 +32,7 @@ export const analyzeTrendsTool = tool('openalex_analyze_trends', {
32
32
  },
33
33
  {
34
34
  reason: 'upstream_invalid_params',
35
- code: JsonRpcErrorCode.InvalidParams,
35
+ code: JsonRpcErrorCode.ValidationError,
36
36
  when: 'OpenAlex rejected the group_by or filter as malformed (HTTP 400).',
37
37
  recovery: 'OpenAlex rejected a token in group_by or filters. The upstream message names the rejected key and lists valid alternatives — read it, then retry with a valid filter key (e.g. abstract.search, title.search, default.search for full-text inside filters) or a valid group_by field for the entity_type.',
38
38
  },
@@ -77,9 +77,6 @@ export const analyzeTrendsTool = tool('openalex_analyze_trends', {
77
77
  .string()
78
78
  .nullable()
79
79
  .describe('Cursor for next page of groups. null if no more groups.'),
80
- echo: z
81
- .string()
82
- .describe('Compact echo of the input criteria (entity_type, group_by, filters) — useful when no groups are returned so callers see what was actually requested.'),
83
80
  })
84
81
  .describe('Aggregation metadata.'),
85
82
  groups: z
@@ -92,6 +89,25 @@ export const analyzeTrendsTool = tool('openalex_analyze_trends', {
92
89
  .describe('A single aggregation group with its key, display label, and entity count.'))
93
90
  .describe('Aggregation groups with counts.'),
94
91
  }),
92
+ // Agent-facing context for the success path — the criteria as parsed, the entity
93
+ // total, and recovery guidance for empty group results. Populated via ctx.enrich(...)
94
+ // so it reaches structuredContent and content[] alike.
95
+ enrichment: {
96
+ echo: z
97
+ .string()
98
+ .describe('Compact echo of the input criteria (entity_type, group_by, filters) — useful when no groups are returned so callers see what was actually requested.'),
99
+ entityTotal: z
100
+ .number()
101
+ .describe('Total entities matching the filters before grouping (across all pages).'),
102
+ notice: z
103
+ .string()
104
+ .optional()
105
+ .describe('Recovery guidance when no groups are returned — echoes the criteria and suggests how to adjust. Absent when groups are present.'),
106
+ },
107
+ enrichmentTrailer: {
108
+ echo: { label: 'Query' },
109
+ entityTotal: { label: 'Entity Total' },
110
+ },
95
111
  async handler(input, ctx) {
96
112
  const service = getOpenAlexService();
97
113
  const result = await service.analyze({
@@ -108,18 +124,27 @@ export const analyzeTrendsTool = tool('openalex_analyze_trends', {
108
124
  totalCount: result.meta.count,
109
125
  groupCount: result.groups.length,
110
126
  });
127
+ const echo = buildAnalyzeEcho(input);
128
+ ctx.enrich({ echo, entityTotal: result.meta.count });
129
+ if (result.groups.length === 0) {
130
+ ctx.enrich.notice(`No groups returned for ${echo}. Try removing filters or grouping by a different field.`);
131
+ }
111
132
  return {
112
- meta: { ...result.meta, echo: buildAnalyzeEcho(input) },
133
+ meta: {
134
+ count: result.meta.count,
135
+ groups_count: result.meta.groups_count,
136
+ next_cursor: result.meta.next_cursor,
137
+ },
113
138
  groups: result.groups,
114
139
  };
115
140
  },
116
141
  format: (result) => {
117
- const heading = `${result.meta.count} total entities across ${result.meta.groups_count ?? result.groups.length} groups on this page (${result.meta.echo})`;
142
+ const heading = `${result.meta.count} total entities across ${result.meta.groups_count ?? result.groups.length} groups on this page`;
118
143
  if (result.groups.length === 0) {
119
144
  return [
120
145
  {
121
146
  type: 'text',
122
- text: `No groups found for ${result.meta.echo}. (count=${result.meta.count}, groups_count=${result.meta.groups_count ?? 0})\n\nTry removing filters or grouping by a different field.`,
147
+ text: `No groups found. (count=${result.meta.count}, groups_count=${result.meta.groups_count ?? 0})`,
123
148
  },
124
149
  ];
125
150
  }
@@ -1 +1 @@
1
- {"version":3,"file":"analyze-trends.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-trends.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,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IAC/D,WAAW,EACT,oXAAoX;IACtX,SAAS,EACP,oHAAoH;IACtH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,4CAA4C;YAClD,SAAS,EAAE,IAAI;YACf,QAAQ,EACN,sFAAsF;SACzF;QACD;YACE,MAAM,EAAE,uBAAuB;YAC/B,IAAI,EAAE,gBAAgB,CAAC,YAAY;YACnC,IAAI,EAAE,2CAA2C;YACjD,QAAQ,EACN,0FAA0F;SAC7F;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,8DAA8D;YACpE,QAAQ,EACN,yFAAyF;SAC5F;QACD;YACE,MAAM,EAAE,yBAAyB;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
+ {"version":3,"file":"analyze-trends.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/analyze-trends.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,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,yBAAyB,EAAE;IAC/D,WAAW,EACT,oXAAoX;IACtX,SAAS,EACP,oHAAoH;IACtH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,4CAA4C;YAClD,SAAS,EAAE,IAAI;YACf,QAAQ,EACN,sFAAsF;SACzF;QACD;YACE,MAAM,EAAE,uBAAuB;YAC/B,IAAI,EAAE,gBAAgB,CAAC,YAAY;YACnC,IAAI,EAAE,2CAA2C;YACjD,QAAQ,EACN,0FAA0F;SAC7F;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,8DAA8D;YACpE,QAAQ,EACN,yFAAyF;SAC5F;QACD;YACE,MAAM,EAAE,yBAAyB;YACjC,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,mEAAmE;YACzE,QAAQ,EACN,2SAA2S;SAC9S;QACD;YACE,MAAM,EAAE,4BAA4B;YACpC,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,mEAAmE;YACzE,QAAQ,EACN,kGAAkG;SACrG;K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AE,YAAY,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IACjF,IAAI,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3D,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,IAAI,KAAK,CAAC,eAAe;QAAE,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IAC9D,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC3B,CAAC"}
@@ -21,7 +21,6 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
21
21
  count: z.ZodNumber;
22
22
  per_page: z.ZodNumber;
23
23
  next_cursor: z.ZodNullable<z.ZodString>;
24
- echo: z.ZodString;
25
24
  }, z.core.$strip>;
26
25
  results: z.ZodArray<z.ZodObject<{
27
26
  id: z.ZodString;
@@ -45,12 +44,12 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
45
44
  readonly recovery: "Confirm the API key has access to this entity type or endpoint, then retry the request.";
46
45
  }, {
47
46
  readonly reason: "upstream_invalid_params";
48
- readonly code: JsonRpcErrorCode.InvalidParams;
47
+ readonly code: JsonRpcErrorCode.ValidationError;
49
48
  readonly when: "OpenAlex rejected the seed_id, filter, or sort as malformed (HTTP 400).";
50
49
  readonly recovery: "Read the upstream message for the rejected token, then retry with a valid OpenAlex work ID (W…), DOI, or PMID for seed_id, or correct the filter/sort field name it names.";
51
50
  }, {
52
51
  readonly reason: "reserved_filter_key";
53
- readonly code: JsonRpcErrorCode.InvalidParams;
52
+ readonly code: JsonRpcErrorCode.ValidationError;
54
53
  readonly when: "filters contains cites/cited_by/related_to — the direction parameter reserves those keys.";
55
54
  readonly recovery: "Remove the reserved key from filters, or restate the relationship through direction.";
56
55
  }, {
@@ -58,5 +57,9 @@ export declare const getCitationGraphTool: import("@cyanheads/mcp-ts-core").Tool
58
57
  readonly code: JsonRpcErrorCode.NotFound;
59
58
  readonly when: "OpenAlex has no work matching the seed_id.";
60
59
  readonly recovery: "Verify seed_id with openalex_resolve_name, or pass a known OpenAlex work ID (W…), DOI, PMID, or PMCID.";
61
- }]>;
60
+ }], {
61
+ readonly echo: z.ZodString;
62
+ readonly totalEdges: z.ZodNumber;
63
+ readonly notice: z.ZodOptional<z.ZodString>;
64
+ }>;
62
65
  //# sourceMappingURL=citation-graph.tool.d.ts.map
@@ -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;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA+CjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuM/B,CAAC"}
1
+ {"version":3,"file":"citation-graph.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA+CjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+N/B,CAAC"}
@@ -60,13 +60,13 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
60
60
  },
61
61
  {
62
62
  reason: 'upstream_invalid_params',
63
- code: JsonRpcErrorCode.InvalidParams,
63
+ code: JsonRpcErrorCode.ValidationError,
64
64
  when: 'OpenAlex rejected the seed_id, filter, or sort as malformed (HTTP 400).',
65
65
  recovery: 'Read the upstream message for the rejected token, then retry with a valid OpenAlex work ID (W…), DOI, or PMID for seed_id, or correct the filter/sort field name it names.',
66
66
  },
67
67
  {
68
68
  reason: 'reserved_filter_key',
69
- code: JsonRpcErrorCode.InvalidParams,
69
+ code: JsonRpcErrorCode.ValidationError,
70
70
  when: 'filters contains cites/cited_by/related_to — the direction parameter reserves those keys.',
71
71
  recovery: 'Remove the reserved key from filters, or restate the relationship through direction.',
72
72
  },
@@ -120,9 +120,6 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
120
120
  .string()
121
121
  .nullable()
122
122
  .describe('Cursor for next page. null if no more results.'),
123
- echo: z
124
- .string()
125
- .describe('Compact echo of seed_id, direction, filters, sort — useful when empty.'),
126
123
  })
127
124
  .describe('Result metadata including pagination.'),
128
125
  results: z
@@ -135,6 +132,23 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
135
132
  .describe('A single OpenAlex work record on the citation graph. Additional fields vary by `select`.'))
136
133
  .describe('Works on the citation graph in this direction.'),
137
134
  }),
135
+ // Agent-facing context for the success path — the query as parsed (seed + direction),
136
+ // the total edge count, and recovery guidance for empty traversals. Populated via
137
+ // ctx.enrich(...) so it reaches structuredContent and content[] alike.
138
+ enrichment: {
139
+ echo: z
140
+ .string()
141
+ .describe('Compact echo of seed_id, direction, filters, sort — useful when no edges are returned so callers see what was actually queried.'),
142
+ totalEdges: z.number().describe('Total edges from seed_id in this direction across all pages.'),
143
+ notice: z
144
+ .string()
145
+ .optional()
146
+ .describe('Recovery guidance when no edges are returned — suggests verifying the seed_id, broadening filters, or trying a different direction. Absent when results are present.'),
147
+ },
148
+ enrichmentTrailer: {
149
+ echo: { label: 'Query' },
150
+ totalEdges: { label: 'Total Edges' },
151
+ },
138
152
  async handler(input, ctx) {
139
153
  if (input.filters) {
140
154
  const reserved = Object.keys(input.filters).find((key) => RESERVED_FILTER_KEYS.has(key));
@@ -166,10 +180,16 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
166
180
  resultCount: result.results.length,
167
181
  totalCount: result.meta.count,
168
182
  });
183
+ const echo = buildCitationEcho(input);
184
+ ctx.enrich({ echo, totalEdges: result.meta.count });
185
+ if (result.results.length === 0) {
186
+ ctx.enrich.notice(`No edges for ${echo}. Verify the seed_id with openalex_resolve_name, broaden filters, or try a different direction.`);
187
+ }
169
188
  return {
170
189
  meta: {
171
- ...result.meta,
172
- echo: buildCitationEcho(input),
190
+ count: result.meta.count,
191
+ per_page: result.meta.per_page,
192
+ next_cursor: result.meta.next_cursor,
173
193
  },
174
194
  results: result.results,
175
195
  };
@@ -180,9 +200,8 @@ export const getCitationGraphTool = tool('openalex_get_citation_graph', {
180
200
  const header = result.meta.next_cursor
181
201
  ? `**${countLabel}** — next cursor: \`${result.meta.next_cursor}\``
182
202
  : `**${countLabel}**`;
183
- lines.push(`${header} | ${result.meta.echo}`);
203
+ lines.push(header);
184
204
  if (result.results.length === 0) {
185
- lines.push('', `No edges for ${result.meta.echo}.`, 'Verify the seed_id (use openalex_resolve_name), broaden filters, or try a different direction.');
186
205
  return [{ type: 'text', text: lines.join('\n') }];
187
206
  }
188
207
  for (const record of result.results) {
@@ -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;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAEpD;;;;;;;GAOG;AACH,KAAK,UAAU,mBAAmB,CAChC,OAA8C,EAC9C,MAAc,EACd,GAAY;IAEZ,MAAM,MAAM,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AAI,CAAC,GAAG,kBAAkB,CAAC,MAAsB,CAAC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"citation-graph.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/citation-graph.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAG7E,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAEpD;;;;;;;GAOG;AACH,KAAK,UAAU,mBAAmB,CAChC,OAA8C,EAC9C,MAAc,EACd,GAAY;IAEZ,MAAM,MAAM,GAAG,MAAM,OAAO,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,CAAC,CAAC;IAC9F,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACjC,IAAI,CAAC,MAAM,EAAE,EAAE,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CAAC,8BAA8B,MAAM,2BAA2B,CAAC,CAAC;IACnF,CAAC;IACD,OAAO,MAAM,CAAC,EAAE,CAAC,OAAO,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,CAAU,CAAC;AAGhE,MAAM,oBAAoB,GAAwB,IAAI,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CAAC,OAAO,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,MAAsB,CAAC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
@@ -45,7 +45,7 @@ export declare const resolveNameTool: import("@cyanheads/mcp-ts-core").ToolDefin
45
45
  readonly recovery: "Confirm the API key has access to autocomplete, then retry the request.";
46
46
  }, {
47
47
  readonly reason: "upstream_invalid_params";
48
- readonly code: JsonRpcErrorCode.InvalidParams;
48
+ readonly code: JsonRpcErrorCode.ValidationError;
49
49
  readonly when: "OpenAlex rejected the autocomplete query as malformed (HTTP 400).";
50
50
  readonly recovery: "Trim the query, check filter syntax, and ensure the entity_type is a supported value.";
51
51
  }, {
@@ -53,5 +53,7 @@ export declare const resolveNameTool: import("@cyanheads/mcp-ts-core").ToolDefin
53
53
  readonly code: JsonRpcErrorCode.ValidationError;
54
54
  readonly when: "OpenAlex rejected the autocomplete request as semantically invalid (HTTP 422).";
55
55
  readonly recovery: "Read the upstream message for the specific field, then adjust the request to satisfy validation.";
56
- }]>;
56
+ }], {
57
+ readonly notice: z.ZodOptional<z.ZodString>;
58
+ }>;
57
59
  //# sourceMappingURL=resolve-name.tool.d.ts.map
@@ -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;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuI1B,CAAC"}
1
+ {"version":3,"file":"resolve-name.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAIjE,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyJ1B,CAAC"}
@@ -32,7 +32,7 @@ export const resolveNameTool = tool('openalex_resolve_name', {
32
32
  },
33
33
  {
34
34
  reason: 'upstream_invalid_params',
35
- code: JsonRpcErrorCode.InvalidParams,
35
+ code: JsonRpcErrorCode.ValidationError,
36
36
  when: 'OpenAlex rejected the autocomplete query as malformed (HTTP 400).',
37
37
  recovery: 'Trim the query, check filter syntax, and ensure the entity_type is a supported value.',
38
38
  },
@@ -85,6 +85,14 @@ export const resolveNameTool = tool('openalex_resolve_name', {
85
85
  .describe('A single autocomplete match with its ID, name, entity type, activity stats, and a disambiguation hint.'))
86
86
  .describe('Autocomplete matches, up to 10.'),
87
87
  }),
88
+ // Agent-facing success-path context — a notice when the query matched nothing so the
89
+ // caller sees explicit guidance rather than a silent empty array.
90
+ enrichment: {
91
+ notice: z
92
+ .string()
93
+ .optional()
94
+ .describe('Recovery guidance when no matches were found — echoes the query and suggests corrections. Absent when results are present.'),
95
+ },
88
96
  async handler(input, ctx) {
89
97
  const service = getOpenAlexService();
90
98
  const result = await service.autocomplete({
@@ -97,6 +105,10 @@ export const resolveNameTool = tool('openalex_resolve_name', {
97
105
  entityType: input.entity_type ?? 'all',
98
106
  matchCount: result.results.length,
99
107
  });
108
+ if (result.results.length === 0) {
109
+ const scope = input.entity_type ? ` among ${input.entity_type}` : '';
110
+ ctx.enrich.notice(`No matches for "${input.query}"${scope}. Try a shorter name, alternate spelling, or omit entity_type to search across all types.`);
111
+ }
100
112
  return result;
101
113
  },
102
114
  format: (result) => {
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-name.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.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,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC3D,WAAW,EACT,mOAAmO;IACrO,SAAS,EACP,kHAAkH;IACpH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,yDAAyD;YAC/D,SAAS,EAAE,IAAI;YACf,QAAQ,EACN,sFAAsF;SACzF;QACD;YACE,MAAM,EAAE,uBAAuB;YAC/B,IAAI,EAAE,gBAAgB,CAAC,YAAY;YACnC,IAAI,EAAE,2CAA2C;YACjD,QAAQ,EACN,0FAA0F;SAC7F;QACD;YACE,MAAM,EAAE,oBAAoB;YAC5B,IAAI,EAAE,gBAAgB,CAAC,SAAS;YAChC,IAAI,EAAE,oDAAoD;YAC1D,QAAQ,EAAE,yEAAyE;SACpF;QACD;YACE,MAAM,EAAE,yBAAyB;YACjC,IAAI,EAAE,gBAAgB,CAAC,aAAa;YACpC,IAAI,EAAE,mEAAmE;YACzE,QAAQ,EACN,uFAAuF;SAC1F;QACD;YACE,MAAM,EAAE,4BAA4B;YACpC,IAAI,EAAE,gBAAgB,CAAC,eAAe;YACtC,IAAI,EAAE,gFAAgF;YACtF,QAAQ,EACN,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AAC,GAAG,CAAC,CAAC,WAAW,QAAQ,CAAC,CAAC;YAC9E,IAAI,CAAC,CAAC,IAAI;gBAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YACjC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,CAAC;QACD,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"resolve-name.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/resolve-name.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,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,uBAAuB,EAAE;IAC3D,WAAW,EACT,mOAAmO;IACrO,SAAS,EACP,kHAAkH;IACpH,WAAW,EAAE,EAAE,YAAY,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE;IAC9E,MAAM,EAAE;QACN;YACE,MAAM,EAAE,cAAc;YACtB,IAAI,EAAE,gBAAgB,CAAC,WAAW;YAClC,IAAI,EAAE,yDAAyD;YAC/D,SAAS,EAAE,IAAI;YACf,QAAQ,EACN,sFAAsF;SACzF;QACD;YACE,MAAM,EAAE,uBAAuB;YAC/B,IAAI,EAAE,gBAAgB,CAAC,YAAY;YACnC,I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,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF,CAAC,CAAC"}
@@ -34,7 +34,6 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
34
34
  count: z.ZodNumber;
35
35
  per_page: z.ZodNumber;
36
36
  next_cursor: z.ZodNullable<z.ZodString>;
37
- echo: z.ZodString;
38
37
  }, z.core.$strip>;
39
38
  results: z.ZodArray<z.ZodObject<{
40
39
  id: z.ZodString;
@@ -78,7 +77,7 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
78
77
  readonly recovery: "Confirm the API key has access to this entity type or endpoint, then retry the request.";
79
78
  }, {
80
79
  readonly reason: "upstream_invalid_params";
81
- readonly code: JsonRpcErrorCode.InvalidParams;
80
+ readonly code: JsonRpcErrorCode.ValidationError;
82
81
  readonly when: "OpenAlex rejected the request as malformed (HTTP 400).";
83
82
  readonly recovery: "Read the upstream message for the rejected token, then retry after correcting the filter operator, sort field, or select field name it names.";
84
83
  }, {
@@ -86,5 +85,9 @@ export declare const searchEntitiesTool: import("@cyanheads/mcp-ts-core").ToolDe
86
85
  readonly code: JsonRpcErrorCode.ValidationError;
87
86
  readonly when: "OpenAlex rejected the request as semantically invalid (HTTP 422).";
88
87
  readonly recovery: "Read the upstream message for the specific field, then adjust the request to satisfy validation.";
89
- }]>;
88
+ }], {
89
+ readonly echo: z.ZodString;
90
+ readonly totalCount: z.ZodNumber;
91
+ readonly notice: z.ZodOptional<z.ZodString>;
92
+ }>;
90
93
  //# sourceMappingURL=search-entities.tool.d.ts.map
@@ -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;AAiCjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6P7B,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;AAiCjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsR7B,CAAC"}
@@ -79,7 +79,7 @@ export const searchEntitiesTool = tool('openalex_search_entities', {
79
79
  },
80
80
  {
81
81
  reason: 'upstream_invalid_params',
82
- code: JsonRpcErrorCode.InvalidParams,
82
+ code: JsonRpcErrorCode.ValidationError,
83
83
  when: 'OpenAlex rejected the request as malformed (HTTP 400).',
84
84
  recovery: 'Read the upstream message for the rejected token, then retry after correcting the filter operator, sort field, or select field name it names.',
85
85
  },
@@ -148,9 +148,6 @@ export const searchEntitiesTool = tool('openalex_search_entities', {
148
148
  .string()
149
149
  .nullable()
150
150
  .describe('Cursor for next page. null if no more results.'),
151
- echo: z
152
- .string()
153
- .describe('Compact echo of the input criteria (entity_type, query, filters, sort, search_mode) — useful when results are empty so callers see what was actually searched.'),
154
151
  })
155
152
  .describe('Result metadata including pagination.'),
156
153
  results: z
@@ -163,6 +160,23 @@ export const searchEntitiesTool = tool('openalex_search_entities', {
163
160
  .describe('A single OpenAlex entity record. Core `id` and `display_name` are guaranteed; additional fields vary by entity_type and `select`.'))
164
161
  .describe('OpenAlex entity objects passed through unchanged. Additional fields depend on entity_type and select.'),
165
162
  }),
163
+ // Agent-facing context for the success path — the query/filters as parsed, the
164
+ // total match count, and recovery guidance for empty results. Populated via
165
+ // ctx.enrich(...) so it reaches structuredContent and content[] alike.
166
+ enrichment: {
167
+ echo: z
168
+ .string()
169
+ .describe('Compact echo of the input criteria (entity_type, query, filters, sort, search_mode) — useful when results are empty so callers see what was actually searched.'),
170
+ totalCount: z.number().describe('Total results matching the query/filters across all pages.'),
171
+ notice: z
172
+ .string()
173
+ .optional()
174
+ .describe('Recovery guidance when results are empty — echoes the criteria and suggests how to broaden. Absent on successful result pages.'),
175
+ },
176
+ enrichmentTrailer: {
177
+ echo: { label: 'Query' },
178
+ totalCount: { label: 'Total' },
179
+ },
166
180
  async handler(input, ctx) {
167
181
  if (input.search_mode === 'semantic' && input.per_page > SEMANTIC_PER_PAGE_CAP) {
168
182
  throw ctx.fail('semantic_per_page_cap', `Semantic search supports at most ${SEMANTIC_PER_PAGE_CAP} results per page. Reduce per_page or switch search_mode.`, {
@@ -199,8 +213,17 @@ export const searchEntitiesTool = tool('openalex_search_entities', {
199
213
  resultCount: result.results.length,
200
214
  totalCount: result.meta.count,
201
215
  });
216
+ const echo = buildSearchEcho(input);
217
+ ctx.enrich({ echo, totalCount: result.meta.count });
218
+ if (result.results.length === 0) {
219
+ ctx.enrich.notice(`No matches for ${echo}. Try broadening the query, removing filters, or switching search_mode.`);
220
+ }
202
221
  return {
203
- meta: { ...result.meta, echo: buildSearchEcho(input) },
222
+ meta: {
223
+ count: result.meta.count,
224
+ per_page: result.meta.per_page,
225
+ next_cursor: result.meta.next_cursor,
226
+ },
204
227
  results: result.results,
205
228
  };
206
229
  },
@@ -210,9 +233,8 @@ export const searchEntitiesTool = tool('openalex_search_entities', {
210
233
  const header = result.meta.next_cursor
211
234
  ? `**${countLabel}** — next cursor: \`${result.meta.next_cursor}\``
212
235
  : `**${countLabel}**`;
213
- lines.push(`${header} | ${result.meta.echo}`);
236
+ lines.push(header);
214
237
  if (result.results.length === 0) {
215
- lines.push('', `No matches for ${result.meta.echo}.`, 'Try broadening the query, removing filters, or switching search_mode.');
216
238
  return [{ type: 'text', text: lines.join('\n') }];
217
239
  }
218
240
  for (const record of result.results) {
@@ -1 +1 @@
1
- {"version":3,"file":"search-entities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.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,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,MAAM,8BAA8B,CAAC;AAE/E,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,UAAU,GAAG,GAAG,CAAC;AAEvB,SAAS,eAAe,CAAC,KASxB;IACC,MAAM,KAAK,GAAG,CAAC,eAAe,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IACnD,IAAI,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;IAC3C,IAAI,KAAK,CAAC,KAAK;QAAE,KAAK,CAAC,IAAI,CAAC,UAAU,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC;IACtD,IAAI,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,WAAW,KAAK,SAAS,EAAE,CAAC;QACzD,KAAK,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;IACjD,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC3D,KAAK,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACzD,CA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AAC;QACvF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW;YACpC,CAAC,CAAC,KAAK,UAAU,uBAAuB,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI;YACnE,CAAC,CAAC,KAAK,UAAU,IAAI,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,GAAG,MAAM,MAAM,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAE9C,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,KAAK,CAAC,IAAI,CACR,EAAE,EACF,kBAAkB,MAAM,CAAC,IAAI,CAAC,IAAI,GAAG,EACrC,uEAAuE,CACxE,CAAC;YACF,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,MAAsB,CAAC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"search-entities.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/search-entities.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,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAqB,M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AC,QAAQ;gBAC9B,WAAW,EAAE,MAAM,CAAC,IAAI,CAAC,WAAW;aACrC;YACD,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC;IACJ,CAAC;IAED,MAAM,EAAE,CAAC,MAAM,EAAE,EAAE;QACjB,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,MAAM,UAAU,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,gBAAgB,MAAM,CAAC,IAAI,CAAC,QAAQ,WAAW,CAAC;QACvF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,WAAW;YACpC,CAAC,CAAC,KAAK,UAAU,uBAAuB,MAAM,CAAC,IAAI,CAAC,WAAW,IAAI;YACnE,CAAC,CAAC,KAAK,UAAU,IAAI,CAAC;QACxB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAEnB,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAChC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACpD,CAAC;QAED,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACpC,KAAK,CAAC,IAAI,CAAC,GAAG,kBAAkB,CAAC,MAAsB,CAAC,CAAC,CAAC;QAC5D,CAAC;QAED,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACpD,CAAC;CACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyanheads/openalex-mcp-server",
3
- "version": "0.6.14",
3
+ "version": "0.6.16",
4
4
  "description": "Access the OpenAlex academic research catalog - 270M+ publications through MCP. STDIO & Streamable HTTP.",
5
5
  "mcpName": "io.github.cyanheads/openalex-mcp-server",
6
6
  "type": "module",
@@ -9,14 +9,15 @@
9
9
  "bin": {
10
10
  "openalex-mcp-server": "dist/index.js"
11
11
  },
12
- "files": ["dist/", "README.md", "LICENSE", "CLAUDE.md", "Dockerfile", "server.json"],
12
+ "files": ["dist/", "README.md", "LICENSE", "CLAUDE.md", "AGENTS.md", "Dockerfile", "server.json"],
13
13
  "scripts": {
14
14
  "build": "bun scripts/build.ts",
15
15
  "rebuild": "bun scripts/clean.ts && bun scripts/build.ts",
16
16
  "clean": "bun scripts/clean.ts",
17
17
  "devcheck": "bun scripts/devcheck.ts",
18
18
  "tree": "bun scripts/tree.ts",
19
- "format": "biome check --write --unsafe .",
19
+ "format": "biome check --write .",
20
+ "format:unsafe": "biome check --write --unsafe .",
20
21
  "lint:mcp": "bun scripts/lint-mcp.ts",
21
22
  "lint:packaging": "bun scripts/lint-packaging.ts",
22
23
  "list-skills": "bun scripts/list-skills.ts",
@@ -37,10 +38,13 @@
37
38
  "academic-research",
38
39
  "academic-search",
39
40
  "bibliometrics",
41
+ "bun",
40
42
  "citation-analysis",
41
43
  "literature-search",
42
44
  "scholarly-data",
43
45
  "scholarly-research",
46
+ "stdio",
47
+ "streamable-http",
44
48
  "typescript"
45
49
  ],
46
50
  "author": "cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/openalex-mcp-server#readme)",
@@ -72,12 +76,12 @@
72
76
  "access": "public"
73
77
  },
74
78
  "dependencies": {
75
- "@cyanheads/mcp-ts-core": "^0.9.6",
79
+ "@cyanheads/mcp-ts-core": "^0.9.16",
76
80
  "pino-pretty": "^13.1.3",
77
81
  "zod": "^4.4.3"
78
82
  },
79
83
  "devDependencies": {
80
- "@biomejs/biome": "^2.4.15",
84
+ "@biomejs/biome": "^2.4.16",
81
85
  "@types/node": "^25.9.1",
82
86
  "depcheck": "^1.4.7",
83
87
  "ignore": "^7.0.5",
package/server.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "url": "https://github.com/cyanheads/openalex-mcp-server",
7
7
  "source": "github"
8
8
  },
9
- "version": "0.6.14",
9
+ "version": "0.6.16",
10
10
  "remotes": [
11
11
  {
12
12
  "type": "streamable-http",
@@ -19,7 +19,7 @@
19
19
  "registryBaseUrl": "https://registry.npmjs.org",
20
20
  "identifier": "@cyanheads/openalex-mcp-server",
21
21
  "runtimeHint": "node",
22
- "version": "0.6.14",
22
+ "version": "0.6.16",
23
23
  "packageArguments": [
24
24
  {
25
25
  "type": "positional",
@@ -61,7 +61,7 @@
61
61
  "registryBaseUrl": "https://registry.npmjs.org",
62
62
  "identifier": "@cyanheads/openalex-mcp-server",
63
63
  "runtimeHint": "node",
64
- "version": "0.6.14",
64
+ "version": "0.6.16",
65
65
  "packageArguments": [
66
66
  {
67
67
  "type": "positional",