Skip to main content
Glama

okfindex

Search legislation

search_legislation
Read-onlyIdempotent

Search Brazilian federal laws by number/year or full-text words. Filter by type, year and issuing body (authority). Results preserve source attribution. Follow next; do not infer current legal validity. Full-text search covers title, description and body. Number/year uses an exact indexed lookup. Source metadata is not a verification of legal currency. No state or municipal laws in this collection.

Input Schema

NameRequiredDescriptionDefault
qNoNumber/year, such as 10406/2002, or words. At most 160 characters. LGPD, CDC and Código Civil aliases are supported.
typeNoconstituicao, leis-ordinarias, leis-complementares, leis-delegadas or decretos-lei.
yearNoYear, from 1800 to 2099.
afterNoCursor from next. Do not generate a cursor.
authorityNoIssuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / authority
      Added value: +{
      +  "description": "Issuing body declared by the source: congresso-nacional, presidencia-da-republica or unknown. The provider is separate.",
      +  "enum": [
      +    "congresso-nacional",
      +    "presidencia-da-republica",
      +    "unknown"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint/destructiveHint=false, so the safety profile is covered. The description adds real behavioral context beyond that: results preserve source attribution, pagination flows through 'next', and the legal-validity disclaimer ('do not infer current legal validity', 'source metadata is not a verification of legal currency'). Auth/rate-limit behavior is unstated but likely unnecessary here.

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

Conciseness3/5

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

The purpose is front-loaded and sentences are short, but the legal-currency caveat is stated twice ('do not infer current legal validity' and 'source metadata is not a verification of legal currency'), and the collection-scope caveat trails at the end. Tightening the redundant validity warning would make every sentence earn its place.

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?

With no output schema, the description carries the burden and does cover pagination ('follow next'), result attribution, and collection boundaries. It does not sketch the shape of a returned result (fields returned per hit), which would help an agent consume the response, but nothing essential for correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 100% so baseline is 3, but the description adds semantics the schema does not: 'q' has two distinct behaviors (exact indexed number/year lookup vs. full-text across title, description and body), and it clarifies that authority is the issuing body while the provider is separate. That is genuine added meaning over the field descriptions.

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?

States a specific verb and resource (search Brazilian federal laws) plus the two supported lookup modes (number/year exact lookup vs. full-text words), which immediately distinguishes it from siblings like get_legislation and search_bundles. It also scopes the collection explicitly ('federal', 'no state or municipal laws').

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?

Gives clear usage context: filter by type/year/authority, follow the cursor via 'next', and a notable exclusion (no state or municipal legislation in this collection). It stops short of naming an alternative tool for retrieval of a specific law (e.g., get_legislation) when the user already has an identifier, so it is clear but not fully comparative.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.