@cyanheads/orcid-mcp-server 0.1.6 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/CLAUDE.md +6 -2
  2. package/README.md +31 -8
  3. package/changelog/0.2.x/0.2.0.md +22 -0
  4. package/changelog/0.2.x/0.2.1.md +18 -0
  5. package/dist/index.js +5 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/mcp-server/resources/definitions/researcher-works.resource.d.ts.map +1 -1
  8. package/dist/mcp-server/resources/definitions/researcher-works.resource.js +11 -1
  9. package/dist/mcp-server/resources/definitions/researcher-works.resource.js.map +1 -1
  10. package/dist/mcp-server/tools/definitions/get-research-resources.tool.d.ts +42 -0
  11. package/dist/mcp-server/tools/definitions/get-research-resources.tool.d.ts.map +1 -0
  12. package/dist/mcp-server/tools/definitions/get-research-resources.tool.js +157 -0
  13. package/dist/mcp-server/tools/definitions/get-research-resources.tool.js.map +1 -0
  14. package/dist/mcp-server/tools/definitions/get-work-detail.tool.d.ts +44 -0
  15. package/dist/mcp-server/tools/definitions/get-work-detail.tool.d.ts.map +1 -0
  16. package/dist/mcp-server/tools/definitions/get-work-detail.tool.js +169 -0
  17. package/dist/mcp-server/tools/definitions/get-work-detail.tool.js.map +1 -0
  18. package/dist/mcp-server/tools/definitions/get-works.tool.d.ts +1 -0
  19. package/dist/mcp-server/tools/definitions/get-works.tool.d.ts.map +1 -1
  20. package/dist/mcp-server/tools/definitions/get-works.tool.js +7 -1
  21. package/dist/mcp-server/tools/definitions/get-works.tool.js.map +1 -1
  22. package/dist/mcp-server/tools/definitions/resolve-researcher.tool.js +1 -1
  23. package/dist/mcp-server/tools/definitions/resolve-researcher.tool.js.map +1 -1
  24. package/dist/mcp-server/tools/definitions/search-researchers.tool.js +2 -2
  25. package/dist/mcp-server/tools/definitions/search-researchers.tool.js.map +1 -1
  26. package/dist/services/orcid/normalizers.d.ts +3 -1
  27. package/dist/services/orcid/normalizers.d.ts.map +1 -1
  28. package/dist/services/orcid/normalizers.js +81 -0
  29. package/dist/services/orcid/normalizers.js.map +1 -1
  30. package/dist/services/orcid/orcid-service.d.ts +11 -1
  31. package/dist/services/orcid/orcid-service.d.ts.map +1 -1
  32. package/dist/services/orcid/orcid-service.js +23 -1
  33. package/dist/services/orcid/orcid-service.js.map +1 -1
  34. package/dist/services/orcid/types.d.ts +142 -2
  35. package/dist/services/orcid/types.d.ts.map +1 -1
  36. package/package.json +4 -3
  37. package/server.json +3 -3
package/CLAUDE.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Developer Protocol
2
2
 
3
3
  **Server:** orcid-mcp-server
4
- **Version:** 0.1.6
5
- **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.16`
4
+ **Version:** 0.2.1
5
+ **Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.9.21`
6
6
  **Engines:** Bun ≥1.3.0, Node ≥24.0.0
7
7
  **MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
8
8
  **Zod:** ^4.4.3
@@ -279,6 +279,7 @@ Available skills:
279
279
  | `git-wrapup` | Land working-tree changes as a versioned commit + annotated tag — version bump, changelog, verify, tag. Local only. |
280
280
  | `release-and-publish` | Push + npm + MCP Registry + GH Release + Docker. Picks up from `git-wrapup` |
281
281
  | `maintenance` | Investigate changelogs, adopt upstream changes, sync skills to agent dirs |
282
+ | `orchestrations` | Chain task skills into a gated multi-phase pipeline — build-out, QA-fix, update-ship — when you can spawn sub-agents |
282
283
  | `report-issue-framework` | File a bug or feature request against `@cyanheads/mcp-ts-core` via `gh` CLI |
283
284
  | `report-issue-local` | File a bug or feature request against this server's own repo via `gh` CLI |
284
285
  | `api-auth` | Auth modes, scopes, JWT/OAuth |
@@ -293,6 +294,8 @@ Available skills:
293
294
  | `api-telemetry` | OTel catalog: spans, metrics, completion logs, env config, cardinality rules |
294
295
  | `api-workers` | Cloudflare Workers runtime |
295
296
 
297
+ **Chaining skills into pipelines.** When the user wants a multi-phase effort — build this server out, QA-and-fix the surface, update-and-ship — *and you can spawn sub-agents*, `skills/orchestrations/SKILL.md` sequences the task skills above into a gated pipeline with verification at each step. Read it to drive the run. Optional: skip it if you can't orchestrate sub-agents, and ignore it entirely if you were *spawned* as one — you've already been scoped to a single phase.
298
+
296
299
  When you complete a skill's checklist, check the boxes and add a completion timestamp at the end (e.g., `Completed: 2026-03-11`).
297
300
 
298
301
  ---
@@ -316,6 +319,7 @@ When you complete a skill's checklist, check the boxes and add a completion time
316
319
  | `npm run start:http` | Production mode (HTTP) |
317
320
  | `npm run changelog:build` | Regenerate `CHANGELOG.md` from `changelog/*.md` |
318
321
  | `npm run changelog:check` | Verify `CHANGELOG.md` is in sync (used by devcheck) |
322
+ | `npm run release:github` | Create GitHub Release from the current annotated tag |
319
323
  | `npm run bundle` | Build and pack as `.mcpb` for one-click Claude Desktop install |
320
324
 
321
325
  ---
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
  <h1>@cyanheads/orcid-mcp-server</h1>
3
3
  <p><b>Search and retrieve researcher profiles, works, affiliations, funding, and peer review records from the ORCID registry via MCP. STDIO or Streamable HTTP.</b>
4
- <div>7 Tools • 2 Resources</div>
4
+ <div>9 Tools • 2 Resources</div>
5
5
  </p>
6
6
  </div>
7
7
 
8
8
  <div align="center">
9
9
 
10
- [![Version](https://img.shields.io/badge/Version-0.1.6-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/orcid-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/orcid-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/orcid-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.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
10
+ [![Version](https://img.shields.io/badge/Version-0.2.1-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/orcid-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/orcid-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/orcid-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.2-blueviolet.svg?style=flat-square)](https://bun.sh/)
11
11
 
12
12
  </div>
13
13
 
@@ -29,16 +29,18 @@
29
29
 
30
30
  ## Tools
31
31
 
32
- Seven tools organized around three workflows — author disambiguation, researcher profiling, and cross-server identifier chaining:
32
+ Nine tools organized around three workflows — author disambiguation, researcher profiling, and cross-server identifier chaining:
33
33
 
34
34
  | Tool | Description |
35
35
  |:-----|:------------|
36
36
  | `orcid_search_researchers` | Search the ORCID registry using structured field params (name, affiliation, keyword, ROR ID, DOI, PMID). All params are ANDed into a Solr query against the expanded-search endpoint, returning ORCID iDs with inline name and institution data. |
37
37
  | `orcid_get_profile` | Fetch a researcher's public profile: name, biography, keywords, researcher URLs, and external identifiers (Scopus Author ID, ResearcherID, Loop, etc.). |
38
- | `orcid_get_works` | Retrieve works (publications, datasets, software, preprints) for a researcher. Returns titles, types, publication dates, journal names, and all external identifiers DOIs, PMIDs, arXiv IDs — ready for chaining to Crossref, PubMed, or arXiv servers. |
38
+ | `orcid_get_works` | Retrieve works (publications, datasets, software, preprints) for a researcher. Returns summaries with put-codes, titles, types, dates, journal names, and external identifiers. Pass put-codes to `orcid_get_work_detail` for abstracts and full contributor lists. |
39
+ | `orcid_get_work_detail` | Fetch the full detail record for a single work by its put-code (from `orcid_get_works`). Returns the abstract, all contributors with CRediT roles, complete external IDs, citation metadata, journal title, and URL. |
39
40
  | `orcid_get_affiliations` | Fetch affiliation records for a researcher. Accepts a `types` list to filter which sections to return: `employment`, `education`, `invited-positions`, `distinctions`, `memberships`, `qualifications`, `services`, or `all`. |
40
41
  | `orcid_get_funding` | Fetch funding records: grants, contracts, awards, and salary awards, with funder names, grant numbers, and funding periods. |
41
42
  | `orcid_get_peer_reviews` | Fetch peer review activity: convening organizations, reviewer role, review type, completion dates, and ISSN-keyed group identifiers. |
43
+ | `orcid_get_research_resources` | List research resources associated with a researcher — compute allocations, equipment access, lab facilities, and data resources. Sparsely populated; most researchers have no entries. |
42
44
  | `orcid_resolve_researcher` | Disambiguate an ambiguous author name to a verified ORCID iD. Returns a ranked list of up to 5 candidates with transparent signals: name match type, institution overlap, and whether a DOI or PMID anchor was used. |
43
45
 
44
46
  ### `orcid_search_researchers`
@@ -75,6 +77,16 @@ Retrieve the works list for a researcher.
75
77
 
76
78
  ---
77
79
 
80
+ ### `orcid_get_work_detail`
81
+
82
+ Fetch the full detail record for a single work by its put-code.
83
+
84
+ - Put-codes come from `orcid_get_works` — each work summary now carries its `put_code`
85
+ - Returns the abstract, all contributors with CRediT roles, the complete external ID list, citation metadata (BibTeX or other formats when deposited), journal title, and URL
86
+ - The works list is intentionally lightweight; use this when you need the abstract or contributor list without a round-trip to Crossref or PubMed
87
+
88
+ ---
89
+
78
90
  ### `orcid_get_affiliations`
79
91
 
80
92
  Fetch affiliation records by type, using a single `/activities` call filtered client-side.
@@ -105,6 +117,17 @@ Fetch peer review activity for a researcher.
105
117
 
106
118
  ---
107
119
 
120
+ ### `orcid_get_research_resources`
121
+
122
+ List research resources associated with a researcher.
123
+
124
+ - Covers compute allocations, equipment access, lab facilities, data resources, and clinical study registrations
125
+ - A newer ORCID section that is sparsely populated — most researchers have no entries, and absence does not imply none exist
126
+ - Entries are typically deposited by resource-allocation systems (e.g. ACCESS, XSEDE) rather than self-reported
127
+ - Returns resource title, hosting organization (with disambiguated org ID), external identifiers (often a portal URI), and access period
128
+
129
+ ---
130
+
108
131
  ### `orcid_resolve_researcher`
109
132
 
110
133
  Disambiguate an author name to a verified ORCID iD.
@@ -156,7 +179,7 @@ A public instance is available at `https://orcid.caseyjhand.com/mcp` — no inst
156
179
  ```json
157
180
  {
158
181
  "mcpServers": {
159
- "orcid": {
182
+ "orcid-mcp-server": {
160
183
  "type": "streamable-http",
161
184
  "url": "https://orcid.caseyjhand.com/mcp"
162
185
  }
@@ -171,7 +194,7 @@ Add the following to your MCP client configuration file. No API key is required
171
194
  ```json
172
195
  {
173
196
  "mcpServers": {
174
- "orcid": {
197
+ "orcid-mcp-server": {
175
198
  "type": "stdio",
176
199
  "command": "bunx",
177
200
  "args": ["@cyanheads/orcid-mcp-server@latest"],
@@ -189,7 +212,7 @@ Or with npx (no Bun required):
189
212
  ```json
190
213
  {
191
214
  "mcpServers": {
192
- "orcid": {
215
+ "orcid-mcp-server": {
193
216
  "type": "stdio",
194
217
  "command": "npx",
195
218
  "args": ["-y", "@cyanheads/orcid-mcp-server@latest"],
@@ -207,7 +230,7 @@ Or with Docker:
207
230
  ```json
208
231
  {
209
232
  "mcpServers": {
210
- "orcid": {
233
+ "orcid-mcp-server": {
211
234
  "type": "stdio",
212
235
  "command": "docker",
213
236
  "args": [
@@ -0,0 +1,22 @@
1
+ ---
2
+ summary: "Work detail fetch, research resources tool, notFound guard for missing ORCID iDs, Solr quote fixes for name searches"
3
+ breaking: false
4
+ security: false
5
+ ---
6
+
7
+ # 0.2.0 — 2026-05-30
8
+
9
+ ## Added
10
+
11
+ - **`orcid_get_work_detail`** — fetches a full work record by `putCode` via `GET /v3.0/{orcid}/work/{putCode}`. Returns abstract, all contributors with CRediT roles, complete external IDs (DOI, PMID, arXiv, etc.), citation, journal title, and URL. ([#5](https://github.com/cyanheads/orcid-mcp-server/issues/5))
12
+ - **`orcid_get_research_resources`** — lists research resources (lab equipment, clinical study registrations, institutional facilities) via `GET /v3.0/{orcid}/research-resources`. Returns resource name, hosting organization, type, external IDs, and URL. ([#5](https://github.com/cyanheads/orcid-mcp-server/issues/5))
13
+ - **`orcid_get_works`** — now exposes `put_code` per work, enabling the list → detail chain with `orcid_get_work_detail`. ([#5](https://github.com/cyanheads/orcid-mcp-server/issues/5))
14
+
15
+ ## Changed
16
+
17
+ - **`researcher-works` resource** — non-existent or fully private ORCID iDs now surface a structured `notFound()` instead of a raw upstream error, consistent with the `researcher-profile` resource. ([#8](https://github.com/cyanheads/orcid-mcp-server/issues/8))
18
+
19
+ ## Fixed
20
+
21
+ - **`orcid_resolve_researcher`** — the `given-and-family-names` Solr clause is now quoted (`given-and-family-names:"Jennifer Doudna"` instead of `given-and-family-names:Jennifer Doudna`). Unquoted names OR-matched tokens, returning wrong candidates and inflated `numFound`. ([#4](https://github.com/cyanheads/orcid-mcp-server/issues/4))
22
+ - **`orcid_search_researchers`** — `given_name` and `family_name` Solr values are now quoted. Multi-word names (Mary Ann, Van Damme) now phrase-match correctly. ([#9](https://github.com/cyanheads/orcid-mcp-server/issues/9))
@@ -0,0 +1,18 @@
1
+ ---
2
+ summary: "Adopt @cyanheads/mcp-ts-core 0.9.21 — per-request log context fix, secret-stripped error messages, withRetry fail-fast; sync skills and scripts"
3
+ breaking: false
4
+ security: false
5
+ agent-notes: |
6
+ Framework bumped from ^0.9.16 to ^0.9.21. New scripts: scripts/release-github.ts, scripts/check-skill-versions.ts. New skills: skills/api-mirror, skills/orchestrations. Existing skills updated.
7
+ ---
8
+
9
+ # 0.2.1 — 2026-06-02
10
+
11
+ ## Changed
12
+
13
+ - **`@cyanheads/mcp-ts-core`** `^0.9.16` → `^0.9.21` — adopts three framework fixes: per-request logs and traces carry fresh request + trace/span IDs instead of the frozen boot context; `fetchWithTimeout` strips query-string secrets (e.g. `?api_key=`) from error messages and logs; `withRetry` fails fast on non-retryable errors and `ctx.fail` auto-populates the `retryable` flag.
14
+ - **`vitest`** `^4.1.7` → `^4.1.8`
15
+ - **Skills** — 8 updated (`add-service`, `add-tool`, `api-canvas`, `api-context`, `api-linter`, `api-utils`, `design-mcp-server`, `release-and-publish`); 2 new (`api-mirror`, `orchestrations`).
16
+ - **`scripts/release-github.ts`** — new script wired to `release:github` for creating GitHub Releases from annotated tags.
17
+ - **`scripts/check-skill-versions.ts`** — new script wired to `devcheck` for verifying skill version alignment.
18
+ - **README client-config keys** — renamed from `"orcid"` to `"orcid-mcp-server"` to match the full package name convention.
package/dist/index.js CHANGED
@@ -11,6 +11,8 @@ import { orcidGetAffiliations } from './mcp-server/tools/definitions/get-affilia
11
11
  import { orcidGetFunding } from './mcp-server/tools/definitions/get-funding.tool.js';
12
12
  import { orcidGetPeerReviews } from './mcp-server/tools/definitions/get-peer-reviews.tool.js';
13
13
  import { orcidGetProfile } from './mcp-server/tools/definitions/get-profile.tool.js';
14
+ import { orcidGetResearchResources } from './mcp-server/tools/definitions/get-research-resources.tool.js';
15
+ import { orcidGetWorkDetail } from './mcp-server/tools/definitions/get-work-detail.tool.js';
14
16
  import { orcidGetWorks } from './mcp-server/tools/definitions/get-works.tool.js';
15
17
  import { orcidResolveResearcher } from './mcp-server/tools/definitions/resolve-researcher.tool.js';
16
18
  import { orcidSearchResearchers } from './mcp-server/tools/definitions/search-researchers.tool.js';
@@ -20,9 +22,11 @@ await createApp({
20
22
  orcidGetProfile,
21
23
  orcidSearchResearchers,
22
24
  orcidGetWorks,
25
+ orcidGetWorkDetail,
23
26
  orcidGetAffiliations,
24
27
  orcidGetFunding,
25
28
  orcidGetPeerReviews,
29
+ orcidGetResearchResources,
26
30
  orcidResolveResearcher,
27
31
  ],
28
32
  resources: [researcherProfileResource, researcherWorksResource],
@@ -30,7 +34,7 @@ await createApp({
30
34
  setup(core) {
31
35
  initOrcidService(core.config, core.storage);
32
36
  },
33
- instructions: 'ORCID researcher registry server. Use orcid_search_researchers for exact field lookups (name + institution + DOI/PMID). Use orcid_resolve_researcher when the input is an ambiguous author name needing ranked disambiguation. Use orcid_get_profile → orcid_get_works → orcid_get_affiliations to build a researcher dossier. DOIs and PMIDs from orcid_get_works are ready for chaining to Crossref or PubMed servers.',
37
+ instructions: 'ORCID researcher registry server. Use orcid_search_researchers for exact field lookups (name + institution + DOI/PMID). Use orcid_resolve_researcher when the input is an ambiguous author name needing ranked disambiguation. Use orcid_get_profile → orcid_get_works → orcid_get_affiliations to build a researcher dossier. Pass put-codes from orcid_get_works to orcid_get_work_detail for abstracts and contributor lists. DOIs and PMIDs from orcid_get_works are ready for chaining to Crossref or PubMed servers.',
34
38
  landing: { requireAuth: false },
35
39
  });
36
40
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mEAAmE,CAAC;AAC9G,OAAO,EAAE,uBAAuB,EAAE,MAAM,iEAAiE,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,MAAM,yDAAyD,CAAC;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAC9F,OAAO,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,kDAAkD,CAAC;AACjF,OAAO,EAAE,sBAAsB,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B,EAAE,MAAM,2DAA2D,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAErE,MAAM,SAAS,CAAC;IACd,KAAK,EAAE;QACL,eAAe;QACf,sBAAsB;QACtB,aAAa;QACb,kBAAkB;QAClB,oBAAoB;QACpB,eAAe;QACf,mBAAmB;QACnB,yBAAyB;QACzB,sBAAsB;KACvB;IACD,SAAS,EAAE,CAAC,yBAAyB,EAAE,uBAAuB,CAAC;IAC/D,OAAO,EAAE,EAAE;IACX,KAAK,CAAC,IAAI;QACR,gBAAgB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC;IACD,YAAY,EACV,4fAA4f;IAC9f,OAAO,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;CAChC,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"researcher-works.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/researcher-works.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAGrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;6BAmElC,CAAC"}
1
+ {"version":3,"file":"researcher-works.resource.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/researcher-works.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAY,CAAC,EAAE,MAAM,wBAAwB,CAAC;AAIrD,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;6BA+ElC,CAAC"}
@@ -4,6 +4,7 @@
4
4
  * @module mcp-server/resources/definitions/researcher-works.resource
5
5
  */
6
6
  import { resource, z } from '@cyanheads/mcp-ts-core';
7
+ import { JsonRpcErrorCode, McpError, notFound } from '@cyanheads/mcp-ts-core/errors';
7
8
  import { getOrcidService, normalizeOrcidId } from '../../../services/orcid/orcid-service.js';
8
9
  export const researcherWorksResource = resource('orcid://researcher/{orcid_id}/works', {
9
10
  name: 'orcid-researcher-works',
@@ -42,7 +43,16 @@ export const researcherWorksResource = resource('orcid://researcher/{orcid_id}/w
42
43
  const service = getOrcidService();
43
44
  const bareId = normalizeOrcidId(params.orcid_id);
44
45
  ctx.log.debug('orcid-researcher-works resource', { orcidId: bareId });
45
- const works = await service.getWorks(params.orcid_id, ctx);
46
+ let works;
47
+ try {
48
+ works = await service.getWorks(params.orcid_id, ctx);
49
+ }
50
+ catch (err) {
51
+ if (err instanceof McpError && err.code === JsonRpcErrorCode.NotFound) {
52
+ throw notFound(`No works record found for ORCID iD ${bareId}. The record may not exist or may be fully private.`, { orcidId: bareId }, { cause: err });
53
+ }
54
+ throw err;
55
+ }
46
56
  return {
47
57
  orcidId: bareId,
48
58
  orcidUri: `https://orcid.org/${bareId}`,
@@ -1 +1 @@
1
- {"version":3,"file":"researcher-works.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/researcher-works.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAEtF,MAAM,CAAC,MAAM,uBAAuB,GAAG,QAAQ,CAAC,qCAAqC,EAAE;IACrF,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EACT,qaAAqa;IACva,QAAQ,EAAE,kBAAkB;IAE5B,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,KAAK,CACJ,0DAA0D,EAC1D,wEAAwE,CACzE;aACA,QAAQ,CACP,mGAAmG,CACpG;KACJ,CAAC;IAEF,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,oCAAoC,CAAC;QAClE,QAAQ,EAAE,C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QAEtE,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;QAE3D,OAAO;YACL,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,qBAAqB,MAAM,EAAE;YACvC,SAAS,EAAE,KAAK,CAAC,MAAM;YACvB,KAAK,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;gBACvB,GAAG,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;gBAClC,GAAG,CAAC,CAAC,CAAC,QAAQ,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAC3C,GAAG,CAAC,CAAC,CAAC,eAAe,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;gBAChE,GAAG,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;gBACvD,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;aAC7E,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"researcher-works.resource.js","sourceRoot":"","sources":["../../../../src/mcp-server/resources/definitions/researcher-works.resource.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAEtF,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AAQ,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC;gBAC3C,GAAG,CAAC,CAAC,CAAC,eAAe,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC,eAAe,EAAE,CAAC;gBAChE,GAAG,CAAC,CAAC,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;gBACvD,WAAW,EAAE,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC;aAC7E,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @fileoverview List research resources (equipment, facilities, compute allocations, etc.)
3
+ * associated with an ORCID researcher.
4
+ * @module mcp-server/tools/definitions/get-research-resources
5
+ */
6
+ import { z } from '@cyanheads/mcp-ts-core';
7
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
8
+ export declare const orcidGetResearchResources: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
9
+ orcid_id: z.ZodString;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ orcidId: z.ZodString;
12
+ orcidUri: z.ZodString;
13
+ resourceCount: z.ZodNumber;
14
+ resources: z.ZodArray<z.ZodObject<{
15
+ putCode: z.ZodNumber;
16
+ title: z.ZodOptional<z.ZodString>;
17
+ hostOrganization: z.ZodOptional<z.ZodObject<{
18
+ name: z.ZodOptional<z.ZodString>;
19
+ city: z.ZodOptional<z.ZodString>;
20
+ country: z.ZodOptional<z.ZodString>;
21
+ disambiguatedId: z.ZodOptional<z.ZodString>;
22
+ disambiguationSource: z.ZodOptional<z.ZodString>;
23
+ }, z.core.$strip>>;
24
+ externalIds: z.ZodArray<z.ZodObject<{
25
+ type: z.ZodString;
26
+ value: z.ZodString;
27
+ url: z.ZodOptional<z.ZodString>;
28
+ relationship: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>>;
30
+ startDate: z.ZodOptional<z.ZodString>;
31
+ endDate: z.ZodOptional<z.ZodString>;
32
+ url: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>>;
34
+ }, z.core.$strip>, readonly [{
35
+ readonly reason: "profile_not_found";
36
+ readonly code: JsonRpcErrorCode.NotFound;
37
+ readonly when: "The ORCID iD does not correspond to a registered researcher.";
38
+ readonly recovery: "Verify the ORCID iD is correct and try orcid_search_researchers to find valid iDs.";
39
+ }], {
40
+ readonly notice: z.ZodOptional<z.ZodString>;
41
+ }>;
42
+ //# sourceMappingURL=get-research-resources.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-research-resources.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-research-resources.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA6B3E,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuJpC,CAAC"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * @fileoverview List research resources (equipment, facilities, compute allocations, etc.)
3
+ * associated with an ORCID researcher.
4
+ * @module mcp-server/tools/definitions/get-research-resources
5
+ */
6
+ import { tool, z } from '@cyanheads/mcp-ts-core';
7
+ import { JsonRpcErrorCode, McpError } from '@cyanheads/mcp-ts-core/errors';
8
+ import { getOrcidService, normalizeOrcidId } from '../../../services/orcid/orcid-service.js';
9
+ const ExternalIdSchema = z
10
+ .object({
11
+ type: z.string().describe('Identifier type (e.g. uri, doi, grant_number).'),
12
+ value: z.string().describe('Identifier value.'),
13
+ url: z.string().optional().describe('Resolver URL for this identifier, if available.'),
14
+ relationship: z.string().optional().describe('Relationship to the resource (self or part-of).'),
15
+ })
16
+ .describe('External identifier for the research resource.');
17
+ const OrgSchema = z
18
+ .object({
19
+ name: z.string().optional().describe('Organization name.'),
20
+ city: z.string().optional().describe('City of the organization.'),
21
+ country: z.string().optional().describe('Country code of the organization.'),
22
+ disambiguatedId: z
23
+ .string()
24
+ .optional()
25
+ .describe('Disambiguated organization ID (e.g. ROR or GRID identifier).'),
26
+ disambiguationSource: z
27
+ .string()
28
+ .optional()
29
+ .describe('Source of the disambiguation ID (e.g. ROR, GRID, RINGGOLD).'),
30
+ })
31
+ .describe('Hosting organization for the research resource.');
32
+ export const orcidGetResearchResources = tool('orcid_get_research_resources', {
33
+ title: 'Get ORCID Research Resources',
34
+ description: 'List research resources associated with an ORCID researcher — compute allocations, equipment access, lab facilities, data resources, and clinical study registrations. This is a newer ORCID section; most researchers have no entries. Returns the resource title, hosting organization, external identifiers (often a URI to the allocation portal), and access period. Most entries are deposited by resource-allocation systems (e.g. ACCESS, XSEDE) rather than researchers themselves.',
35
+ annotations: { readOnlyHint: true, openWorldHint: false, idempotentHint: true },
36
+ input: z.object({
37
+ orcid_id: z
38
+ .string()
39
+ .regex(/^(https?:\/\/orcid\.org\/)?\d{4}-\d{4}-\d{4}-\d{3}[\dX]$/, 'Must be a valid ORCID iD (e.g. 0000-0001-2345-6789) or full ORCID URI.')
40
+ .describe('ORCID iD — bare format (0000-0001-2345-6789) or full URI (https://orcid.org/0000-0001-2345-6789).'),
41
+ }),
42
+ output: z.object({
43
+ orcidId: z.string().describe('Normalized ORCID iD (bare format).'),
44
+ orcidUri: z.string().describe('Full ORCID URI.'),
45
+ resourceCount: z.number().describe('Total number of research resources returned.'),
46
+ resources: z
47
+ .array(z
48
+ .object({
49
+ putCode: z.number().describe('Put-code of this research resource record.'),
50
+ title: z.string().optional().describe('Resource or proposal title.'),
51
+ hostOrganization: OrgSchema.optional().describe('Organization that hosts or manages the resource.'),
52
+ externalIds: z
53
+ .array(ExternalIdSchema)
54
+ .describe('External identifiers for the resource (often a portal URI).'),
55
+ startDate: z
56
+ .string()
57
+ .optional()
58
+ .describe('Access or allocation start date (YYYY, YYYY-MM, or YYYY-MM-DD).'),
59
+ endDate: z
60
+ .string()
61
+ .optional()
62
+ .describe('Access or allocation end date (YYYY, YYYY-MM, or YYYY-MM-DD).'),
63
+ url: z.string().optional().describe('URL for the resource or allocation record.'),
64
+ })
65
+ .describe('Research resource record.'))
66
+ .describe('Research resources associated with this ORCID iD.'),
67
+ }),
68
+ enrichment: {
69
+ notice: z
70
+ .string()
71
+ .optional()
72
+ .describe('Note when no research resources are found — this section is sparsely populated across ORCID profiles.'),
73
+ },
74
+ errors: [
75
+ {
76
+ reason: 'profile_not_found',
77
+ code: JsonRpcErrorCode.NotFound,
78
+ when: 'The ORCID iD does not correspond to a registered researcher.',
79
+ recovery: 'Verify the ORCID iD is correct and try orcid_search_researchers to find valid iDs.',
80
+ },
81
+ ],
82
+ async handler(input, ctx) {
83
+ const service = getOrcidService();
84
+ ctx.log.info('orcid_get_research_resources', { orcidId: input.orcid_id });
85
+ let resources;
86
+ try {
87
+ resources = await service.getResearchResources(input.orcid_id, ctx);
88
+ }
89
+ catch (err) {
90
+ if (err instanceof McpError && err.code === JsonRpcErrorCode.NotFound) {
91
+ throw ctx.fail('profile_not_found', `ORCID iD ${normalizeOrcidId(input.orcid_id)} not found`);
92
+ }
93
+ throw err;
94
+ }
95
+ const bareId = normalizeOrcidId(input.orcid_id);
96
+ ctx.log.info('orcid_get_research_resources completed', {
97
+ orcidId: bareId,
98
+ resourceCount: resources.length,
99
+ });
100
+ if (resources.length === 0) {
101
+ ctx.enrich.notice('No research resources found. This ORCID section is sparsely populated — most researchers have no entries. Resources are typically deposited by allocation systems (e.g. ACCESS, XSEDE) rather than self-reported.');
102
+ }
103
+ return {
104
+ orcidId: bareId,
105
+ orcidUri: `https://orcid.org/${bareId}`,
106
+ resourceCount: resources.length,
107
+ resources,
108
+ };
109
+ },
110
+ format: (result) => {
111
+ const lines = [
112
+ `## Research Resources for ORCID ${result.orcidId}`,
113
+ `**URI:** ${result.orcidUri}`,
114
+ `**Total Resources:** ${result.resourceCount}`,
115
+ ];
116
+ if (result.resources.length === 0) {
117
+ return [{ type: 'text', text: lines.join('\n') }];
118
+ }
119
+ lines.push('');
120
+ for (const r of result.resources) {
121
+ lines.push(`### ${r.title ?? '(untitled)'}`);
122
+ lines.push(`**Put-code:** ${r.putCode}`);
123
+ if (r.hostOrganization) {
124
+ const org = r.hostOrganization;
125
+ const parts = [];
126
+ if (org.name)
127
+ parts.push(org.name);
128
+ if (org.city)
129
+ parts.push(org.city);
130
+ if (org.country)
131
+ parts.push(org.country);
132
+ if (parts.length)
133
+ lines.push(`**Host:** ${parts.join(', ')}`);
134
+ if (org.disambiguatedId) {
135
+ lines.push(`**Host ID:** ${org.disambiguatedId} (${org.disambiguationSource ?? 'unknown source'})`);
136
+ }
137
+ }
138
+ if (r.startDate || r.endDate) {
139
+ const period = [r.startDate, r.endDate].filter(Boolean).join(' – ');
140
+ lines.push(`**Period:** ${period}`);
141
+ }
142
+ if (r.url)
143
+ lines.push(`**URL:** ${r.url}`);
144
+ if (r.externalIds.length) {
145
+ const idParts = r.externalIds.map((id) => {
146
+ const rel = id.relationship ? ` [${id.relationship}]` : '';
147
+ const urlPart = id.url ? ` (${id.url})` : '';
148
+ return `${id.type}:${id.value}${urlPart}${rel}`;
149
+ });
150
+ lines.push(`**IDs:** ${idParts.join(', ')}`);
151
+ }
152
+ lines.push('');
153
+ }
154
+ return [{ type: 'text', text: lines.join('\n') }];
155
+ },
156
+ });
157
+ //# sourceMappingURL=get-research-resources.tool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-research-resources.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-research-resources.tool.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,E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AG,GAAG,EAAE,CAAC;gBAClD,CAAC,CAAC,CAAC;gBACH,KAAK,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC/C,CAAC;YACD,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACjB,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"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @fileoverview Fetch the full detail record for a single ORCID work by its put-code.
3
+ * @module mcp-server/tools/definitions/get-work-detail
4
+ */
5
+ import { z } from '@cyanheads/mcp-ts-core';
6
+ import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors';
7
+ export declare const orcidGetWorkDetail: import("@cyanheads/mcp-ts-core").ToolDefinition<z.ZodObject<{
8
+ orcid_id: z.ZodString;
9
+ put_code: z.ZodNumber;
10
+ }, z.core.$strip>, z.ZodObject<{
11
+ orcidId: z.ZodString;
12
+ orcidUri: z.ZodString;
13
+ putCode: z.ZodNumber;
14
+ title: z.ZodOptional<z.ZodString>;
15
+ subtitle: z.ZodOptional<z.ZodString>;
16
+ workType: z.ZodOptional<z.ZodString>;
17
+ publicationDate: z.ZodOptional<z.ZodString>;
18
+ journalTitle: z.ZodOptional<z.ZodString>;
19
+ abstract: z.ZodOptional<z.ZodString>;
20
+ citation: z.ZodOptional<z.ZodObject<{
21
+ type: z.ZodString;
22
+ value: z.ZodString;
23
+ }, z.core.$strip>>;
24
+ url: z.ZodOptional<z.ZodString>;
25
+ externalIds: z.ZodArray<z.ZodObject<{
26
+ type: z.ZodString;
27
+ value: z.ZodString;
28
+ url: z.ZodOptional<z.ZodString>;
29
+ relationship: z.ZodOptional<z.ZodString>;
30
+ }, z.core.$strip>>;
31
+ contributors: z.ZodArray<z.ZodObject<{
32
+ name: z.ZodOptional<z.ZodString>;
33
+ orcidId: z.ZodOptional<z.ZodString>;
34
+ role: z.ZodOptional<z.ZodString>;
35
+ sequence: z.ZodOptional<z.ZodString>;
36
+ }, z.core.$strip>>;
37
+ languageCode: z.ZodOptional<z.ZodString>;
38
+ }, z.core.$strip>, readonly [{
39
+ readonly reason: "work_not_found";
40
+ readonly code: JsonRpcErrorCode.NotFound;
41
+ readonly when: "The ORCID iD or put-code does not correspond to a known record.";
42
+ readonly recovery: "Verify the ORCID iD with orcid_search_researchers and the put-code with orcid_get_works.";
43
+ }], undefined>;
44
+ //# sourceMappingURL=get-work-detail.tool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-work-detail.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/get-work-detail.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAY,MAAM,+BAA+B,CAAC;AA8B3E,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAuJ7B,CAAC"}