Skip to main content
Glama

Buscar evidencias judiciales

search_evidence
Read-onlyIdempotent

Search judicial passages with official links, versions and content_scope. For a search restricted to one court, send its catalog code in body_code and omit court and court_scope. Example: body_code='TS' for Tribunal Supremo. Use list_courts if unsure of the code. Writing the court in query does not filter results. For an unrestricted search with a contextual court mention, send court_scope='all' and omit both body_code and court. applied_filters identifies the applied scope. CENDOJ summaries are identified separately from full judgments. Omitted allowed_modes defaults to natural hybrid retrieval; use allowed_modes=['judicial_text'] for explicit textual retrieval. allowed_modes accepts judicial_text, semantic_vector and judicial_hybrid. Dates are optional for relevance searches; never invent dates. Empty dated searches retry without dates, preserving other filters. Disclose date_filter_relaxed warnings and the actual dates of the returned documents.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_evidence"
  }
}

Input Schema

NameRequiredDescriptionDefault
courtNoCompatibility alias for body_code. Prefer body_code and send only one of these fields.
limitNo
queryYes
body_codeNoPreferred field for the court code. Required for a court restriction unless the court alias is used. Send one exact code from list_courts, such as TS (Tribunal Supremo), TC (Tribunal Constitucional), or TSJM (TSJ Madrid). Omit court and court_scope when using body_code.
countriesNo
body_familyNo
court_scopeNoOmit when sending a court code. Set all only for a contextual court mention when the user permits every court, and omit both code fields. If you send restricted, a court code is required.
allowed_modesNo
source_groupsNo
decision_date_toNo
require_semanticNo
content_languagesNo
response_languageNo
decision_date_fromNo
court_category_codeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / body_code / description
      Previous value: -"Court code from list_courts. Required for a user court restriction: TS=Tribunal Supremo, TC=Tribunal Constitucional, TSJM=TSJ Madrid. Query text is not a court filter."New value: +"Preferred field for the court code. Required for a court restriction unless the court alias is used. Send one exact code from list_courts, such as TS (Tribunal Supremo), TC (Tribunal Constitucional), or TSJM (TSJ Madrid). Omit court and court_scope when using body_code."
    • changedInput schema / properties / court / description
      Previous value: -"Court code from list_courts. Required for a user court restriction: TS=Tribunal Supremo, TC=Tribunal Constitucional, TSJM=TSJ Madrid. Query text is not a court filter."New value: +"Compatibility alias for body_code. Prefer body_code and send only one of these fields."
    • changedInput schema / properties / court_scope / description
      Previous value: -"Use restricted with an explicit court code. Use all only if the user permits all courts; this explicitly treats court mentions in query as context, not a restriction."New value: +"Omit when sending a court code. Set all only for a contextual court mention when the user permits every court, and omit both code fields. If you send restricted, a court code is required."
  2. Changed3 schema fields changed
    • addedInput schema / properties / body_code / description
      Added value: +"Court code from list_courts. Required for a user court restriction: TS=Tribunal Supremo, TC=Tribunal Constitucional, TSJM=TSJ Madrid. Query text is not a court filter."
    • addedInput schema / properties / court
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Court code from list_courts. Required for a user court restriction: TS=Tribunal Supremo, TC=Tribunal Constitucional, TSJM=TSJ Madrid. Query text is not a court filter.",
      +  "title": "Court"
      +}
    • addedInput schema / properties / court_scope
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "restricted",
      +        "all"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Use restricted with an explicit court code. Use all only if the user permits all courts; this explicitly treats court mentions in query as context, not a restriction.",
      +  "title": "Court Scope"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already establish readOnly, idempotent, non-destructive, and closed-world behavior, so this dimension focuses on what the description adds beyond that. The description contributes substantial operational detail: empty dated searches retry without dates while preserving other filters, date_filter_relaxed warnings must be surfaced, applied_filters identifies the enforced scope, and CENDOJ summaries are labeled separately from full judgments. The only shortfall is that it never says what a result looks like or whether pagination exists, though the response-field names hint at structure.

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?

The definition front-loads the court-scope rule, which is the highest-risk decision, and every sentence carries operational content. The main weakness is that it moves between court scoping, allowed_modes, and date handling without grouping; a few of these statements, such as the note that omitted allowed_modes defaults to hybrid retrieval, sit apart from the rest of the mode guidance.

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 15-parameter tool with no output schema, the description covers the interactions most likely to be called incorrectly: court versus body_code versus court_scope, the retrieval modes, and the optional date behavior with retry and warning semantics. It is incomplete on the many secondary filters (countries, body_family, source_groups, content_languages, response_language) and on result size or paging via limit, which keeps it short of full coverage.

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

Parameters3/5

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

The schema covers only about 20% of the parameters, so the description must compensate, and it does so for body_code, court, court_scope, allowed_modes (with its judicial_text, semantic_vector, and judicial_hybrid values), and decision_date_from and decision_date_to. However, it says nothing about limit, countries, body_family, source_groups, require_semantic, content_languages, response_language, or court_category_code. The description therefore adds real meaning for the trickiest parameters but leaves half the surface unexplained.

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

Purpose4/5

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

The description opens with a specific verb and resource ('Search judicial passages') and names the artifacts returned (official links, versions, content_scope). It clearly separates itself from list_courts, but gives no cue for distinguishing it from the sibling search_decisions or search_administrative_documents, so an agent must infer the boundary between these search tools.

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 states explicit conditions: use body_code for a single-court search and omit court and court_scope; use court_scope='all' only for a contextual court mention when every court is permitted; call list_courts when the code is unknown. It also warns that writing the court in query does not filter, which prevents a specific failure mode. These are when-to-use and when-not-to-use rules, not just implied context.

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