Skip to main content
Glama

eurlex_sparql

Read-onlyIdempotent

Run custom SPARQL 1.1 queries on EU legal documents via Cellar endpoint when higher-level tools cannot express your need. Requires CDM ontology knowledge.

Instructions

Expert escape hatch: run a raw, read-only SPARQL 1.1 query directly against the EU Publications Office (Cellar) endpoint when the higher-level tools (eurlex_search, eurlex_metadata, eurlex_citations, eurlex_case_law, eurlex_transposition, eurlex_summary, …) cannot express what you need. Requires knowledge of the CDM ontology — READ THE eurlex_guide PROMPT FIRST for the property cheat sheet (celex, title, language, dates, citations, case law, transposition, summaries). Only SELECT and ASK are allowed; SPARQL Update (INSERT/DELETE/…) and federated SERVICE clauses are rejected before the query is sent. A SELECT with no top-level LIMIT gets LIMIT 50 appended (set limit_added); a top-level LIMIT above 100 is rejected. The response mirrors SPARQL JSON — vars + bindings for SELECT, boolean for ASK — plus row_count and a truncated flag (whole rows are dropped past ~40k characters). CELEX/ELI literals are typed xsd:string, so match them with FILTER(STR(?x) = "..."). Example: PREFIX cdm: http://publications.europa.eu/ontology/cdm# SELECT ?celex WHERE { ?w cdm:resource_legal_id_celex ?celex . FILTER(STR(?celex) = "32016R0679") } LIMIT 1

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesA raw SPARQL 1.1 query against the EU Publications Office (Cellar) endpoint. Read-only: only SELECT and ASK are accepted (SPARQL Update and federated SERVICE clauses are rejected). If a SELECT has no top-level LIMIT one is appended automatically; a top-level LIMIT above 100 is rejected. Uses the CDM ontology — see the eurlex_guide prompt for the property cheat sheet. Example: PREFIX cdm: <http://publications.europa.eu/ontology/cdm#> SELECT ?celex WHERE { ?w cdm:resource_legal_id_celex ?celex . FILTER(STR(?celex) = "32016R0679") } LIMIT 1

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
varsNoProjected variable names (SELECT only)
booleanNoASK result (present only for ASK queries)
bindingsNoRaw SPARQL binding rows, possibly truncated (SELECT only)
row_countYesTotal rows the query returned; null for ASK
truncatedYesTrue when whole rows were dropped to fit the char budget
limit_addedNoPresent (true) only when the tool auto-appended the default LIMIT
returned_rowsYesRows included after char-budget truncation; null for ASK
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, open-world, idempotent, non-destructive. The description adds extensive behavioral details: query restrictions, LIMIT enforcement, response structure (vars+bindings, boolean, row_count, truncated flag), and literal typing. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is well-structured: begins with purpose, then constraints, then details, then an example. Every sentence adds essential information. No redundancy or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a SPARQL tool with multiple constraints and a custom response format, the description covers input requirements, behavior modifications (LIMIT), output structure, and includes a concrete example. Output schema exists but description still explains the response fields.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Only one parameter (query) with 100% schema coverage that already includes constraints. The description adds an example and clarifies response behavior, but most parameter semantics are already in the schema. Still, the example and additional context add value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states it is an 'expert escape hatch' for running raw SPARQL queries when higher-level tools cannot express what is needed. It clearly distinguishes itself from sibling tools by being a low-level, direct query interface.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance: use when higher-level tools fail, requires CDM ontology knowledge, must read eurlex_guide first, only SELECT and ASK allowed, no SPARQL Update, and automatic LIMIT handling. It effectively tells the agent when to use and when not to use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Honeyfield-Org/eurlex-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server