Skip to main content
Glama

Buscar resoluciones

search_decisions
Read-onlyIdempotent

Search Spanish and EU court judgments by legal issue, terms, body, date or source. Filter countries with ES, EU or both. Dates are optional for relevance searches; never invent them. An empty dated search is retried without dates, preserving all other filters. Disclose date_filter_relaxed warnings; omit dates when paginating relaxed results. Optional source_groups accepts only boe_tc, cendoj, tc_hj, curia; omit it to search all judicial sources. The judicial corpus excludes DYCTEA and PETETE. Returns matching decisions with identifiers, metadata, official links, and indexed excerpts. Free-text query defaults to natural hybrid thematic retrieval, requiring vectors and limited to a window of up to 50 decisions. Select search_mode=strict explicitly for textual operators and phrases. query_intent implies strict when search_mode is omitted; do not combine query_intent with explicit natural. The original free-text query is preserved; retrieval does not establish legal interpretation or exhaustive coverage. For a thematic search, send a non-empty query and omit query_intent. For structured textual search, query_intent accepts only required, any_of, phrases and exclude, each an array of non-empty strings. Include at least one term in required, any_of or phrases. For a specific court, use its exact catalog code, such as TS or TC. If unsure, call list_courts first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "search_decisions"
  }
}

Input Schema

NameRequiredDescriptionDefault
pageNo
courtNo
queryNoUse this field alone for free-text searches.
date_toNoOptional upper date bound. Omit for thematic relevance searches; never invent a date. Empty dated searches retry without dates and disclose the change.
per_pageNo
countriesNo
date_fromNoOptional lower date bound. Omit for thematic relevance searches; never invent a date. Empty dated searches retry without dates and disclose the change.
search_modeNoFree-text query defaults to natural hybrid exploratory retrieval, requiring vectors and using up to 50 decisions. Select strict explicitly for textual operators and phrases. If query_intent is supplied without search_mode, strict is implied; explicit natural with query_intent is invalid. The original query is preserved; retrieval does not establish legal interpretation or exhaustive coverage.natural
query_intentNoOptional structured terms. Use at least one term in required, any_of or phrases.
source_groupsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / date_from / description
      Added value: +"Optional lower date bound. Omit for thematic relevance searches; never invent a date. Empty dated searches retry without dates and disclose the change."
    • addedInput schema / properties / date_to / description
      Added value: +"Optional upper date bound. Omit for thematic relevance searches; never invent a date. Empty dated searches retry without dates and disclose the change."
  2. Changed3 schema fields changed
    • addedInput schema / properties / query / description
      Added value: +"Use this field alone for free-text searches."
    • changedInput schema / properties / query_intent / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": {
      -      "items": {
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "any_of": {
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 20,
      +        "type": "array"
      +      },
      +      "exclude": {
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 20,
      +        "type": "array"
      +      },
      +      "phrases": {
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 20,
      +        "type": "array"
      +      },
      +      "required": {
      +        "items": {
      +          "maxLength": 200,
      +          "minLength": 1,
      +          "type": "string"
      +        },
      +        "maxItems": 20,
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / query_intent / description
      Added value: +"Optional structured terms. Use at least one term in required, any_of or phrases."
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare a safe, idempotent read; the description adds the behavior an agent could not know otherwise: empty dated searches are silently retried without dates, that change is reported via a date_filter_relaxed warning which must be disclosed and not re-applied when paginating, natural mode requires vectors and is capped at a 50-decision window, and retrieval carries no legal-interpretation weight. It also states the return shape (identifiers, metadata, official links, indexed excerpts).

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

Conciseness4/5

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

Purpose is front-loaded and nearly every sentence encodes an operational rule, which is justified for a 10-parameter tool. It is dense to the point of crowding, though, and the 'never invent dates' and 'original query preserved / no legal interpretation' caveats are restated in the description as well as in the schema's search_mode and date field descriptions.

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

Completeness4/5

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

For a 10-parameter, zero-required tool with no output schema, the description covers modes, defaults, corpus scope, date relaxation, warning disclosure, and return contents. Remaining gaps are modest: general pagination semantics for page/per_page (including the 0-100 and 1-20 bounds) and any note on result volume for non-relaxed searches.

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?

With only 50% schema coverage, the description carries real weight: it explains countries (ES, EU or both), that source_groups must be omitted to span all judicial sources, that court needs an exact catalog code such as TS or TC, and the query_intent/search_mode interaction rule. page and per_page are left essentially undocumented beyond a passing mention of paginating relaxed results.

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 first sentence gives a specific verb plus resource and enumerates the search axes: 'Search Spanish and EU court judgments by legal issue, terms, body, date or source.' It also names the corpus boundary (judicial sources, excluding DYCTEA and PETETE) and points to list_courts, so the agent can distinguish it from lookup_decision/read_decision without opening any schema.

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?

Guidance is unusually explicit about mode selection: thematic search = non-empty query with query_intent omitted; structured textual search = query_intent with required/any_of/phrases rules; explicit natural plus query_intent is invalid. It also routes to list_courts when the court code is unknown. The only gap is that it never states when to prefer lookup_decision/read_decision over searching, so 'when not to use' is incomplete.

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.

Resources