{
  "server": {
    "name": "arcilla",
    "title": "arcilla",
    "icons": [
      {
        "src": "https://arcilla.ai/icon.png",
        "mimeType": "image/png",
        "sizes": [
          "512x512"
        ]
      }
    ],
    "version": "1.0.0",
    "websiteUrl": "https://arcilla.ai",
    "description": "Spanish and Andorran law: legislation with in-force status, case law and binding tax doctrine; legal research with citable passages, and citation checks against the official sources."
  },
  "endpoint": "https://mcp.arcilla.ai/mcp",
  "transport": "streamable-http",
  "authorization": {
    "protected_resource_metadata": "https://mcp.arcilla.ai/.well-known/oauth-protected-resource",
    "authorization_server": "https://clerk.arcilla.ai",
    "scopes": [
      "mcp"
    ]
  },
  "instructions": "arcilla (arcilla.ai; argila.ai for Andorra) holds Spanish and Andorran law: consolidated legislation with in-force status, state and regional; case law (official sources of the Spanish and Andorran courts); binding tax doctrine (Spain's Dirección General de Tributos; Andorra's consultes vinculants and comunicats tècnics). It researches legal questions, finds articles, rulings and tax rulings, and checks the citations of legal texts against the official sources. Every call names one legal system: jurisdiction es or ad. Each result starts with a brief for the reader in the user's language — citations ready to paste, statuses, official links, the link to the report saved in the user's account — then the JSON. Tell the user what a result means in their own words, as the brief does: the values the JSON names things with — a verdict such as verified, not_supported, not_found or not_verifiable; a status, reason or notice type; an error code; an id — are for the tools, and the user should see none of them. What a source says comes from the results: when they don't hold an article, ruling or passage the answer needs, or a notice says it wasn't found, say so, and don't supply its content from memory. Passages, in Spanish or Catalan, are quoted as they are. InvestigarCuestion takes a question in natural language, as the user asked it, and plans its own searches; each search looks for one matter; ResolverCitas looks up references already known; LeerFuente reads a source whole or finds passages in it. A research numbers its sources [1]…[n] and lasts 24 hours after its last use; its pack_id, a handle the user doesn't know, lets the searches add to it, RecuperarInvestigacion reopen it and VerificarCitas cite its numbers. A call not done in about 45 seconds returns a job; ObtenerResultado returns its result. When the user's monthly arcilla usage is used up, every tool returns quota_exceeded until it resets: don't retry; tell the user when it resets and where to see their plan, as the error says.",
  "tools": [
    {
      "name": "VerificarCitas",
      "title": "Verify citations",
      "description": "Checks the legal statements and citations of a brief, contract, opinion or any legal text against the sources they cite in Spanish or Andorran law (verificar citas; verificar citacions). For each statement it reports whether the source supports it (verified), exists but does not support it (not_supported), could not be found (not_found; the source may still exist outside this corpus), or states nothing that can be checked (not_verifiable), with the passage used as evidence. Optionally searches for a source for statements that cite none. The codes name the verdicts for the tools; the brief states each in the user's language.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "claims": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 40
                },
                "statement": {
                  "type": "string",
                  "minLength": 3,
                  "maxLength": 1500,
                  "description": "The legal proposition, as written."
                },
                "citation": {
                  "type": "string",
                  "maxLength": 300,
                  "description": "What the statement cites: free text, a source id, or the number of a research's source such as [3]."
                },
                "quote": {
                  "type": "string",
                  "maxLength": 2000,
                  "description": "Words the statement quotes from the source; checked literally."
                },
                "pinpoint": {
                  "type": "string",
                  "maxLength": 100,
                  "description": "Where in the source: apartado 4, FD tercero."
                }
              },
              "required": [
                "id",
                "statement"
              ],
              "additionalProperties": false
            },
            "minItems": 1,
            "maxItems": 50
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "Lets a citation be the number of one of that research's sources, such as [3]."
          },
          "suggest": {
            "type": "boolean",
            "default": false,
            "description": "Search for a source for statements that cite none or whose source is not found."
          },
          "language": {
            "type": "string",
            "enum": [
              "es",
              "ca",
              "en"
            ],
            "description": "The language of the user's conversation, for the explanations and the card: es, ca or en. By default, the claims' own."
          }
        },
        "required": [
          "jurisdiction",
          "claims"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "statement": {
                  "type": "string",
                  "description": "The claim's statement, as it was sent."
                },
                "citation": {
                  "type": "string",
                  "description": "The claim's citation, as it was sent."
                },
                "verdict": {
                  "type": "string",
                  "enum": [
                    "verified",
                    "not_supported",
                    "not_found",
                    "not_verifiable"
                  ]
                },
                "reason": {
                  "type": "string",
                  "enum": [
                    "contradicts",
                    "not_stated",
                    "partially",
                    "figure_mismatch",
                    "quote_not_literal",
                    "wrong_court",
                    "not_in_force",
                    "unresolved_reference",
                    "ambiguous",
                    "outside_coverage",
                    "generic_statement",
                    "opinion_or_strategy",
                    "no_source_cited",
                    "source_type_not_covered"
                  ]
                },
                "explanation": {
                  "type": "string"
                },
                "source": {
                  "type": "object",
                  "properties": {
                    "n": {
                      "type": "integer"
                    },
                    "id": {
                      "type": "string"
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "law_article",
                        "law_provision",
                        "ruling",
                        "doctrine"
                      ]
                    },
                    "jurisdiction": {
                      "type": "string",
                      "enum": [
                        "es",
                        "ad"
                      ]
                    },
                    "title": {
                      "type": "string"
                    },
                    "citation": {
                      "type": "string"
                    },
                    "short_name": {
                      "type": "string",
                      "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                    },
                    "source_name": {
                      "type": "string",
                      "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                    },
                    "url": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                    },
                    "viewer_url": {
                      "type": "string",
                      "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                    },
                    "date": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "in_force",
                        "repealed",
                        "exhausted",
                        "pending"
                      ]
                    },
                    "applies_from": {
                      "type": "string"
                    },
                    "not_in_force_since": {
                      "type": "string"
                    },
                    "territory": {
                      "type": "string"
                    },
                    "court": {
                      "type": "string"
                    },
                    "number": {
                      "type": "string"
                    },
                    "roj": {
                      "type": "string"
                    },
                    "ecli": {
                      "type": "string"
                    },
                    "passages": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "locator": {
                            "type": "string"
                          },
                          "before": {
                            "type": "string",
                            "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                          },
                          "after": {
                            "type": "string",
                            "description": "A ruling's paragraph after the passage, up to 60 words."
                          },
                          "fragments": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The passages of one paragraph this passage joins, each found in its text."
                          }
                        },
                        "required": [
                          "text"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "summary": {
                      "type": "string",
                      "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                    },
                    "summary_only": {
                      "type": "boolean",
                      "const": true
                    },
                    "text_chars": {
                      "type": "integer"
                    },
                    "status_label": {
                      "type": "string",
                      "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                    },
                    "kind_label": {
                      "type": "string",
                      "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                    }
                  },
                  "required": [
                    "id",
                    "kind",
                    "jurisdiction",
                    "title",
                    "citation",
                    "url",
                    "date",
                    "status",
                    "passages",
                    "text_chars"
                  ],
                  "additionalProperties": false
                },
                "candidates": {
                  "type": "array",
                  "items": {
                    "$ref": "#/properties/results/items/properties/source"
                  }
                },
                "evidence": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "locator": {
                      "type": "string"
                    },
                    "literal": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "text",
                    "literal"
                  ],
                  "additionalProperties": false
                },
                "correction": {
                  "type": "object",
                  "properties": {
                    "citation": {
                      "type": "string"
                    },
                    "quote": {
                      "type": "string"
                    },
                    "note": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "note"
                  ],
                  "additionalProperties": false
                },
                "suggested_sources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/properties/results/items/properties/source"
                  }
                },
                "confidence": {
                  "type": "string",
                  "enum": [
                    "high",
                    "medium",
                    "low"
                  ]
                },
                "verdict_label": {
                  "type": "string",
                  "description": "The verdict in the user's language, the words for the user; the code beside it is for the tools."
                },
                "reason_label": {
                  "type": "string",
                  "description": "Why, when it isn't verified, in the user's language, the words for the user; the code beside it is for the tools."
                },
                "confidence_label": {
                  "type": "string",
                  "description": "How sure the check is in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "verdict",
                "explanation",
                "confidence"
              ],
              "additionalProperties": false
            }
          },
          "counts": {
            "type": "object",
            "properties": {
              "verified": {
                "type": "integer"
              },
              "not_supported": {
                "type": "integer"
              },
              "not_found": {
                "type": "integer"
              },
              "not_verifiable": {
                "type": "integer"
              }
            },
            "required": [
              "verified",
              "not_supported",
              "not_found",
              "not_verifiable"
            ],
            "additionalProperties": false
          },
          "report": {
            "type": "object",
            "properties": {
              "createdAt": {
                "type": "string"
              },
              "seq": {
                "type": "number"
              }
            },
            "required": [
              "createdAt",
              "seq"
            ],
            "additionalProperties": false
          },
          "saved": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "description": "The full report in the user's account on arcilla.ai (argila.ai for Andorran law), for the user to open."
              }
            },
            "required": [
              "task_id",
              "url"
            ],
            "additionalProperties": false
          },
          "language": {
            "type": "string"
          },
          "counts_label": {
            "type": "string",
            "description": "The verdicts counted in the user's language, the words for the user; the code beside it is for the tools."
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Verify citations",
        "readOnlyHint": false,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "verify_citations",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "ResolverCitas",
      "title": "Resolve citations",
      "description": "Finds the sources that legal references point to in Spanish or Andorran law — articles of named laws (art. 1902 CC), rulings by ECLI, ROJ or number (STS 111/2015), binding tax rulings by code (V0787-25) — and returns their text and in-force status.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "references": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "One reference per item, as written: art. 242.2 CP, artículo 14 de la Ley 29/1994, ECLI:ES:TS:2018:2363, STS 101/2018, V1234-24."
          },
          "include_text": {
            "type": "boolean",
            "default": true,
            "description": "false: each source's status and a line on what it is about, without its text, for large batches."
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "jurisdiction",
          "references"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "reference": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "resolved",
                    "ambiguous",
                    "not_found"
                  ]
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "n": {
                        "type": "integer"
                      },
                      "id": {
                        "type": "string"
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "law_article",
                          "law_provision",
                          "ruling",
                          "doctrine"
                        ]
                      },
                      "jurisdiction": {
                        "type": "string",
                        "enum": [
                          "es",
                          "ad"
                        ]
                      },
                      "title": {
                        "type": "string"
                      },
                      "citation": {
                        "type": "string"
                      },
                      "short_name": {
                        "type": "string",
                        "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                      },
                      "source_name": {
                        "type": "string",
                        "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                      },
                      "url": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                      },
                      "viewer_url": {
                        "type": "string",
                        "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                      },
                      "date": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "in_force",
                          "repealed",
                          "exhausted",
                          "pending"
                        ]
                      },
                      "applies_from": {
                        "type": "string"
                      },
                      "not_in_force_since": {
                        "type": "string"
                      },
                      "territory": {
                        "type": "string"
                      },
                      "court": {
                        "type": "string"
                      },
                      "number": {
                        "type": "string"
                      },
                      "roj": {
                        "type": "string"
                      },
                      "ecli": {
                        "type": "string"
                      },
                      "passages": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "text": {
                              "type": "string"
                            },
                            "locator": {
                              "type": "string"
                            },
                            "before": {
                              "type": "string",
                              "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                            },
                            "after": {
                              "type": "string",
                              "description": "A ruling's paragraph after the passage, up to 60 words."
                            },
                            "fragments": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              },
                              "description": "The passages of one paragraph this passage joins, each found in its text."
                            }
                          },
                          "required": [
                            "text"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "summary": {
                        "type": "string",
                        "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                      },
                      "summary_only": {
                        "type": "boolean",
                        "const": true
                      },
                      "text_chars": {
                        "type": "integer"
                      },
                      "status_label": {
                        "type": "string",
                        "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                      },
                      "kind_label": {
                        "type": "string",
                        "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                      }
                    },
                    "required": [
                      "id",
                      "kind",
                      "jurisdiction",
                      "title",
                      "citation",
                      "url",
                      "date",
                      "status",
                      "passages",
                      "text_chars"
                    ],
                    "additionalProperties": false
                  }
                },
                "note": {
                  "type": "string"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the reference was found in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "reference",
                "status",
                "sources"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "results"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Resolve citations",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "resolve_citations",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "InvestigarCuestion",
      "title": "Research a legal question",
      "description": "Researches a question of Spanish law, state or regional (Catalonia, Madrid…), or of Andorran law across legislation, case law and binding tax doctrine (investigación jurídica; recerca jurídica), and returns the sources found, numbered [1]…[n]: exact passages, official links, in-force status, how the sources relate, and what could not be found. It takes the question in natural language and does its own analysis: the issues, the legal concepts and the terms courts use, and a search plan across the three corpora. It does not write an answer. Research usually takes 10–60 seconds.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "question": {
            "type": "string",
            "minLength": 3,
            "maxLength": 4000,
            "description": "The question as the user asked it, in their words and language, with the facts of the conversation it depends on. The research analyses it itself: it finds the issues, the legal concepts and the terms courts use for them, and plans its own searches."
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          },
          "region": {
            "type": "string",
            "maxLength": 200,
            "description": "Spanish autonomous community or court the question is about (Cataluña, Madrid, Andalucía…), if the question doesn't say."
          },
          "depth": {
            "type": "string",
            "enum": [
              "standard",
              "extended"
            ],
            "default": "standard",
            "description": "standard: up to 20 sources, with tax doctrine when the matter is tax. extended: up to 35, with tax doctrine in every case."
          }
        },
        "required": [
          "question",
          "jurisdiction"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string",
            "description": "Handle for continuing this research with other tools (get_research, the searches, verify_citations); it means nothing to the user."
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "running",
              "needs_detail",
              "out_of_scope"
            ]
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ]
          },
          "language": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "label",
                "sources"
              ],
              "additionalProperties": false
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "text",
                "sources"
              ],
              "additionalProperties": false
            }
          },
          "conclusion": {
            "type": "string",
            "description": "What the sources, together, answer to the question, in two sentences at most."
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "gaps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "topic": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "topic",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "clarification": {
            "type": "string"
          },
          "coverage": {
            "type": "object",
            "properties": {
              "legislation_until": {
                "type": "string"
              },
              "case_law_until": {
                "type": "string"
              },
              "doctrine_until": {
                "type": "string"
              }
            },
            "required": [
              "legislation_until",
              "case_law_until",
              "doctrine_until"
            ],
            "additionalProperties": false
          },
          "stats": {
            "type": "object",
            "properties": {
              "elapsed_ms": {
                "type": "number"
              },
              "steps": {
                "type": "number"
              },
              "revisions": {
                "type": "number"
              },
              "candidates": {
                "type": "number"
              }
            },
            "required": [
              "elapsed_ms",
              "steps",
              "revisions",
              "candidates"
            ],
            "additionalProperties": false
          },
          "saved": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "description": "The full report in the user's account on arcilla.ai (argila.ai for Andorran law), for the user to open."
              }
            },
            "required": [
              "task_id",
              "url"
            ],
            "additionalProperties": false
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          },
          "status_label": {
            "type": "string",
            "description": "The research's state in the user's language, the words for the user; the code beside it is for the tools."
          }
        },
        "required": [
          "pack_id",
          "status",
          "jurisdiction",
          "language",
          "results",
          "issues",
          "findings",
          "notices",
          "gaps",
          "coverage",
          "stats"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Research a legal question",
        "readOnlyHint": false,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "research_legal_question",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "RecuperarInvestigacion",
      "title": "Get research",
      "description": "Reopens a research by the id InvestigarCuestion gave it, for 24 hours after its last use: complete, or as it stands at that moment while it is still running. It returns at once and doesn't wait; a research not done in time returned a job, and ObtenerResultado waits for it.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "pack_id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string",
            "description": "Handle for continuing this research with other tools (get_research, the searches, verify_citations); it means nothing to the user."
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "running",
              "needs_detail",
              "out_of_scope"
            ]
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ]
          },
          "language": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "label",
                "sources"
              ],
              "additionalProperties": false
            }
          },
          "findings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "text",
                "sources"
              ],
              "additionalProperties": false
            }
          },
          "conclusion": {
            "type": "string",
            "description": "What the sources, together, answer to the question, in two sentences at most."
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "gaps": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "topic": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              },
              "required": [
                "topic",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "clarification": {
            "type": "string"
          },
          "coverage": {
            "type": "object",
            "properties": {
              "legislation_until": {
                "type": "string"
              },
              "case_law_until": {
                "type": "string"
              },
              "doctrine_until": {
                "type": "string"
              }
            },
            "required": [
              "legislation_until",
              "case_law_until",
              "doctrine_until"
            ],
            "additionalProperties": false
          },
          "stats": {
            "type": "object",
            "properties": {
              "elapsed_ms": {
                "type": "number"
              },
              "steps": {
                "type": "number"
              },
              "revisions": {
                "type": "number"
              },
              "candidates": {
                "type": "number"
              }
            },
            "required": [
              "elapsed_ms",
              "steps",
              "revisions",
              "candidates"
            ],
            "additionalProperties": false
          },
          "saved": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string"
              },
              "url": {
                "type": "string",
                "description": "The full report in the user's account on arcilla.ai (argila.ai for Andorran law), for the user to open."
              }
            },
            "required": [
              "task_id",
              "url"
            ],
            "additionalProperties": false
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          },
          "status_label": {
            "type": "string",
            "description": "The research's state in the user's language, the words for the user; the code beside it is for the tools."
          }
        },
        "required": [
          "pack_id",
          "status",
          "jurisdiction",
          "language",
          "results",
          "issues",
          "findings",
          "notices",
          "gaps",
          "coverage",
          "stats"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Get research",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "get_research",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "BuscarLegislacion",
      "title": "Search legislation",
      "description": "Searches Spanish legislation, state and regional laws, codes and regulations (legislación, leyes, BOE), or Andorran laws (lleis, BOPA) for the articles that regulate one matter, and returns them with their text, in-force status and official links. Retrieval combines meaning and words; the articles are ranked against the whole query. With a law named, the articles the query or the name gives by number (\"Código Civil, art. 92\") are read from that law and come first. ResolverCitas looks up references already known, without a matter to search.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 3,
            "maxLength": 1000,
            "description": "The matter the articles regulate, as a sentence in the language the corpus is written in — Spanish for jurisdiction \"es\", Catalan for \"ad\" —, whatever language the user writes in: retrieval combines meaning and words, and the results are ranked against the whole query."
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "in_force_only": {
            "type": "boolean",
            "default": true
          },
          "law": {
            "type": "string",
            "maxLength": 300,
            "description": "Restrict the search to one law, by name or abbreviation. Articles it names by number (\"Código Civil, art. 92\") come first."
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 5
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "query",
          "jurisdiction"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "overview": {
            "type": "string",
            "description": "Case-law search: what the rulings found decide on the matter searched, in two sentences at most. Not their wording: quote only their passages."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Search legislation",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "search_legislation",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "BuscarJurisprudencia",
      "title": "Search case law",
      "description": "Searches Spanish case law — Tribunal Supremo, Audiencia Nacional, regional High Courts, Audiencias Provinciales and other courts, Catalonia's included, from their official sources — or Andorran case law (jurisprudencia, sentencias; jurisprudència, sentències), and returns the most relevant rulings with the court, the ruling's number, the date, the relevant passages and official links, for one legal issue. Retrieval combines meaning and words; the rulings and their passages are ranked against the whole query. A court, region or date range narrows the ranking.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 3,
            "maxLength": 1000,
            "description": "The legal issue the rulings decide, with the facts that matter, as a sentence in the language the corpus is written in — Spanish for jurisdiction \"es\", Catalan for \"ad\" —, whatever language the user writes in: retrieval combines meaning and words, and the results are ranked against the whole query."
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "court": {
            "type": "string",
            "maxLength": 200,
            "description": "A court by name: Tribunal Supremo, Audiencia Provincial de Barcelona. It raises that court's rulings and keeps only them."
          },
          "region": {
            "type": "string",
            "maxLength": 200,
            "description": "A Spanish autonomous community or province (Cataluña, Barcelona, Madrid…). It raises its courts' rulings and keeps only them."
          },
          "date_from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "date_to": {
            "$ref": "#/properties/date_from"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 5
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "query",
          "jurisdiction"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "overview": {
            "type": "string",
            "description": "Case-law search: what the rulings found decide on the matter searched, in two sentences at most. Not their wording: quote only their passages."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Search case law",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "search_case_law",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "BuscarDoctrinaTributaria",
      "title": "Search tax doctrine",
      "description": "Searches binding tax rulings — Spain's Dirección General de Tributos (consultas vinculantes, doctrina tributaria), Andorra's consultes vinculants and comunicats tècnics — on taxes such as IRPF, IVA, Sociedades or IGI, and returns them with their code, date, relevant passages and official links, ranked against the whole query.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 3,
            "maxLength": 1000,
            "description": "The tax matter the rulings answer, as a sentence in the language the corpus is written in — Spanish for jurisdiction \"es\", Catalan for \"ad\" —, whatever language the user writes in: retrieval combines meaning and words, and the results are ranked against the whole query."
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "date_from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "date_to": {
            "$ref": "#/properties/date_from"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 5
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "query",
          "jurisdiction"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "overview": {
            "type": "string",
            "description": "Case-law search: what the rulings found decide on the matter searched, in two sentences at most. Not their wording: quote only their passages."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Search tax doctrine",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "search_tax_doctrine",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "LeerFuente",
      "title": "Get source",
      "description": "Returns the text of a source by id: the full text in pages, or with a query, the passages of that source whose meaning is closest to it.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200,
            "description": "A source's id as a result gives it: es:law:BOE-A-1995-25444:a242, es:ruling:ECLI:ES:TS:2018:2363."
          },
          "query": {
            "type": "string",
            "maxLength": 1000,
            "description": "What to find in the source, as a sentence: its passages are ranked against it by meaning."
          },
          "offset": {
            "type": "integer",
            "minimum": 0,
            "default": 0
          },
          "max_chars": {
            "type": "integer",
            "minimum": 1000,
            "maximum": 30000,
            "default": 20000
          },
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a research (rp_…), from research_legal_question: the call adds its sources to that research's numbered list."
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "source": {
            "type": "object",
            "properties": {
              "n": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "law_article",
                  "law_provision",
                  "ruling",
                  "doctrine"
                ]
              },
              "jurisdiction": {
                "type": "string",
                "enum": [
                  "es",
                  "ad"
                ]
              },
              "title": {
                "type": "string"
              },
              "citation": {
                "type": "string"
              },
              "short_name": {
                "type": "string",
                "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
              },
              "source_name": {
                "type": "string",
                "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
              },
              "viewer_url": {
                "type": "string",
                "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "in_force",
                  "repealed",
                  "exhausted",
                  "pending"
                ]
              },
              "applies_from": {
                "type": "string"
              },
              "not_in_force_since": {
                "type": "string"
              },
              "territory": {
                "type": "string"
              },
              "court": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "roj": {
                "type": "string"
              },
              "ecli": {
                "type": "string"
              },
              "passages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "locator": {
                      "type": "string"
                    },
                    "before": {
                      "type": "string",
                      "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                    },
                    "after": {
                      "type": "string",
                      "description": "A ruling's paragraph after the passage, up to 60 words."
                    },
                    "fragments": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The passages of one paragraph this passage joins, each found in its text."
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              },
              "summary": {
                "type": "string",
                "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
              },
              "summary_only": {
                "type": "boolean",
                "const": true
              },
              "text_chars": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
              },
              "kind_label": {
                "type": "string",
                "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "kind",
              "jurisdiction",
              "title",
              "citation",
              "url",
              "date",
              "status",
              "passages",
              "text_chars"
            ],
            "additionalProperties": false
          },
          "offset": {
            "type": "integer"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "total_chars": {
            "type": "integer"
          }
        },
        "required": [
          "source",
          "offset",
          "next_offset",
          "total_chars"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Get source",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "get_source",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "ConsultarCifrasOficiales",
      "title": "Get official figures",
      "description": "Returns official legal and tax figures for a year — legal interest rate (interés legal del dinero), minimum wage (SMI), IPREM, tax scales, social security bases, Andorran CASS and IGI rates — with the provision of the corpus that sets them.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "figure": {
            "type": "string",
            "enum": [
              "interes_legal_dinero",
              "interes_demora_tributario",
              "salario_minimo_interprofesional",
              "iprem",
              "tipo_impuesto_sociedades",
              "escala_irpf_estatal",
              "bases_cotizacion_seguridad_social",
              "salari_minim",
              "tipus_igi",
              "cotitzacio_cass"
            ]
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "es = Spanish law (Spain, España, Espanya), ad = Andorran law (Andorra). One legal system per call. A user who names argila or @argila usually means Andorran law; arcilla or @arcilla, Spanish law."
          },
          "year": {
            "type": "integer",
            "minimum": 1990,
            "maximum": 2100
          },
          "region": {
            "type": "string",
            "maxLength": 200
          },
          "language": {
            "type": "string",
            "enum": [
              "es",
              "ca",
              "en"
            ],
            "description": "The language of the user's conversation, for the explanations and the card: es, ca or en. By default, the legal system's: Catalan for Andorra, Spanish for Spain."
          }
        },
        "required": [
          "figure",
          "jurisdiction",
          "year"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "figure": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ]
          },
          "year": {
            "type": "integer"
          },
          "found": {
            "type": "boolean"
          },
          "value": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "source": {
            "type": "object",
            "properties": {
              "n": {
                "type": "integer"
              },
              "id": {
                "type": "string"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "law_article",
                  "law_provision",
                  "ruling",
                  "doctrine"
                ]
              },
              "jurisdiction": {
                "type": "string",
                "enum": [
                  "es",
                  "ad"
                ]
              },
              "title": {
                "type": "string"
              },
              "citation": {
                "type": "string"
              },
              "short_name": {
                "type": "string",
                "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
              },
              "source_name": {
                "type": "string",
                "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
              },
              "viewer_url": {
                "type": "string",
                "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
              },
              "date": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "in_force",
                  "repealed",
                  "exhausted",
                  "pending"
                ]
              },
              "applies_from": {
                "type": "string"
              },
              "not_in_force_since": {
                "type": "string"
              },
              "territory": {
                "type": "string"
              },
              "court": {
                "type": "string"
              },
              "number": {
                "type": "string"
              },
              "roj": {
                "type": "string"
              },
              "ecli": {
                "type": "string"
              },
              "passages": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "text": {
                      "type": "string"
                    },
                    "locator": {
                      "type": "string"
                    },
                    "before": {
                      "type": "string",
                      "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                    },
                    "after": {
                      "type": "string",
                      "description": "A ruling's paragraph after the passage, up to 60 words."
                    },
                    "fragments": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The passages of one paragraph this passage joins, each found in its text."
                    }
                  },
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false
                }
              },
              "summary": {
                "type": "string",
                "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
              },
              "summary_only": {
                "type": "boolean",
                "const": true
              },
              "text_chars": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
              },
              "kind_label": {
                "type": "string",
                "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "kind",
              "jurisdiction",
              "title",
              "citation",
              "url",
              "date",
              "status",
              "passages",
              "text_chars"
            ],
            "additionalProperties": false
          },
          "explanation": {
            "type": "string"
          },
          "language": {
            "type": "string"
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Get official figures",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "get_official_figures",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "BuscarSentenciasQueCitan",
      "title": "Find citing rulings",
      "description": "Returns later Spanish or Andorran rulings that cite a given ruling or article, with the passage where they cite it.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 3,
            "maxLength": 200,
            "description": "A source's id as a result gives it: es:law:BOE-A-1995-25444:a242, es:ruling:ECLI:ES:TS:2018:2363."
          },
          "date_from": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "court": {
            "type": "string",
            "maxLength": 200
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10,
            "default": 5
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string"
          },
          "overview": {
            "type": "string",
            "description": "Case-law search: what the rulings found decide on the matter searched, in two sentences at most. Not their wording: quote only their passages."
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "id": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "jurisdiction": {
                  "type": "string",
                  "enum": [
                    "es",
                    "ad"
                  ]
                },
                "title": {
                  "type": "string"
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string",
                  "description": "The source as arcilla names it on its citation chips: 92.2 CC, STS 568/2015, FD Segundo, V0787-25."
                },
                "source_name": {
                  "type": "string",
                  "description": "What arcilla shows under the citation: the law's common name or title, the ruling's ROJ or court."
                },
                "url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The official text: BOE, the courts' official case-law source, the DGT's database, Andorra's Portal Jurídic or BOPA. Null when the source has no public link."
                },
                "viewer_url": {
                  "type": "string",
                  "description": "Only on the sources of a saved research or citation check: the source inside that saved work in the user's arcilla account (argila for Andorra), the cited passage highlighted. Other sources have no arcilla link."
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                },
                "applies_from": {
                  "type": "string"
                },
                "not_in_force_since": {
                  "type": "string"
                },
                "territory": {
                  "type": "string"
                },
                "court": {
                  "type": "string"
                },
                "number": {
                  "type": "string"
                },
                "roj": {
                  "type": "string"
                },
                "ecli": {
                  "type": "string"
                },
                "passages": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "text": {
                        "type": "string"
                      },
                      "locator": {
                        "type": "string"
                      },
                      "before": {
                        "type": "string",
                        "description": "A ruling's paragraph before the passage, up to 60 words: the passage in context."
                      },
                      "after": {
                        "type": "string",
                        "description": "A ruling's paragraph after the passage, up to 60 words."
                      },
                      "fragments": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "description": "The passages of one paragraph this passage joins, each found in its text."
                      }
                    },
                    "required": [
                      "text"
                    ],
                    "additionalProperties": false
                  }
                },
                "summary": {
                  "type": "string",
                  "description": "What the source is about, in a line: a ruling's summary, the question a tax ruling answers, an article's opening words. Not the source's wording: quote only its passages."
                },
                "summary_only": {
                  "type": "boolean",
                  "const": true
                },
                "text_chars": {
                  "type": "integer"
                },
                "status_label": {
                  "type": "string",
                  "description": "Whether the law is in force in the user's language, the words for the user; the code beside it is for the tools."
                },
                "kind_label": {
                  "type": "string",
                  "description": "The kind of source in the user's language, the words for the user; the code beside it is for the tools."
                }
              },
              "required": [
                "id",
                "kind",
                "jurisdiction",
                "title",
                "citation",
                "url",
                "date",
                "status",
                "passages",
                "text_chars"
              ],
              "additionalProperties": false
            }
          },
          "notices": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "enum": [
                    "pending_law",
                    "other_territory",
                    "summary_only",
                    "article_not_found",
                    "version",
                    "fewer_results",
                    "research_note",
                    "time_limit",
                    "interrupted"
                  ]
                },
                "text": {
                  "type": "string"
                },
                "sources": {
                  "type": "array",
                  "items": {
                    "type": "integer"
                  }
                }
              },
              "required": [
                "type",
                "text"
              ],
              "additionalProperties": false
            }
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          }
        },
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Find citing rulings",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "find_citing_rulings",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "ObtenerResultado",
      "title": "Get result",
      "description": "Returns the result of a job: the verification, search or research that a tool returned as a job because it was not done within about 45 seconds. It is the one way to wait for a job, research included. While the job is still queued or running it returns the job again, waiting up to wait_seconds for it. A result is kept 10 minutes after the job ends, or 1 minute once collected; a research stays readable with RecuperarInvestigacion for 24 hours.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "job_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80,
            "description": "The id of a job a tool returned when it wasn't done in time."
          },
          "wait_seconds": {
            "type": "integer",
            "minimum": 0,
            "maximum": 45,
            "default": 30
          }
        },
        "required": [
          "job_id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "done",
              "queued",
              "running"
            ]
          },
          "tool": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": {},
            "description": "The tool's own result, once done."
          },
          "job": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "queued",
                  "running"
                ]
              },
              "position": {
                "type": "integer"
              },
              "retry_after_s": {
                "type": "integer"
              },
              "status_label": {
                "type": "string",
                "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
              }
            },
            "required": [
              "id",
              "status",
              "retry_after_s"
            ],
            "additionalProperties": false
          },
          "status_label": {
            "type": "string",
            "description": "The job's state in the user's language, the words for the user; the code beside it is for the tools."
          }
        },
        "required": [
          "status",
          "tool"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Get result",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "resourceUri": "ui://arcila/panel-05c3db9a6d5a.html"
        },
        "ui/resourceUri": "ui://arcila/panel-05c3db9a6d5a.html",
        "arcilla/tool": "get_result",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "ProgresoInvestigacion",
      "title": "Research progress",
      "description": "Shows a running research's progress in arcilla's panel: its state, its steps and the sources found so far, by citation only, without their text. It isn't needed to answer a question: a research's sources and findings come with its result.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string",
            "maxLength": 40,
            "description": "The id of a running research (rp_…)."
          }
        },
        "required": [
          "pack_id"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "pack_id": {
            "type": "string",
            "description": "Handle for continuing this research with other tools (get_research, the searches, verify_citations); it means nothing to the user."
          },
          "status": {
            "type": "string",
            "enum": [
              "complete",
              "running",
              "needs_detail",
              "out_of_scope"
            ]
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ]
          },
          "stats": {
            "type": "object",
            "properties": {
              "elapsed_ms": {
                "type": "number"
              },
              "steps": {
                "type": "number"
              },
              "revisions": {
                "type": "number"
              },
              "candidates": {
                "type": "number"
              }
            },
            "required": [
              "elapsed_ms",
              "steps",
              "revisions",
              "candidates"
            ],
            "additionalProperties": false
          },
          "issues": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "n": {
                  "type": "integer"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "law_article",
                    "law_provision",
                    "ruling",
                    "doctrine"
                  ]
                },
                "citation": {
                  "type": "string"
                },
                "short_name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "in_force",
                    "repealed",
                    "exhausted",
                    "pending"
                  ]
                }
              },
              "required": [
                "n",
                "kind",
                "citation",
                "status"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "pack_id",
          "status",
          "jurisdiction",
          "stats",
          "issues",
          "sources"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Research progress",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "visibility": [
            "app"
          ]
        },
        "arcilla/tool": "research_progress",
        "arcilla/brand": "arcilla"
      }
    },
    {
      "name": "ProgresoLlamada",
      "title": "Call progress",
      "description": "Shows in arcilla's panel how a call it is showing is going, found by the call's tool and arguments: queued or running, and the steps it has taken, by name only. It isn't needed to answer a question: every call's result comes with the call.",
      "inputSchema": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "maxLength": 64,
            "description": "The tool the call is to; without it, every tool the arguments fit."
          },
          "arguments": {
            "type": "object",
            "additionalProperties": {},
            "description": "The call's arguments, as the call was made."
          }
        },
        "required": [
          "arguments"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "outputSchema": {
        "type": "object",
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "done",
              "unknown"
            ]
          },
          "tool": {
            "type": "string"
          },
          "jurisdiction": {
            "type": "string",
            "enum": [
              "es",
              "ad"
            ],
            "description": "The call's legal system: the language a get_result's panel speaks."
          },
          "position": {
            "type": "integer"
          },
          "started_at": {
            "type": "string"
          },
          "steps": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": {}
            }
          },
          "research": {
            "type": "object",
            "additionalProperties": {}
          }
        },
        "required": [
          "state",
          "steps"
        ],
        "additionalProperties": false,
        "$schema": "http://json-schema.org/draft-07/schema#"
      },
      "annotations": {
        "title": "Call progress",
        "readOnlyHint": true,
        "destructiveHint": false,
        "openWorldHint": false
      },
      "execution": {
        "taskSupport": "forbidden"
      },
      "_meta": {
        "ui": {
          "visibility": [
            "app"
          ]
        },
        "arcilla/tool": "call_progress",
        "arcilla/brand": "arcilla"
      }
    }
  ],
  "prompts": [
    {
      "name": "check_citations",
      "title": "Check citations",
      "description": "Checks every legal statement of a document or text in the conversation against the source it cites.",
      "arguments": [
        {
          "name": "jurisdiction",
          "description": "es = Spanish law, ad = Andorran law",
          "required": true
        }
      ]
    },
    {
      "name": "legal_research",
      "title": "Legal research",
      "description": "Researches a legal question in the arcilla corpus and answers citing only the passages found, checked before replying.",
      "arguments": [
        {
          "name": "question",
          "description": "The legal question",
          "required": true
        },
        {
          "name": "jurisdiction",
          "description": "es = Spanish law, ad = Andorran law",
          "required": true
        }
      ]
    }
  ],
  "resources": [
    {
      "name": "arcilla panel",
      "title": "arcilla panel",
      "uri": "ui://arcila/panel.html",
      "description": "Every tool's result as a panel: citation checks, searches, research, the reader and official figures, each source a chip that opens it in arcilla.",
      "mimeType": "text/html;profile=mcp-app"
    },
    {
      "name": "Citation report",
      "title": "Citation report",
      "uri": "ui://arcila/citation-report.html",
      "description": "The earlier address of the same panel.",
      "mimeType": "text/html;profile=mcp-app"
    },
    {
      "name": "arcilla panel",
      "title": "arcilla panel",
      "uri": "ui://arcila/panel-05c3db9a6d5a.html",
      "description": "Every tool's result as a panel, at the address of its current version.",
      "mimeType": "text/html;profile=mcp-app"
    }
  ],
  "resource_templates": [
    {
      "name": "arcilla panel",
      "title": "arcilla panel",
      "uriTemplate": "ui://arcila/panel-{version}.html",
      "description": "Every tool's result as a panel, at the address of its current version.",
      "mimeType": "text/html;profile=mcp-app"
    }
  ],
  "generated_at": "2026-10-27T13:56:54.213Z"
}