eur-lex-mcp-server
Search EU legislation, CJEU case law, and treaties; traverse CELLAR graph; browse EuroVoc concepts.
Sollte ich dies verwenden
Qualität und Sicherheit
Basierend auf einer automatisierten Analyse der Tool-Definitionen und der Einhaltung des Protokolls.
Kontextkosten
Dies ist die ungefähre Anzahl der Tokens, die jedes Mal verbraucht werden, wenn die Tools des Servers in den Kontext eines Modells geladen werden. Höhere Werte verringern die Aufmerksamkeit, die für andere Aufgaben verfügbar ist.
Installieren
Installation mit einem Klick
Fügen Sie dies Ihrer Datei `claude_desktop_config.json` hinzu:
{
"mcpServers": {
"eur-lex-mcp-server": {
"command": "bun",
"args": [
"@cyanheads/eur-lex-mcp-server"
]
}
}
}Ausführbare Pakete
0.18.1streamable-httpRemote-Endpunkte
https://eur-lex.caseyjhand.com/mcpstreamable-httpWas es kann
Tool-Inventar
Tools (7)
🟢eurlex_lookup_celex(identifier, identifier_type)
Resolve an EU legal citation — a CELEX number or ELI URI — to its canonical CELLAR work, confirming it exists before you fetch or traverse it. Returns the work URI, confirmed CELEX number, document type, and date.
Eingabe-Schema
{
"type": "object",
"properties": {
"identifier": {
"type": "string",
"minLength": 1,
"description": "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)."
},
"identifier_type": {
"default": "auto",
"description": "Format of the identifier. \"auto\" detects it automatically; supply \"celex\" or \"eli\" explicitly if detection fails.",
"type": "string",
"enum": [
"celex",
"eli",
"auto"
]
}
},
"required": [
"identifier"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"found": {
"type": "boolean",
"description": "True when the identifier resolves to a CELLAR work; false when a well-formed CELEX/ELI matches no work in the corpus. Only an identifier_type \"auto\" value that, after trimming, is neither an ELI URI nor CELEX-shaped (uppercase) raises ambiguous_identifier instead."
},
"work_uri": {
"description": "CELLAR work URI (stable resource identifier).",
"type": "string"
},
"celex_number": {
"description": "Confirmed CELEX number for the resolved work.",
"type": "string"
},
"resource_type": {
"description": "Human-readable document category resolved from the CDM resource type (e.g. \"Regulation\", \"Directive\", \"Judgment\"). An authority value with no known label falls back to its code (e.g. \"BUDGET\"). Absent for some works.",
"type": "string"
},
"date": {
"description": "Document date in ISO 8601 format (YYYY-MM-DD).",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `ambiguous_identifier`: identifier_type is \"auto\" and the identifier, after trimming, is neither an ELI URI nor CELEX-shaped (uppercase), so no lookup branch applies. Other values are possible when a failure originates below the handler.",
"examples": [
"ambiguous_identifier"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"found"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_browse_subjects(keyword, language, offset, limit)
Search the EuroVoc thesaurus, resolving a keyword into concept URIs usable in the eurovoc_concept subject filter of eurlex_search_documents. Matches both preferred and alternative (non-preferred) labels, so a common synonym reaches the concept it stands for. Returns each concept URI, its preferred label in the requested language, code, broader (parent) label, and the alternative label that matched when one did, ordered alphabetically by preferred label.
Eingabe-Schema
{
"type": "object",
"properties": {
"keyword": {
"type": "string",
"minLength": 1,
"description": "Search term matched against EuroVoc preferred and alternative concept labels (e.g. \"privacy\", \"agriculture\", \"product liability\")."
},
"language": {
"default": "en",
"description": "Language code for concept labels (e.g. \"en\", \"fr\", \"de\"). Case-insensitive — \"EN\" and \"en\" behave identically. Defaults to English.",
"type": "string",
"pattern": "^[A-Za-z]{2,3}$"
},
"offset": {
"default": 0,
"description": "Pagination offset — number of concepts to skip. Defaults to 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 20,
"description": "Maximum number of EuroVoc concepts to return (1–50). Defaults to 20.",
"type": "integer",
"minimum": 1,
"maximum": 50
}
},
"required": [
"keyword"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"concepts": {
"type": "array",
"items": {
"type": "object",
"properties": {
"concept_uri": {
"type": "string",
"description": "Full URI for the EuroVoc concept, usable in the eurovoc_concept filter."
},
"pref_label": {
"type": "string",
"description": "Preferred label for the concept in the requested language."
},
"concept_code": {
"description": "Numeric EuroVoc concept code.",
"type": "string"
},
"broader_label": {
"description": "Preferred label of the broader (parent) concept, if available.",
"type": "string"
},
"matched_label": {
"description": "Alternative (non-preferred) EuroVoc label that matched the keyword, when the concept was reached through one. Absent when the keyword matched the preferred label alone.",
"type": "string"
}
},
"required": [
"concept_uri",
"pref_label"
],
"additionalProperties": false,
"description": "A single EuroVoc concept with its URI, label, code, and hierarchy context."
},
"description": "Matching EuroVoc concepts ordered alphabetically by label."
},
"total": {
"type": "number",
"description": "Number of concepts returned in this response."
},
"offset": {
"type": "number",
"description": "Pagination offset used for this response."
},
"has_more": {
"type": "boolean",
"description": "True only when CELLAR returned an additional valid row beyond this page."
},
"next_offset": {
"description": "Offset for the next page. Present only when has_more is true.",
"type": "number"
},
"truncated": {
"description": "True when an additional CELLAR row proves more concepts exist beyond this page.",
"type": "boolean"
},
"shown": {
"description": "Number of concepts returned in this response.",
"type": "number"
},
"cap": {
"description": "The limit that was applied to this response.",
"type": "number"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `no_concepts`: The first page (offset 0) was empty — no EuroVoc concepts matched the keyword in the requested language. A later page that comes back empty returns an empty success instead. Other values are possible when a failure originates below the handler.",
"examples": [
"no_concepts"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"concepts",
"total",
"offset",
"has_more"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_search_documents(keyword, document_type, include_consolidated, include_corrigenda, date_from, ...)
Search EU legislation, treaties, and preparatory acts across the CELLAR corpus by document type, date range, EuroVoc subject, author institution, and in-force status. Keyword matches English titles and CELEX strings only — there is no full-text body search. Corrigenda are excluded by default so primary acts fill the page (set include_corrigenda to include them). Returns a page of CELEX numbers, work URIs, type labels, dates, and titles, newest first, each flagged with is_consolidated and is_corrigendum. At least one filter is required.
Eingabe-Schema
{
"type": "object",
"properties": {
"keyword": {
"description": "Keyword matched against English document titles via the full-text index (multi-word input is treated as a phrase), or against CELEX substrings.",
"type": "string"
},
"document_type": {
"description": "Document category: REG=Regulations, DIR=Directives, DEC=Decisions, TREATY=Treaties, JUDG=Judgments, OPIN_AG=AG Opinions, PROP=Proposals, REC=Recommendations. Each category includes its explicit CELLAR authority variants (for example, delegated and implementing regulations). Omit to search all types. Consolidated texts are excluded unless include_consolidated is true.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"enum": [
"REG",
"DIR",
"DEC",
"TREATY",
"JUDG",
"OPIN_AG",
"PROP",
"REC"
],
"description": "Document type: REG=Regulation, DIR=Directive, DEC=Decision, TREATY=Treaty, JUDG=Judgment, OPIN_AG=AG Opinion, PROP=Proposal, REC=Recommendation."
}
]
},
"include_consolidated": {
"default": false,
"description": "When true and document_type is set, also match consolidated texts whose basic act belongs to that document category. No effect when document_type is omitted. Consolidated rows are always tagged is_consolidated: true.",
"type": "boolean"
},
"include_corrigenda": {
"default": false,
"description": "Include corrigenda — separate correction works, co-typed CORRIGENDUM alongside the base type of the act they correct, carrying a \"…R(nn)\" CELEX and usually no English title. Default false: they are excluded so primary acts fill the page. Every returned row is tagged is_corrigendum.",
"type": "boolean"
},
"date_from": {
"description": "Start of date range (YYYY-MM-DD), matched against document date. Omit for no lower bound.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start date in ISO 8601 format (YYYY-MM-DD)."
}
]
},
"date_to": {
"description": "End of date range (YYYY-MM-DD), matched against document date. Omit for no upper bound.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End date in ISO 8601 format (YYYY-MM-DD)."
}
]
},
"eurovoc_concept": {
"description": "EuroVoc concept URI to filter by subject (e.g. http://eurovoc.europa.eu/2828), obtained from eurlex_browse_subjects. Omit for no subject filter.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"description": "EuroVoc concept URI (e.g. http://eurovoc.europa.eu/2828)."
}
]
},
"author_institution": {
"description": "Author institution name (e.g. \"European Parliament\", \"Council\", \"European Commission\"), matched against the English names of EU corporate bodies.",
"type": "string"
},
"in_force": {
"description": "Restrict by in-force status: true returns only acts currently in force, false only acts no longer in force. Either way the act must carry the in-force property, which a minority of works do. Omit to return all regardless of in-force status.",
"type": "boolean"
},
"offset": {
"default": 0,
"description": "Pagination offset — number of results to skip. Defaults to 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 20,
"description": "Maximum number of results to return (1–100). Defaults to 20.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"work_uri": {
"type": "string",
"description": "CELLAR work URI (stable resource identifier)."
},
"celex_number": {
"type": "string",
"description": "CELEX identifier for the work."
},
"is_consolidated": {
"type": "boolean",
"description": "True when this CELEX is a consolidated version — a point-in-time text (…-YYYYMMDD) that incorporates amendments — rather than a base or amending act."
},
"is_corrigendum": {
"type": "boolean",
"description": "True when this work carries the CORRIGENDUM resource-type — a correction to another act rather than a primary act. Only ever true when include_corrigenda is set, since corrigenda are excluded by default."
},
"resource_type": {
"description": "Human-readable document type label (e.g. \"Regulation\", \"Directive\"). Works with several resource-types (e.g. corrigenda) list all, comma-separated. Absent for some older works.",
"type": "string"
},
"date": {
"description": "Document date in ISO 8601 format (YYYY-MM-DD).",
"type": "string"
},
"title": {
"description": "English expression title where available; absent for many older works and judgments.",
"type": "string"
}
},
"required": [
"work_uri",
"celex_number",
"is_consolidated",
"is_corrigendum"
],
"additionalProperties": false,
"description": "A single EU legislative work with its CELEX number, type, and date."
},
"description": "Matching EU documents ordered by date descending."
},
"total": {
"type": "number",
"description": "Number of documents returned in this page (not a corpus-wide count)."
},
"offset": {
"type": "number",
"description": "Pagination offset used for this response."
},
"has_more": {
"type": "boolean",
"description": "True only when CELLAR returned an additional valid row beyond this page."
},
"next_offset": {
"description": "Offset for the next page. Present only when has_more is true.",
"type": "number"
},
"query_echo": {
"type": "object",
"properties": {
"keyword": {
"description": "Keyword filter applied.",
"type": "string"
},
"document_type": {
"description": "Document type filter applied.",
"type": "string"
},
"include_consolidated": {
"type": "boolean",
"description": "Effective include_consolidated value after the false default is applied — whether consolidated texts whose basic act belongs to the document_type category were included. Always present, since the default shapes which records can appear; has effect only when document_type is set."
},
"include_corrigenda": {
"type": "boolean",
"description": "Effective include_corrigenda value after the false default is applied — whether corrigenda were admitted alongside primary acts. Always present, since the default shapes which records can appear."
},
"date_from": {
"description": "Start date filter applied.",
"type": "string"
},
"date_to": {
"description": "End date filter applied.",
"type": "string"
},
"eurovoc_concept": {
"description": "EuroVoc concept URI filter applied.",
"type": "string"
},
"author_institution": {
"description": "Author institution filter applied.",
"type": "string"
},
"in_force": {
"description": "In-force filter applied.",
"type": "boolean"
}
},
"required": [
"include_consolidated",
"include_corrigenda"
],
"additionalProperties": false,
"description": "Echo of filters applied to this search. Useful for diagnosing empty results."
},
"truncated": {
"description": "True when an additional CELLAR row proves more documents exist beyond this page.",
"type": "boolean"
},
"shown": {
"description": "Number of documents returned in this page.",
"type": "number"
},
"cap": {
"description": "The limit that was applied to this page.",
"type": "number"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `no_filters`: No effective narrowing filter was supplied — an unfiltered search would scan the entire corpus. `invalid_date_range`: date_from or date_to is not a real calendar date, or date_from falls after date_to. `no_results`: The first page (offset 0) returned zero bindings — no matching documents in CELLAR. A later page that comes back empty returns an empty success instead. `sparql_error`: Virtuoso returned HTTP 200 with an error body — query malformed or timed out. Other values are possible when a failure originates below the handler.",
"examples": [
"no_filters",
"invalid_date_range",
"no_results",
"sparql_error"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"documents",
"total",
"offset",
"has_more",
"query_echo"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_get_cases(case_number, keyword, court, case_type, include_derivative, ...)
Search CJEU and General Court case law — judgments, orders, and Advocate General opinions — by case number, court, case type, keyword, and date range. By default only these primary records are returned; derivative judicial information notices, case abstracts, summaries, and corrigenda are excluded so distinct cases fill the page (set include_derivative to include them). Keyword matches English case titles (which carry party names) and CELEX strings; there is no full-text body search. Returns each case with its court, date, and type, plus — parsed from the title where present — the parties, subject matter, and case reference.
Eingabe-Schema
{
"type": "object",
"properties": {
"case_number": {
"description": "Case number in standard format: C-{num}/{year} for CJEU or T-{num}/{year} for General Court (e.g. C-131/12).",
"type": "string"
},
"keyword": {
"description": "Keyword to match against case titles and CELEX strings.",
"type": "string"
},
"court": {
"description": "Court filter: CJEU = Court of Justice of the EU, GC = General Court. Omit to search both.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"enum": [
"CJEU",
"GC"
],
"description": "CJEU = Court of Justice of the EU, GC = General Court."
}
]
},
"case_type": {
"description": "Case type: judgment, order (procedural decision), or ag_opinion (Advocate General opinion). Omit to search all.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"enum": [
"judgment",
"order",
"ag_opinion"
],
"description": "judgment, order (procedural decision), or ag_opinion (Advocate General opinion)."
}
]
},
"include_derivative": {
"default": false,
"description": "Include derivative sector-6 records — judicial information notices, case abstracts, case summaries, and corrigenda — alongside primary judgments, orders, and AG opinions. Default false: these are excluded so distinct primary cases fill the page. Ignored when case_type is set (that path already returns a single primary type).",
"type": "boolean"
},
"date_from": {
"description": "Start of date range in ISO 8601 format (YYYY-MM-DD). Leave blank or omit for no lower bound.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Start date in ISO 8601 format (YYYY-MM-DD)."
}
]
},
"date_to": {
"description": "End of date range in ISO 8601 format (YYYY-MM-DD). Leave blank or omit for no upper bound.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "End date in ISO 8601 format (YYYY-MM-DD)."
}
]
},
"offset": {
"default": 0,
"description": "Pagination offset — number of results to skip. Defaults to 0.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 20,
"description": "Maximum number of results to return (1–100). Defaults to 20.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"cases": {
"type": "array",
"items": {
"type": "object",
"properties": {
"work_uri": {
"type": "string",
"description": "CELLAR work URI."
},
"celex_number": {
"type": "string",
"description": "CELEX identifier for the case (e.g. 62024CJ0629)."
},
"resource_type": {
"description": "Human-readable case type label (e.g. \"Judgment\", \"Order\", \"AG Opinion\"). Cases with several resource-types (e.g. corrigenda) list all, comma-separated. Absent for some older cases.",
"type": "string"
},
"date": {
"description": "Judgment/opinion date in ISO 8601 format.",
"type": "string"
},
"title": {
"description": "Raw English expression title as stored in CELLAR — a \"#\"-delimited string (court+date, parties, subject-matter, case reference) whose segments are surfaced in display_title, parties, subject_matter, and case_reference. Absent for many older cases.",
"type": "string"
},
"display_title": {
"description": "Clean human-readable title for display — the parties for a contested case (e.g. \"Google Spain SL v AEPD\"), or the court/AG descriptor when a case has no named parties. Parsed from title; absent when title is.",
"type": "string"
},
"parties": {
"description": "Parties to the case, parsed from the title (e.g. \"WhatsApp Ireland Ltd v European Data Protection Board.\"). Absent when the title carries no parties segment (e.g. AG opinions).",
"type": "string"
},
"subject_matter": {
"description": "Subject-matter keyword summary parsed from the title — the legal topics and provisions at issue. Absent when the title carries no subject-matter segment.",
"type": "string"
},
"case_reference": {
"description": "Case reference parsed from the title (e.g. \"Case C-97/23 P.\"). Absent when the title carries no case-reference segment.",
"type": "string"
}
},
"required": [
"work_uri",
"celex_number"
],
"additionalProperties": false,
"description": "A single CJEU or General Court case law record."
},
"description": "Matching case law records ordered by date descending."
},
"total": {
"type": "number",
"description": "Number of cases returned in this page (not a corpus-wide count)."
},
"offset": {
"type": "number",
"description": "Pagination offset used for this response."
},
"has_more": {
"type": "boolean",
"description": "True only when CELLAR returned an additional valid row beyond this page."
},
"next_offset": {
"description": "Offset for the next page. Present only when has_more is true.",
"type": "number"
},
"query_echo": {
"type": "object",
"properties": {
"case_number": {
"description": "Case number filter applied.",
"type": "string"
},
"celex_fragment": {
"description": "CELEX substring derived from case_number.",
"type": "string"
},
"keyword": {
"description": "Keyword filter applied.",
"type": "string"
},
"court": {
"description": "Court filter applied.",
"type": "string"
},
"case_type": {
"description": "Case type filter applied.",
"type": "string"
},
"include_derivative": {
"type": "boolean",
"description": "Effective include_derivative value after the false default is applied — whether derivative sector-6 records (notices, abstracts, summaries, corrigenda) were admitted alongside primary cases. Always present, since the default shapes which records can appear."
},
"date_from": {
"description": "Start date filter applied.",
"type": "string"
},
"date_to": {
"description": "End date filter applied.",
"type": "string"
}
},
"required": [
"include_derivative"
],
"additionalProperties": false,
"description": "Echo of filters applied to this search. Useful for diagnosing empty results."
},
"truncated": {
"description": "True when an additional CELLAR row proves more cases exist beyond this page.",
"type": "boolean"
},
"shown": {
"description": "Number of cases returned in this page.",
"type": "number"
},
"cap": {
"description": "The limit that was applied to this page.",
"type": "number"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `invalid_date_range`: date_from or date_to is not a real calendar date, or date_from falls after date_to. `no_results`: The first page (offset 0) returned zero bindings — no matching cases in CELLAR sector 6. A later page that comes back empty returns an empty success instead. `sparql_error`: Virtuoso returned HTTP 200 with an error body — query malformed or timed out. Other values are possible when a failure originates below the handler.",
"examples": [
"invalid_date_range",
"no_results",
"sparql_error"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"cases",
"total",
"offset",
"has_more",
"query_echo"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_get_document(celex_number, eli_uri, work_uri, resolve, language, ...)
Fetch the metadata and full text of an EU act by CELEX number, ELI URI, or work URI. Returns structured metadata (title, date, type, author institution, legal basis, EuroVoc subjects, in-force status) plus the act body as HTML, Markdown, or Formex4 XML, defaulting to English with automatic fallback. Every body returned in one call is capped at 100,000 characters — paged and full windows page onward with offset/limit; use outline: true for a heading map and select to pull specific articles, chapters, recitals, or annexes, reading a selected section on its own from the offset and chars in selected_sections.
Eingabe-Schema
{
"type": "object",
"properties": {
"celex_number": {
"description": "CELEX number of the act to fetch (e.g. 32016R0679 for GDPR). Provide exactly one of celex_number, eli_uri, or work_uri.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^[0-9A-Z][0-9A-Z()/_-]{5,}$",
"description": "CELEX number of the act (e.g. 32016R0679 for GDPR). Surrounding whitespace is trimmed and the value is uppercased before validation."
}
]
},
"eli_uri": {
"description": "Work-level ELI URI of the act to fetch (e.g. http://data.europa.eu/eli/reg/2016/679, with or without the /oj suffix). Provide exactly one of celex_number, eli_uri, or work_uri.",
"type": "string"
},
"work_uri": {
"description": "CELLAR work resource URI to fetch (e.g. http://publications.europa.eu/resource/cellar/3e485e15-11bd-11e6-ba9a-01aa75ed71a1) — the form returned by eurlex_lookup_celex, eurlex_get_relations, and eurlex_search_documents. Provide exactly one of celex_number, eli_uri, or work_uri.",
"type": "string"
},
"resolve": {
"default": "as_requested",
"description": "Which version to serve for a base act with newer consolidated versions. \"as_requested\" (default) returns the exact CELEX requested; \"current_consolidated\" serves the newest consolidated version instead (echoing the request in requested_celex), a no-op when none exists. Either way, is_superseded / current_consolidated_celex / consolidated_as_of flag a stale base act.",
"type": "string",
"enum": [
"as_requested",
"current_consolidated"
]
},
"language": {
"default": "EN",
"description": "One of the 24 supported two-letter EUR-Lex language codes (e.g. EN, FR, DE), accepted case-insensitively and normalized to uppercase. Defaults to EN, and falls back to EN if the requested language is unavailable.",
"type": "string",
"pattern": "^(?:[Ee][Nn]|[Ff][Rr]|[Dd][Ee]|[Ee][Ss]|[Ii][Tt]|[Pp][Ll]|[Pp][Tt]|[Nn][Ll]|[Cc][Ss]|[Dd][Aa]|[Ee][Ll]|[Ee][Tt]|[Ff][Ii]|[Hh][Uu]|[Ll][Tt]|[Ll][Vv]|[Mm][Tt]|[Rr][Oo]|[Ss][Kk]|[Ss][Ll]|[Ss][Vv]|[Bb][Gg]|[Hh][Rr]|[Gg][Aa])$"
},
"format": {
"default": "html",
"description": "Content format: \"html\" for the act text as served by EUR-Lex (default), \"markdown\" for that HTML converted to clean Markdown server-side, or \"xml\" for Formex4 structured XML.",
"type": "string",
"enum": [
"html",
"xml",
"markdown"
]
},
"content_mode": {
"default": "paged",
"description": "How much of the body to return. \"paged\" (default) returns an offset/limit window; \"full\" requests from the start and returns at most 100000 characters with continuation metadata when more exists; \"metadata_only\" skips the content fetch. offset and limit apply only to \"paged\".",
"type": "string",
"enum": [
"metadata_only",
"paged",
"full"
]
},
"offset": {
"default": 0,
"description": "Character offset into the body where the returned window starts (\"paged\" mode only). Page forward by setting offset = content_offset + content_chars_returned from the previous call. Offsets are format-specific: an offset is only valid against the same format it was measured in — keep format constant when paging.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 25000,
"description": "Maximum characters to return in this window (\"paged\" mode only). Default 25000, max 100000. Follow has_more and the returned offsets until false to reconstruct the complete body.",
"type": "integer",
"minimum": 1,
"maximum": 100000
},
"outline": {
"default": false,
"description": "Return a structural outline of the act — chapters, sections, articles, annexes, and recitals as a heading list, each with its character offset — instead of body text. Read a section by paging with its offset, keeping the same format: outline offsets are measured in the requested format's body and land in the wrong place under any other format. Ignores offset/limit and select; no detectable structure returns an empty outline. Not applied in content_mode \"metadata_only\".",
"type": "boolean"
},
"select": {
"description": "Return only the text of specific sections by type and number, instead of a raw character window (Roman and Arabic numbers are equivalent). Sections are located in the body of the requested format, so pair select with the same format used for any outline. A section that cannot be located is reported in selection.missed with no wrong text returned. Ignored when outline is true or in content_mode \"metadata_only\".",
"type": "object",
"properties": {
"articles": {
"description": "Comma-separated article numbers, e.g. \"1,5,17\".",
"type": "string"
},
"chapters": {
"description": "Comma-separated chapter numbers, Roman or Arabic, e.g. \"I,IV\" or \"1,4\".",
"type": "string"
},
"recitals": {
"description": "Comma-separated recital numbers, e.g. \"1,10\".",
"type": "string"
},
"annexes": {
"description": "Comma-separated annex numbers or letters, e.g. \"I,II\".",
"type": "string"
}
}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"celex_number": {
"type": "string",
"description": "Confirmed CELEX number for the retrieved work."
},
"work_uri": {
"description": "CELLAR work URI.",
"type": "string"
},
"title": {
"description": "Document title in the requested language (absent for some older works and judgments).",
"type": "string"
},
"date": {
"description": "Document date in ISO 8601 format (YYYY-MM-DD).",
"type": "string"
},
"resource_type": {
"description": "Human-readable document type label (e.g. \"Regulation\", \"Directive\"). Absent for some older works.",
"type": "string"
},
"author_institution": {
"description": "Human-readable name of the primary (first) originating EU institution (e.g. \"European Parliament\", \"Council of the EU\"). For co-legislated acts, prefer author_institutions for the complete set. Absent when not recorded.",
"type": "string"
},
"author_institutions": {
"description": "All originating EU institutions, for co-legislated acts adopted by more than one body (e.g. [\"European Parliament\", \"Council of the EU\"]). Absent when none recorded.",
"type": "array",
"items": {
"type": "string",
"description": "Human-readable EU institution name."
}
},
"legal_basis": {
"description": "Legal basis acts for this work. Absent when none are recorded.",
"type": "array",
"items": {
"type": "object",
"properties": {
"work_uri": {
"type": "string",
"description": "CELLAR work URI of the legal basis act. When celex_number is present, pass either as work_uri or celex_number to eurlex_get_document to fetch that act; a basis with no CELEX is a CELLAR reference that may not resolve to a fetchable work."
},
"celex_number": {
"description": "CELEX number of the legal basis act (e.g. 12012E016 for TFEU Article 16). Absent when CELLAR records no CELEX for the work.",
"type": "string"
}
},
"required": [
"work_uri"
],
"additionalProperties": false,
"description": "A legal basis act: its CELLAR work URI plus its CELEX number when recorded."
}
},
"eurovoc_subjects": {
"description": "EuroVoc subject classifications. Absent when none are recorded.",
"type": "array",
"items": {
"type": "object",
"properties": {
"concept_uri": {
"type": "string",
"description": "EuroVoc concept URI (http://eurovoc.europa.eu/{id}), the exact value the eurovoc_concept filter of eurlex_search_documents accepts."
},
"label": {
"description": "EuroVoc preferred label in the requested language. Absent when the concept has no label in that language.",
"type": "string"
}
},
"required": [
"concept_uri"
],
"additionalProperties": false,
"description": "An EuroVoc subject: its concept URI plus its preferred label when available."
}
},
"in_force": {
"description": "Whether the act is currently in force.",
"type": "boolean"
},
"is_superseded": {
"description": "True when a newer consolidated version of the requested base act exists (an unofficial reading aid merging later amendments), so the returned text may not include those amendments. Not a repeal/replacement signal — the base act remains the law and may still be in force (see in_force). Absent when the act has no consolidated version, or is itself one.",
"type": "boolean"
},
"current_consolidated_celex": {
"description": "CELEX of the newest consolidated version of the requested base act (e.g. 02014R0833-20260424) — fetch it with eurlex_get_document, or pass resolve \"current_consolidated\". Present only when is_superseded is true.",
"type": "string"
},
"consolidated_as_of": {
"description": "Consolidation date of current_consolidated_celex in ISO 8601 (YYYY-MM-DD). Present only when is_superseded is true.",
"type": "string"
},
"requested_celex": {
"description": "The originally requested CELEX, echoed when resolve \"current_consolidated\" served a different (consolidated) work. celex_number holds the CELEX actually served. Absent when the served work is the one requested.",
"type": "string"
},
"content": {
"description": "Body content of the act in the requested format and language. In \"paged\" mode this is the requested window; in \"full\" mode it starts at zero; under select it is the matched sections joined in document order. Every one is capped at 100000 characters. Omitted in \"metadata_only\" mode, when the window is empty, or when content is unavailable.",
"type": "string"
},
"content_mode": {
"type": "string",
"description": "Content mode applied to this response: \"metadata_only\", \"paged\", or \"full\"."
},
"content_available": {
"type": "boolean",
"description": "Whether body content was fetched from EUR-Lex. False in \"metadata_only\" mode (no fetch attempted) — use content_mode to distinguish \"not requested\" from \"unavailable upstream\"."
},
"content_status": {
"type": "string",
"enum": [
"not_requested",
"available",
"unavailable"
],
"description": "Body resolution status: \"not_requested\" for metadata-only calls, \"available\" when a body was resolved, or \"unavailable\" after ordinary resolution attempts returned no usable body."
},
"content_unavailability_reason": {
"description": "Why content_status is \"unavailable\": no representation exists, the upstream request failed, or a multipart Formex body could not be assembled completely.",
"type": "string",
"enum": [
"no_representation",
"upstream_failure",
"multipart_incomplete"
]
},
"content_offset": {
"description": "Character offset where the returned contiguous window begins. Present in \"paged\" and \"full\" modes. Absent for outline and select responses, whose content is not a contiguous span — read selected_sections for each matched section's own offset.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"content_chars_returned": {
"description": "Number of body characters returned in this response (equals content length). Present when a body was fetched and available.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"content_chars_total": {
"description": "Total character length of the full document body. Present when content was fetched and available; use with content_offset to page through the entire act.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"has_more": {
"type": "boolean",
"description": "True when body content exists beyond the returned contiguous window. Continue in \"paged\" mode with offset = content_offset + content_chars_returned until false. Always false in \"metadata_only\" mode, and always false for outline and select responses, where that recipe cannot resume across disjoint slices — a cut selection is disclosed through the truncated enrichment instead."
},
"language": {
"type": "string",
"description": "Language code of the returned content."
},
"requested_language": {
"description": "Originally requested language code when English fallback changed the effective language reported in language.",
"type": "string"
},
"language_fallback": {
"description": "Human-readable note explaining the fallback that occurred (e.g. \"Requested FR content unavailable; returned EN\"). Present only when a fallback happened.",
"type": "string"
},
"content_format": {
"type": "string",
"description": "Format of the returned content: \"html\", \"markdown\", or \"xml\"."
},
"outline": {
"description": "Structural outline of the act. Present only when outline is true; an empty array means no structure was detected.",
"type": "array",
"items": {
"type": "object",
"properties": {
"kind": {
"type": "string",
"description": "Structural unit kind: \"chapter\", \"section\", \"article\", \"annex\", or \"recital\"."
},
"number": {
"type": "string",
"description": "Numbering token as rendered (e.g. \"17\", \"IV\"); empty for a lone unnumbered annex."
},
"label": {
"type": "string",
"description": "Human label, e.g. \"Article 17\", \"CHAPTER IV\"."
},
"title": {
"description": "Descriptive title where the act supplies one.",
"type": "string"
},
"offset": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Character offset of the heading in the full body of the requested format — pass as offset in a paged call to read from here."
}
},
"required": [
"kind",
"number",
"label",
"offset"
],
"additionalProperties": false,
"description": "One detected heading, addressable by its character offset into the body."
}
},
"selection": {
"description": "Outcome of a structural selection. Present only when select was used; content holds the matched sections joined in document order, capped at 100000 characters. When the cap cuts the join, a trailing matched section may be partly or wholly absent from content — read selected_sections for each one's own address.",
"type": "object",
"properties": {
"requested": {
"type": "array",
"items": {
"type": "string"
},
"description": "Section descriptors requested, e.g. [\"Article 17\", \"CHAPTER IV\"]."
},
"matched": {
"type": "array",
"items": {
"type": "string"
},
"description": "Section descriptors located in the body, in document order."
},
"missed": {
"type": "array",
"items": {
"type": "string"
},
"description": "Requested section descriptors that could not be located."
}
},
"required": [
"requested",
"matched",
"missed"
],
"additionalProperties": false
},
"selected_sections": {
"description": "Source address of each section the selection sliced, in document order. Present only when select was used. A selection is a set of disjoint slices, not a contiguous window, so these addresses — not content_offset — are how a caller navigates one; every section stays individually reachable even when the cap cut its text.",
"type": "array",
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "Section descriptor, e.g. \"Article 17\"."
},
"offset": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Character offset of the section in the full body of the requested format — pass as offset in a paged call to read it."
},
"chars": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "Characters the section spans in the source body — pass as limit alongside offset to read exactly this section. A section longer than the maximum window is read by paging forward from offset instead."
}
},
"required": [
"label",
"offset",
"chars"
],
"additionalProperties": false,
"description": "One selected section, addressable on its own through the paging floor."
}
},
"structure_detected": {
"description": "Whether any act structure was parsed from the body. Present when outline or select was used; false means no detectable chapter/article/annex structure — read it via offset/limit or content_mode \"full\".",
"type": "boolean"
},
"truncated": {
"description": "True when the returned body window was capped.",
"type": "boolean"
},
"shown": {
"description": "Number of body characters returned.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"cap": {
"description": "Maximum body characters allowed in the window.",
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"notice": {
"description": "How to retrieve the remaining document content.",
"type": "string"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `invalid_identifier_args`: None of celex_number, eli_uri, or work_uri was provided, or more than one was. `not_found`: The CELEX, ELI, or work URI resolves to no fetchable work — the work is absent from the corpus, or the CELLAR work carries no CELEX number. `content_challenge`: The primary content response is an AWS WAF bot-challenge interstitial rather than legal text. Other values are possible when a failure originates below the handler.",
"examples": [
"invalid_identifier_args",
"not_found",
"content_challenge"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"celex_number",
"content_mode",
"content_available",
"content_status",
"has_more",
"language",
"content_format"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_get_relations(celex_number, work_uri, relation_types, offset, limit)
Traverse the one-hop CDM relationship graph of an EU act: what it amends or is amended by, what it repeals or is repealed by (explicit and implicit), its consolidated versions, national transposition measures, its legal basis, and works that cite it. Returns direct relations only, paginated per relation type and direction. Requires a CELEX number or CELLAR work URI.
Eingabe-Schema
{
"type": "object",
"properties": {
"celex_number": {
"description": "CELEX number of the work to traverse (e.g. 32016R0679). Provide exactly one of celex_number or work_uri.",
"anyOf": [
{
"type": "string",
"const": ""
},
{
"type": "string",
"pattern": "^[0-9A-Z][0-9A-Z()/_-]{5,}$",
"description": "CELEX number of the work (e.g. 32016R0679). Surrounding whitespace is trimmed and the value is uppercased before validation."
}
]
},
"work_uri": {
"description": "CELLAR work resource URI to traverse (e.g. http://publications.europa.eu/resource/cellar/3e485e15-11bd-11e6-ba9a-01aa75ed71a1). Used directly as the addressed work; its CELEX identity is resolved for relation-specific act matching, and act-matched relation types stand down when the work carries several CELEX numbers — address such a work by celex_number to name the act you mean. Provide exactly one of celex_number or work_uri.",
"type": "string"
},
"relation_types": {
"description": "Subset of relation types to return; omit for all. Types: cites, amends, amended_by, repeals, repealed_by, implicitly_repeals, implicitly_repealed_by, legal_basis (treaty/article this act rests on), consolidated_version (consolidated texts of this act), national_transposition (member-state implementing measures).",
"type": "array",
"items": {
"type": "string",
"enum": [
"cites",
"amends",
"amended_by",
"repeals",
"repealed_by",
"implicitly_repeals",
"implicitly_repealed_by",
"legal_basis",
"consolidated_version",
"national_transposition"
]
}
},
"offset": {
"default": 0,
"description": "Pagination offset applied per relation type and direction — related works to skip (default 0). Page forward by adding limit; incoming edges are newest-first, so higher offsets reach older works.",
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
},
"limit": {
"default": 100,
"description": "Maximum related works per relation type and direction (1–100, default 100). Incoming edges are ordered newest-first, so the cap keeps the newest — page with offset for older ones.",
"type": "integer",
"minimum": 1,
"maximum": 100
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"celex_number": {
"description": "CELEX number of the source work whose relations were traversed — the celex_number input, or the CELEX resolved from work_uri when the addressed work carries exactly one. Absent when the addressed work carries none, carries several, or its identity was not resolved because no requested relation type needs it.",
"type": "string"
},
"work_uri": {
"type": "string",
"description": "CELLAR URI of the source work (the work_uri input, or resolved from the CELEX)."
},
"relations": {
"type": "array",
"items": {
"type": "object",
"properties": {
"relation_type": {
"type": "string",
"description": "Type of relation: cites, amends, amended_by, repeals, repealed_by, implicitly_repeals, implicitly_repealed_by, legal_basis, consolidated_version, national_transposition."
},
"direction": {
"type": "string",
"description": "Direction: \"outgoing\" (this work → related) or \"incoming\" (related → this work)."
},
"related_work_uri": {
"type": "string",
"description": "CELLAR URI of the related work."
},
"related_celex_number": {
"description": "CELEX number of the related work, if available.",
"type": "string"
}
},
"required": [
"relation_type",
"direction",
"related_work_uri"
],
"additionalProperties": false,
"description": "A single CDM relation between the source work and a related work."
},
"description": "Direct CDM relations for the requested work."
},
"total": {
"type": "number",
"description": "Number of relations returned in this page (not a corpus-wide count)."
},
"offset": {
"type": "number",
"description": "Pagination offset applied to this response (per relation type and direction)."
},
"has_more": {
"type": "boolean",
"description": "True only when at least one requested relation type/direction returned an additional valid row beyond this page."
},
"next_offset": {
"description": "Offset for the next page. Present only when has_more is true.",
"type": "number"
},
"requested_relation_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "The relation types this request traversed — the explicit relation_types list, or all types when it was omitted. Diff against the types present in relations[], or read empty_relation_types, to confirm which requested types returned edges."
},
"empty_relation_types": {
"type": "array",
"items": {
"type": "string"
},
"description": "Requested relation types that returned zero relations in THIS page. Page-scoped: a type can appear here because all its edges sit beyond the current offset/limit window, not only because the act genuinely has none of that relation — so absent-from-here does not prove absent-in-CELLAR. An empty first page throws no_relations; an exhausted non-zero page returns all requested types here."
},
"truncated": {
"description": "True when an additional valid row proves at least one relation type/direction has more related works — page with offset.",
"type": "boolean"
},
"shown": {
"description": "Number of relations returned in this page, summed across every relation type and direction — not the count for any single type or direction.",
"type": "number"
},
"cap": {
"description": "The per-direction cap. It bounds each relation type and each direction independently, so it is not an upper bound on shown: a page spanning several types and both directions can return more relations than this number.",
"type": "number"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `invalid_identifier_args`: Neither celex_number nor work_uri was provided, or both were. `not_found`: CELEX number not found in CELLAR — resolve the identifier with eurlex_lookup_celex first. `no_relations`: The first page (offset 0) was empty — the work exists but has no CDM relations of the requested types. A later page that comes back empty returns an empty success instead. Other values are possible when a failure originates below the handler.",
"examples": [
"invalid_identifier_args",
"not_found",
"no_relations"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"work_uri",
"relations",
"total",
"offset",
"has_more",
"requested_relation_types",
"empty_relation_types"
]
},
{
"required": [
"error"
]
}
]
}🟢eurlex_query_sparql(sparql_query, timeout_hint)
Run a raw, read-only SPARQL SELECT against the CELLAR Virtuoso endpoint — an escape hatch for CDM ontology traversals the curated tools do not cover. Only SELECT is accepted; update forms and ASK/CONSTRUCT/DESCRIBE are rejected before execution, and results are capped at 100. The cdm:, skos:, and xsd: prefixes are auto-injected.
Eingabe-Schema
{
"type": "object",
"properties": {
"sparql_query": {
"type": "string",
"minLength": 10,
"description": "A read-only SPARQL SELECT query. Leading comments and PREFIX/BASE declarations are allowed; the cdm:, skos:, and xsd: prefixes are auto-injected. LIMIT is injected at 100 if absent, or capped to 100. Key CDM predicates: cdm:resource_legal_id_celex (CELEX), cdm:work_date_document (date), cdm:work_has_resource-type (type), cdm:work_is_about_concept_eurovoc (EuroVoc subject), cdm:work_cites_work (citation). CELEX is an xsd:string literal — match it with FILTER(STR(?celex) = \"…\"). For text, use bif:contains with a single-quoted phrase."
},
"timeout_hint": {
"description": "Optional client-side timeout in milliseconds (1000–55000). Defaults apply when omitted; the endpoint hard limit is 60 seconds.",
"type": "integer",
"minimum": 1000,
"maximum": 55000
}
},
"required": [
"sparql_query"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Ausgabe-Schema
{
"type": "object",
"properties": {
"bindings": {
"type": "array",
"items": {
"type": "object",
"properties": {},
"additionalProperties": {},
"description": "A single SPARQL result row. Each key is a SELECT variable name; each value is a SPARQL term object with \"type\" (\"uri\", \"literal\", or \"bnode\") and \"value\" (the string value), plus \"datatype\" (an IRI) on a typed literal or \"xml:lang\" (a language tag) on a language-tagged literal — the two are mutually exclusive. A variable left unbound by an OPTIONAL has no key in the row at all."
},
"description": "Raw SPARQL binding rows. To extract a value from a row: row[\"varName\"]?.value. Use the variables array to iterate in query order."
},
"variables": {
"type": "array",
"items": {
"type": "string",
"description": "A SELECT variable name, in the order declared in the query."
},
"description": "Variable names from the SELECT head, in query order."
},
"total": {
"type": "number",
"description": "Number of binding rows returned (capped at 100 by the server)."
},
"truncated": {
"description": "True when the server-enforced result ceiling capped the rows and more may exist upstream — narrow the query with FILTERs to see the rest.",
"type": "boolean"
},
"shown": {
"description": "Number of binding rows returned in this response.",
"type": "number"
},
"cap": {
"description": "The server-enforced result ceiling that was applied.",
"type": "number"
},
"error": {
"description": "Present when the call failed. Absent on success.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991,
"description": "JSON-RPC error code for this failure."
},
"message": {
"type": "string",
"description": "Human-readable description of what went wrong."
},
"data": {
"type": "object",
"properties": {
"reason": {
"type": "string",
"description": "Machine-readable failure mode. Declared by this tool: `not_read_only`: The query is not a read-only SELECT — an update or non-SELECT query form was supplied. `sparql_error`: Virtuoso returned a syntax or semantic error — the query is malformed. `sparql_timeout`: The query exceeded the client-side timeout (timeout_hint, default 55 s) or the 60-second Virtuoso execution limit. Neither is retried: the call fails inside the configured bound. Other values are possible when a failure originates below the handler.",
"examples": [
"not_read_only",
"sparql_error",
"sparql_timeout"
]
},
"recovery": {
"description": "Actionable next step for the caller.",
"type": "object",
"properties": {
"hint": {
"type": "string"
}
},
"required": [
"hint"
],
"additionalProperties": {}
},
"retryable": {
"description": "Whether retrying may succeed.",
"type": "boolean"
}
},
"additionalProperties": {}
}
},
"required": [
"code",
"message"
],
"additionalProperties": {}
}
},
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false,
"anyOf": [
{
"not": {
"required": [
"error"
]
},
"required": [
"bindings",
"variables",
"total"
]
},
{
"required": [
"error"
]
}
]
}Community
Nachweis