Skip to main content
Glama

okfindex

Get API X402 legislation

get_api_x402_legislation

Searches Brazilian federal laws for an agent, paid per call: up to 20 items, with no account. The search of GET /api/legislation/search, sold per call to agents, with no account and no allowance before. A request without payment gets the 402 with the price; a paid one gets the items in the same response, with the payment in cobranca. Send at least one of q, type, year or authority. A refused search and an unavailable corpus are not charged. 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. Added

TDQS

A4.3/5.0
Behavior5/5

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

The description discloses billing and failure behavior in detail: an unpaid request gets a 402 with the price, a paid request includes items and payment in `cobranca`, and refused searches or unavailable corpora are not charged. It also states the 20-item limit and explains that source metadata is not a verification of legal currency. This adds substantial context beyond the annotations.

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

Conciseness4/5

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

The purpose is front-loaded and the description is generally efficient. There is some redundancy: the paid-per-call and no-account details are repeated across the first two sentences, which keeps it from being maximally concise.

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

Completeness5/5

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

For a paid search endpoint with no output schema, the definition covers what the tool does, how payment works, what triggers a charge, what is not charged, how results are returned, parameter constraints, and collection scope. An agent has enough information to call it correctly without additional documentation.

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 description coverage is already 100%, so the baseline is 3. The description adds meaningful constraints beyond the schema: at least one of `q`, `type`, `year`, or `authority` must be sent, full-text search covers title, description, and body, and number/year uses an exact indexed lookup.

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

Purpose4/5

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

The description names a specific verb and resource: it searches Brazilian federal laws, via `GET /api/legislation/search`, paid per call and with no account. It also scopes the collection to federal laws only. It does not explicitly differentiate this tool from siblings such as `search_legislation` or `get_legislation`, so it falls short of a 5.

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?

It gives clear operational context: paid per call, no account, no allowance, at least one of `q`, `type`, `year`, or `authority`, and no state or municipal laws. It does not explicitly say when to choose this over sibling search tools, so it is strong context rather than full when/when-not/alternatives guidance.

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.