Skip to main content
Glama

lexml_search

Search the LexML legislative SRU repository using CQL queries or structured filters to retrieve legal documents.

Instructions

Search the LexML SRU acervo.

Args: query: CQL query string (e.g. 'dc.title any "constituição"') start_record: First record position (default 1) maximum_records: Max records to return (default 10, max 100) record_schema: Record schema (default 'dc', allowed: dc, oai_dc) filters: Structured filters {title, terms[], document_type, authority, date_from, date_to}. Mutually exclusive with query. When provided, generates safe CQL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
filtersNo
start_recordNo
record_schemaNodc
maximum_recordsNo
Behavior4/5

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

With no annotations, the description effectively discloses behavior: mutual exclusivity of query and filters, safe CQL generation, and maximum record limit. It does not cover error handling or performance, but it provides sufficient transparency for typical use.

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

Conciseness5/5

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

The description is compact and well-structured, using a clear docstring format. Each parameter is briefly explained, and no redundant information is present.

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

Completeness4/5

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

The description covers parameter usage and constraints comprehensively. However, it lacks any mention of the return format or output structure, which would be helpful given the absence of an output schema.

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

Parameters5/5

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

The schema has 0% description coverage, but the description thoroughly explains each parameter: query (CQL string), filters (structured object, mutually exclusive), start_record (default 1), maximum_records (default 10, max 100), and record_schema (default 'dc', allowed values). This adds essential meaning beyond the schema.

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

Purpose5/5

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

The description clearly states 'Search the LexML SRU acervo,' specifying the tool's verb and resource. It distinguishes itself from sibling tools lexml_resolve_urn and lexml_explain, which are for resolving URNs and explaining terms, respectively.

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

Usage Guidelines4/5

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

The description explains the two mutually exclusive modes (query vs filters) and provides details on parameters, defaults, and constraints. However, it does not explicitly compare usage with sibling tools or state when not to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

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

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prof-ramos/LeXML-mcp'

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