Skip to main content
Glama

Raw CELLAR SPARQL Query

eurlex_query_sparql
Read-only

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sparql_queryYesA 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_hintNoOptional client-side timeout in milliseconds (1000–55000). Defaults apply when omitted; the endpoint hard limit is 60 seconds.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe server-enforced result ceiling that was applied.
errorNoPresent when the call failed. Absent on success.
shownNoNumber of binding rows returned in this response.
totalNoNumber of binding rows returned (capped at 100 by the server).
bindingsNoRaw SPARQL binding rows. To extract a value from a row: row["varName"]?.value. Use the variables array to iterate in query order.
truncatedNoTrue when the server-enforced result ceiling capped the rows and more may exist upstream — narrow the query with FILTERs to see the rest.
variablesNoVariable names from the SELECT head, in query order.

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds concrete behavioral details beyond that: only SELECT is accepted, results are capped at 100, prefixes are auto-injected, and a timeout_hint parameter is described. It does not contradict annotations and provides useful operational context.

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?

The description is well-structured and front-loaded with purpose and constraints. Every sentence adds value—constraints, behavioral details, parameter guidance—without redundancy. Length is appropriate for the complexity of a raw SPARQL tool.

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 output schema exists (so return values need no explanation), the description covers everything an agent needs: accepted query forms, result caps, endpoint limits, timeout options, and practical query-writing guidance. It is complete for safe and effective invocation.

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

Parameters5/5

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

Schema coverage is 100%, but the description significantly enriches the sparql_query parameter with syntax rules (leading comments, PREFIX/BASE allowed), LIMIT behavior, auto-injected prefixes, and a list of key CDM predicates with matching tips (e.g., CELEX matching, bif:contains). This goes well beyond the schema description.

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 clearly states a specific action (run a raw, read-only SPARQL SELECT) against a specific resource (CELLAR Virtuoso endpoint), and frames it as an 'escape hatch' for traversals the curated tools do not cover, distinguishing it from siblings.

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

Usage Guidelines4/5

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

The description gives an explicit when-to-use condition: 'an escape hatch for CDM ontology traversals the curated tools do not cover.' It also imposes constraints (only SELECT, rejection of other forms) that inform usage. However, it does not explicitly name alternative tools or provide when-not-to-use guidance beyond the curated-tools-cover case, leaving some inference required.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct resource or action: subject browsing, case search, document retrieval, relation traversal, identifier resolution, raw SPARQL, and legislation search. The few potentially similar tools (search_documents vs get_cases) are clearly separated by corpus and description.

Naming Consistency5/5

All tools follow the consistent eurlex_verb_noun pattern in lowercase snake_case, such as eurlex_get_document, eurlex_search_documents, and eurlex_lookup_celex. Verbs vary but the pattern is uniform and predictable.

Tool Count5/5

Seven tools is well-scoped for an EU legal research server covering search, retrieval, relationship traversal, and identifier resolution. Each tool has a clear role and none feel redundant or excessive.

Completeness4/5

The core research workflow is covered: browse subjects, search legislation, search cases, fetch documents, resolve identifiers, and traverse relations. Minor gaps exist such as no full-text body search and no explicit case-law full-text retrieval, but the raw SPARQL escape hatch partially mitigates these.