@cyanheads/eur-lex-mcp-server 0.1.7 → 0.1.8
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 +1 -1
- package/CLAUDE.md +1 -1
- package/README.md +3 -3
- package/changelog/0.1.x/0.1.8.md +15 -0
- package/dist/mcp-server/tools/definitions/eurlex-lookup-celex.tool.d.ts +4 -5
- package/dist/mcp-server/tools/definitions/eurlex-lookup-celex.tool.d.ts.map +1 -1
- package/dist/mcp-server/tools/definitions/eurlex-lookup-celex.tool.js +61 -38
- package/dist/mcp-server/tools/definitions/eurlex-lookup-celex.tool.js.map +1 -1
- package/dist/mcp-server/tools/definitions/index.d.ts +3 -4
- package/dist/mcp-server/tools/definitions/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/server.json +3 -3
package/AGENTS.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** eur-lex-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
4
|
+
**Version:** 0.1.8
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/CLAUDE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Developer Protocol
|
|
2
2
|
|
|
3
3
|
**Server:** eur-lex-mcp-server
|
|
4
|
-
**Version:** 0.1.
|
|
4
|
+
**Version:** 0.1.8
|
|
5
5
|
**Framework:** [@cyanheads/mcp-ts-core](https://www.npmjs.com/package/@cyanheads/mcp-ts-core) `^0.10.9`
|
|
6
6
|
**Engines:** Bun ≥1.3.0, Node ≥24.0.0
|
|
7
7
|
**MCP SDK:** `@modelcontextprotocol/sdk` ^1.29.0
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<div align="center">
|
|
9
9
|
|
|
10
|
-
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/eur-lex-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/eur-lex-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
11
|
|
|
12
12
|
</div>
|
|
13
13
|
|
|
@@ -35,7 +35,7 @@ Seven tools covering EU legal research — document discovery, content retrieval
|
|
|
35
35
|
|:-----|:------------|
|
|
36
36
|
| `eurlex_search_documents` | Search EU legislation, treaties, and preparatory acts across the CELLAR corpus. Filters by document type, date range, EuroVoc concept, author institution, and in-force status. |
|
|
37
37
|
| `eurlex_get_document` | Fetch structured metadata and full text (HTML or Formex4 XML) for a work by CELEX number or ELI URI. |
|
|
38
|
-
| `eurlex_lookup_celex` | Resolve
|
|
38
|
+
| `eurlex_lookup_celex` | Resolve an EU legal citation — a CELEX number or an ELI URI — to the canonical CELLAR work. |
|
|
39
39
|
| `eurlex_get_cases` | Search CJEU and General Court case law — judgments, orders, and Advocate General opinions — by case number, party name, subject, or date range. |
|
|
40
40
|
| `eurlex_get_relations` | Traverse the CELLAR relationship graph: amendment chain, consolidated versions, legal basis, citation network, and national transposition measures. |
|
|
41
41
|
| `eurlex_browse_subjects` | Search the EuroVoc multilingual thesaurus to resolve human-readable terms to EuroVoc concept IDs — required before using the `eurovoc_concept` filter in `eurlex_search_documents`. |
|
|
@@ -71,7 +71,7 @@ Fetch the notice and full text of an EU legal act.
|
|
|
71
71
|
|
|
72
72
|
Resolve EU legal identifiers to canonical CELLAR works.
|
|
73
73
|
|
|
74
|
-
- Accepts CELEX numbers
|
|
74
|
+
- Accepts CELEX numbers and ELI URIs
|
|
75
75
|
- Auto-detects format with `identifier_type: "auto"` (default); set explicitly when auto-detection fails
|
|
76
76
|
- Returns work URI, confirmed CELEX number, document type, and date — the prerequisite step before `eurlex_get_document` or `eurlex_get_relations`
|
|
77
77
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "eurlex_lookup_celex now resolves ELI URIs via an exact cdm:resource_legal_eli match, with bare work-level ELIs retrying once with /oj; the never-functional oj identifier_type is removed"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.8 — 2026-06-30
|
|
8
|
+
|
|
9
|
+
## Removed
|
|
10
|
+
|
|
11
|
+
- **`oj` identifier_type** ([#5](https://github.com/cyanheads/eur-lex-mcp-server/issues/5)) — dropped from `eurlex_lookup_celex`; the enum now accepts `"celex"`, `"eli"`, and `"auto"` only. It never resolved an act: an Official Journal reference has no literal in CELLAR, an issue-level reference maps to multiple works (`OJ L 119/2016` → GDPR plus the Police and PNR Directives), and it carries no year. Removing dead, never-functional surface — not a behavior change for any working input.
|
|
12
|
+
|
|
13
|
+
## Fixed
|
|
14
|
+
|
|
15
|
+
- **`eurlex_lookup_celex` ELI resolution** ([#5](https://github.com/cyanheads/eur-lex-mcp-server/issues/5)) — the ELI branch ran a `CONTAINS(STR(?work), …)` substring scan over work URIs that never matched, so ELI lookups always returned `not_found`. ELIs now resolve by exact match on the canonical `cdm:resource_legal_eli` (`xsd:anyURI`) literal. A bare work-level ELI (`{type}/{year}/{number}`) misses CELLAR's `…/{number}/oj` manifestation literal, so it retries once with `/oj` appended — deterministic and one-to-one. Manifestation-suffixed ELIs (e.g. a `/YYYY-MM-DD` consolidated version) are excluded from the retry, so a missing consolidated version never falls back to the original act.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview eurlex_lookup_celex — Resolve
|
|
2
|
+
* @fileoverview eurlex_lookup_celex — Resolve an EU legal citation (CELEX number or ELI URI) to a canonical CELLAR work.
|
|
3
3
|
* @module mcp-server/tools/definitions/eurlex-lookup-celex
|
|
4
4
|
*/
|
|
5
5
|
import { z } from '@cyanheads/mcp-ts-core';
|
|
@@ -10,7 +10,6 @@ export declare const eurlex_lookup_celex: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
10
10
|
auto: "auto";
|
|
11
11
|
celex: "celex";
|
|
12
12
|
eli: "eli";
|
|
13
|
-
oj: "oj";
|
|
14
13
|
}>>;
|
|
15
14
|
}, z.core.$strip>, z.ZodObject<{
|
|
16
15
|
found: z.ZodBoolean;
|
|
@@ -21,12 +20,12 @@ export declare const eurlex_lookup_celex: import("@cyanheads/mcp-ts-core").ToolD
|
|
|
21
20
|
}, z.core.$strip>, readonly [{
|
|
22
21
|
readonly reason: "not_found";
|
|
23
22
|
readonly code: JsonRpcErrorCode.NotFound;
|
|
24
|
-
readonly when: "The identifier resolves to no CELLAR work — check the CELEX/ELI
|
|
25
|
-
readonly recovery: "Verify the CELEX
|
|
23
|
+
readonly when: "The identifier resolves to no CELLAR work — check the CELEX/ELI format and try again.";
|
|
24
|
+
readonly recovery: "Verify the CELEX or ELI format, or try eurlex_search_documents to find the work by keyword.";
|
|
26
25
|
}, {
|
|
27
26
|
readonly reason: "ambiguous_identifier";
|
|
28
27
|
readonly code: JsonRpcErrorCode.ValidationError;
|
|
29
28
|
readonly when: "identifier_type is \"auto\" and the identifier format could not be determined.";
|
|
30
|
-
readonly recovery: "Supply identifier_type explicitly as \"celex\"
|
|
29
|
+
readonly recovery: "Supply identifier_type explicitly as \"celex\" or \"eli\" to resolve the ambiguity.";
|
|
31
30
|
}], undefined>;
|
|
32
31
|
//# sourceMappingURL=eurlex-lookup-celex.tool.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurlex-lookup-celex.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurlex-lookup-celex.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"eurlex-lookup-celex.tool.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurlex-lookup-celex.tool.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAQ,CAAC,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AA2DjE,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;cAyI9B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @fileoverview eurlex_lookup_celex — Resolve
|
|
2
|
+
* @fileoverview eurlex_lookup_celex — Resolve an EU legal citation (CELEX number or ELI URI) to a canonical CELLAR work.
|
|
3
3
|
* @module mcp-server/tools/definitions/eurlex-lookup-celex
|
|
4
4
|
*/
|
|
5
5
|
import { tool, z } from '@cyanheads/mcp-ts-core';
|
|
@@ -13,35 +13,60 @@ function isCelex(identifier) {
|
|
|
13
13
|
function isEliUri(identifier) {
|
|
14
14
|
return identifier.trim().startsWith('http://data.europa.eu/eli/');
|
|
15
15
|
}
|
|
16
|
-
/** Detect Official Journal reference format: e.g. OJ L 119, 4.5.2016 or L:2016:119 */
|
|
17
|
-
function isOjRef(identifier) {
|
|
18
|
-
return /^OJ\s+[LC]\s+\d+/i.test(identifier.trim()) || /^[LC]:\d{4}:\d+/.test(identifier.trim());
|
|
19
|
-
}
|
|
20
16
|
function detectIdentifierType(identifier) {
|
|
21
17
|
if (isCelex(identifier))
|
|
22
18
|
return 'celex';
|
|
23
19
|
if (isEliUri(identifier))
|
|
24
20
|
return 'eli';
|
|
25
|
-
if (isOjRef(identifier))
|
|
26
|
-
return 'oj';
|
|
27
21
|
return null;
|
|
28
22
|
}
|
|
23
|
+
const ELI_NAMESPACE = 'http://data.europa.eu/eli/';
|
|
24
|
+
/**
|
|
25
|
+
* A bare work-level ELI — `…/eli/{type}/{year}/{number}` with no manifestation
|
|
26
|
+
* suffix (no `/oj`, no `/YYYY-MM-DD` consolidation date). CELLAR stores the
|
|
27
|
+
* canonical OJ-manifestation literal (`…/{number}/oj`) rather than the bare
|
|
28
|
+
* work-level form, so these never match on exact lookup and must be normalized
|
|
29
|
+
* to their `/oj` form to resolve.
|
|
30
|
+
*/
|
|
31
|
+
function isBareWorkLevelEli(eli) {
|
|
32
|
+
if (!eli.startsWith(ELI_NAMESPACE))
|
|
33
|
+
return false;
|
|
34
|
+
const path = eli.slice(ELI_NAMESPACE.length).replace(/\/+$/, '');
|
|
35
|
+
return /^[^/]+\/\d{4}\/[^/]+$/.test(path);
|
|
36
|
+
}
|
|
37
|
+
/** Escape backslashes then double-quotes for safe interpolation into a SPARQL string literal. */
|
|
38
|
+
function escapeSparqlLiteral(value) {
|
|
39
|
+
return value.replace(/\\/g, '\\\\').replace(/"/g, '\\"');
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* ELI exact-match query: resolve the single work whose canonical ELI literal
|
|
43
|
+
* (`cdm:resource_legal_eli`, an `xsd:anyURI` literal) equals `safeEli`, reading
|
|
44
|
+
* its CELEX, type, and date. `safeEli` must be pre-escaped.
|
|
45
|
+
*/
|
|
46
|
+
function buildEliQuery(safeEli) {
|
|
47
|
+
return `
|
|
48
|
+
SELECT ?work ?celexNumber ?type ?date WHERE {
|
|
49
|
+
?work cdm:resource_legal_eli "${safeEli}"^^xsd:anyURI .
|
|
50
|
+
?work cdm:resource_legal_id_celex ?celexNumber .
|
|
51
|
+
OPTIONAL { ?work cdm:work_has_resource-type ?type . }
|
|
52
|
+
OPTIONAL { ?work cdm:work_date_document ?date . }
|
|
53
|
+
} LIMIT 5`;
|
|
54
|
+
}
|
|
29
55
|
export const eurlex_lookup_celex = tool('eurlex_lookup_celex', {
|
|
30
56
|
title: 'Resolve EU Legal Citation',
|
|
31
|
-
description: 'Resolve
|
|
57
|
+
description: 'Resolve an EU legal citation — a CELEX number or an ELI URI — to the canonical CELLAR work. ' +
|
|
32
58
|
'Returns the work URI, confirmed CELEX number, document type, document date, and whether the work exists in the CELLAR corpus. ' +
|
|
33
59
|
'Use this to validate identifiers before passing them to eurlex_get_document or eurlex_get_relations. ' +
|
|
34
60
|
'CELEX format: {sector}{year}{type}{number} e.g. 32016R0679 (GDPR). ' +
|
|
35
|
-
'ELI format: http://data.europa.eu/eli/{type}/{year}/{number}/oj.
|
|
36
|
-
'OJ format: OJ L 119 or L:2016:119.',
|
|
61
|
+
'ELI format: http://data.europa.eu/eli/{type}/{year}/{number} — the /oj suffix is optional.',
|
|
37
62
|
annotations: { readOnlyHint: true, idempotentHint: true, openWorldHint: true },
|
|
38
63
|
input: z.object({
|
|
39
64
|
identifier: z
|
|
40
65
|
.string()
|
|
41
66
|
.min(1)
|
|
42
|
-
.describe('The EU legal citation to resolve: a CELEX number (e.g. 32016R0679)
|
|
67
|
+
.describe('The EU legal citation to resolve: a CELEX number (e.g. 32016R0679) or a work-level ELI URI (e.g. http://data.europa.eu/eli/reg/2016/679, with or without the /oj suffix).'),
|
|
43
68
|
identifier_type: z
|
|
44
|
-
.enum(['celex', 'eli', '
|
|
69
|
+
.enum(['celex', 'eli', 'auto'])
|
|
45
70
|
.default('auto')
|
|
46
71
|
.describe('Format of the identifier. Use "auto" to let the server detect the format automatically. ' +
|
|
47
72
|
'Supply explicitly if auto-detection fails or if the identifier is ambiguous.'),
|
|
@@ -62,14 +87,14 @@ export const eurlex_lookup_celex = tool('eurlex_lookup_celex', {
|
|
|
62
87
|
{
|
|
63
88
|
reason: 'not_found',
|
|
64
89
|
code: JsonRpcErrorCode.NotFound,
|
|
65
|
-
when: 'The identifier resolves to no CELLAR work — check the CELEX/ELI
|
|
66
|
-
recovery: 'Verify the CELEX
|
|
90
|
+
when: 'The identifier resolves to no CELLAR work — check the CELEX/ELI format and try again.',
|
|
91
|
+
recovery: 'Verify the CELEX or ELI format, or try eurlex_search_documents to find the work by keyword.',
|
|
67
92
|
},
|
|
68
93
|
{
|
|
69
94
|
reason: 'ambiguous_identifier',
|
|
70
95
|
code: JsonRpcErrorCode.ValidationError,
|
|
71
96
|
when: 'identifier_type is "auto" and the identifier format could not be determined.',
|
|
72
|
-
recovery: 'Supply identifier_type explicitly as "celex"
|
|
97
|
+
recovery: 'Supply identifier_type explicitly as "celex" or "eli" to resolve the ambiguity.',
|
|
73
98
|
},
|
|
74
99
|
],
|
|
75
100
|
async handler(input, ctx) {
|
|
@@ -88,8 +113,6 @@ export const eurlex_lookup_celex = tool('eurlex_lookup_celex', {
|
|
|
88
113
|
else {
|
|
89
114
|
effectiveType = input.identifier_type;
|
|
90
115
|
}
|
|
91
|
-
// Escape double-quotes in all identifier values before interpolating into SPARQL literals.
|
|
92
|
-
const safeIdentifier = identifier.replace(/"/g, '\\"');
|
|
93
116
|
let sparql;
|
|
94
117
|
if (effectiveType === 'celex') {
|
|
95
118
|
sparql = `
|
|
@@ -97,31 +120,31 @@ SELECT ?work ?celexNumber ?type ?date WHERE {
|
|
|
97
120
|
?work cdm:resource_legal_id_celex ?celexNumber .
|
|
98
121
|
OPTIONAL { ?work cdm:work_has_resource-type ?type . }
|
|
99
122
|
OPTIONAL { ?work cdm:work_date_document ?date . }
|
|
100
|
-
FILTER(STR(?celexNumber) = "${
|
|
101
|
-
} LIMIT 5`;
|
|
102
|
-
}
|
|
103
|
-
else if (effectiveType === 'eli') {
|
|
104
|
-
// ELI URIs are mapped via cdm:work_id_document_official-journal or owl:sameAs
|
|
105
|
-
sparql = `
|
|
106
|
-
SELECT ?work ?celexNumber ?type ?date WHERE {
|
|
107
|
-
?work cdm:resource_legal_id_celex ?celexNumber .
|
|
108
|
-
OPTIONAL { ?work cdm:work_has_resource-type ?type . }
|
|
109
|
-
OPTIONAL { ?work cdm:work_date_document ?date . }
|
|
110
|
-
FILTER(CONTAINS(STR(?work), "${safeIdentifier}"))
|
|
123
|
+
FILTER(STR(?celexNumber) = "${escapeSparqlLiteral(identifier)}")
|
|
111
124
|
} LIMIT 5`;
|
|
112
125
|
}
|
|
113
126
|
else {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
127
|
+
sparql = buildEliQuery(escapeSparqlLiteral(identifier));
|
|
128
|
+
}
|
|
129
|
+
let bindings = await svc.query(sparql, ctx);
|
|
130
|
+
// CELLAR stores only the OJ-manifestation ELI literal (…/{number}/oj), so a
|
|
131
|
+
// bare work-level ELI (…/{type}/{year}/{number}) — the most common citation
|
|
132
|
+
// form — misses on exact match. Retry once with /oj appended: a deterministic,
|
|
133
|
+
// one-to-one normalization to the same act's canonical manifestation. Gated to
|
|
134
|
+
// bare work-level ELIs, so a manifestation-suffixed ELI (e.g. a /YYYY-MM-DD
|
|
135
|
+
// consolidated version) never silently falls back to the original act.
|
|
136
|
+
let bareEliRetry = false;
|
|
137
|
+
if (bindings.length === 0 && effectiveType === 'eli' && isBareWorkLevelEli(identifier)) {
|
|
138
|
+
const ojEli = `${identifier.replace(/\/+$/, '')}/oj`;
|
|
139
|
+
bindings = await svc.query(buildEliQuery(escapeSparqlLiteral(ojEli)), ctx);
|
|
140
|
+
bareEliRetry = true;
|
|
122
141
|
}
|
|
123
|
-
|
|
124
|
-
|
|
142
|
+
ctx.log.info('Citation lookup', {
|
|
143
|
+
identifier,
|
|
144
|
+
type: effectiveType,
|
|
145
|
+
bareEliRetry,
|
|
146
|
+
resultCount: bindings.length,
|
|
147
|
+
});
|
|
125
148
|
if (bindings.length === 0) {
|
|
126
149
|
throw ctx.fail('not_found', `No CELLAR work found for identifier: ${identifier}`, {
|
|
127
150
|
...ctx.recoveryFor('not_found'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eurlex-lookup-celex.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurlex-lookup-celex.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,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D,8DAA8D;AAC9D,SAAS,OAAO,CAAC,UAAkB;IACjC,OAAO,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,oEAAoE;AACpE,SAAS,QAAQ,CAAC,UAAkB;IAClC,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;AACpE,CAAC;
|
|
1
|
+
{"version":3,"file":"eurlex-lookup-celex.tool.js","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/eurlex-lookup-celex.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,EACL,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,mDAAmD,CAAC;AAE3D,8DAA8D;AAC9D,SAAS,OAAO,CAAC,UAAkB;IACjC,OAAO,sBAAsB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC,CAAC;AACxD,CAAC;AAED,oEAAoE;AACpE,SAAS,QAAQ,CAAC,UAAkB;IAClC,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;AACpE,CAAC;AAID,SAAS,oBAAoB,CAAC,UAAkB;IAC9C,IAAI,OAAO,CAAC,UAAU,CAAC;QAAE,OAAO,OAAO,CAAC;IACxC,IAAI,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,KAAK,CAAC;IACvC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,aAAa,GAAG,4BAA4B,CAAC;AAEnD;;;;;;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
eli: "eli";
|
|
141
|
-
oj: "oj";
|
|
142
141
|
}>>;
|
|
143
142
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
144
143
|
found: import("zod").ZodBoolean;
|
|
@@ -149,13 +148,13 @@ export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolD
|
|
|
149
148
|
}, import("zod/v4/core").$strip>, readonly [{
|
|
150
149
|
readonly reason: "not_found";
|
|
151
150
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound;
|
|
152
|
-
readonly when: "The identifier resolves to no CELLAR work — check the CELEX/ELI
|
|
153
|
-
readonly recovery: "Verify the CELEX
|
|
151
|
+
readonly when: "The identifier resolves to no CELLAR work — check the CELEX/ELI format and try again.";
|
|
152
|
+
readonly recovery: "Verify the CELEX or ELI format, or try eurlex_search_documents to find the work by keyword.";
|
|
154
153
|
}, {
|
|
155
154
|
readonly reason: "ambiguous_identifier";
|
|
156
155
|
readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError;
|
|
157
156
|
readonly when: "identifier_type is \"auto\" and the identifier format could not be determined.";
|
|
158
|
-
readonly recovery: "Supply identifier_type explicitly as \"celex\"
|
|
157
|
+
readonly recovery: "Supply identifier_type explicitly as \"celex\" or \"eli\" to resolve the ambiguity.";
|
|
159
158
|
}], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition<import("zod").ZodObject<{
|
|
160
159
|
sparql_query: import("zod").ZodString;
|
|
161
160
|
timeout_hint: import("zod").ZodOptional<import("zod").ZodNumber>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mcp-server/tools/definitions/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAQ9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyanheads/eur-lex-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"mcpName": "io.github.cyanheads/eur-lex-mcp-server",
|
|
5
5
|
"description": "Search EU legislation, CJEU case law, and treaties; traverse the CELLAR relationship graph; resolve EuroVoc concepts via MCP. STDIO or Streamable HTTP.",
|
|
6
6
|
"type": "module",
|
package/server.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/cyanheads/eur-lex-mcp-server",
|
|
7
7
|
"source": "github"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.1.
|
|
9
|
+
"version": "0.1.8",
|
|
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/eur-lex-mcp-server",
|
|
21
21
|
"runtimeHint": "bun",
|
|
22
|
-
"version": "0.1.
|
|
22
|
+
"version": "0.1.8",
|
|
23
23
|
"packageArguments": [
|
|
24
24
|
{
|
|
25
25
|
"type": "positional",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
77
77
|
"identifier": "@cyanheads/eur-lex-mcp-server",
|
|
78
78
|
"runtimeHint": "bun",
|
|
79
|
-
"version": "0.1.
|
|
79
|
+
"version": "0.1.8",
|
|
80
80
|
"packageArguments": [
|
|
81
81
|
{
|
|
82
82
|
"type": "positional",
|