Skip to main content
Glama

List Bills

list_bills
Read-onlyIdempotent

Bills (proyectos de ley) — list, search, or fetch one by id, in a single tool. Authoritative, primary-source data sourced directly from each congress's official docket system, refreshed daily. Use it for 'reforma pensional Colombia trámite actual' type questions.

Counting? A list without q reports meta.total — every bill matching the filters, not just this page — so '¿cuántos proyectos se radicaron en 2025 en Brasil?' is one call with since/until and limit=1. It is null when you pass q (a relevance search returns a top-K, not a filtered set) and on pages after the first, where the total from page 1 still holds.

No id (default): paginated list, newest filing date first, across country_code (comma-separated, e.g. BR,CO; omit for every accessible country — or, logged in via OAuth, your own default country). Filter by commission_id, party_id (use list_parties to discover IDs — matches if any active author currently belongs to that party, e.g. 'proyectos de la bancada de Centro Democrático' without iterating every one of that party's legislators through list_actors first), or a since/until date range. Every row carries authors and latest_state, so 'who filed the most bills' and 'what did one chamber approve that the other still has' are answerable from the list itself — no per-bill round-trip. ⚠️ Author coverage varies sharply: ~91% of Colombian and Peruvian bills have one, but only ~28% in Brazil, Chile and Rep. Dominicana and 0% in Venezuela, so an empty authors is usually a gap rather than a bill with no author.

Have the bill's number? Use code, not q — e.g. code="24509", code="045/2026C", code="05989-2024-2028-CD". It matches the official expediente in congress_records[].code, as a substring or number-for-number with leading zeros ignored. Numbers are not part of the title, so putting one in q doesn't just fail to help — it actively breaks the search.

Only know the topic? Use q — tries the hybrid/semantic engine first (matches by meaning), falls back to a title match where every token must appear, in any order. Semantic hits carry rerank, the cross-encoder's verdict: cite by it, and treat a negative one as rejected. relevance is the raw cosine and does not separate good hits from bad. Use actor_id to get bills authored by one legislator instead (ignores commission_id/q/since/until — the underlying query has no date/commission facet on authored bills).

With id: ignores every other filter and returns a full overview in one call — bill detail (title, type, source, congress_records) + up to 200 tramitaciones (legislative updates, ordered) + vote_summary (every vote counted per tramitación as for/against/abstained/absent, with the raw values) + a sample of up to 20 individual votes + up to 10 related interventions (small dataset today — see interventions_coverage when empty). Replaces the old get_bill + list_bill_updates + list_bill_votes + list_bill_interventions call sequence. For more than the capped 200 updates / 20 votes / 10 interventions on one bill, use list_bill_updates(bill_id=...) or list_votes(bill_id=...) / list_interventions(bill_id=...) directly.

Input Schema

NameRequiredDescriptionDefault
qNoSearch by topic or meaning, e.g. 'transición energética'. Do NOT put a bill number here — use `code`. Semantic first, then a title match requiring every token in any order.
idNoA bill's own id. Set it to get that one bill's full overview (detail + tramitaciones + votes + interventions) and every other filter is ignored.
codeNoThe official congress code/expediente, e.g. '24509', '045/2026C', '05989-2024-2028-CD' — the same value returned in `congress_records[].code`. Matches as a substring or number-for-number with leading zeros ignored. Use this whenever you have a number.
limitNoRows per page (1-100, default 20). The response's `meta.has_more` and `meta.next_cursor` tell you whether there are more. `meta.total`, when it is not null, is the full count without paging; some lists return null rather than pay for a count. Raise the limit when you genuinely need a whole list in one call rather than the most relevant few.
sinceNoFiled on or after this date (YYYY-MM-DD). Filters filing_date, the date the bill was formally presented.
untilNoFiled on or before this date (YYYY-MM-DD).
cursorNoOpaque pagination cursor from a previous response's `meta.next_cursor`. Pass every other filter unchanged when paging. Only ever use a cursor this API handed you — never build one. With `q`, a cursor continues the keyword listing (`meta.mode: "keyword_fallback"`): relevance-ranked results are a single page of at most 20 rows and report `has_more: false`, so if you got one there is no next page to ask for, and a `limit` above 20 adds nothing to it. Narrow `q` instead of paging.
actor_idNoBills authored by this legislator. Ignores commission_id/q/since/until — the underlying query has no date or commission facet on authored bills.
party_idNoBills with at least one active author currently in this party (list_parties to discover IDs). It's the author's party, not the bill's, so a bill co-authored across parties matches any of them.
min_rerankNoCross-encoder floor for the semantic branch of `q`. Rows the reranker scores below this are dropped; if that empties the result, what was rejected comes back under `empty_result.near_misses` so you can see what the index does hold. Pass null to disable the filter entirely.
country_codeNoISO alpha-2 country codes, comma-separated or as a list: 'BR,CO' or ['BR','CO']. Pass 'all' for every country you can access. Omitting it is NOT the same as 'all': logged in via OAuth it falls back to your own default country, and the response says so in `meta.country_scope`.
commission_idNoCommission the bill has passed through (list_commissions to discover IDs). Structural, not time-scoped — it does not tell you what a commission decided this week; use list_bill_updates for that.
min_similarityNoCosine-similarity floor for the semantic branch of `q` (0-1). A coarse filter only: measured on production, 58% of the rows that clear it are then rejected by the cross-encoder, and the two score ranges overlap almost completely — `min_rerank` is the parameter that actually discriminates. Lower this to widen a search that came back empty.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations (readOnly/idempotent/non-destructive), which it does not contradict. It discloses non-obvious behavior: `meta.total` is null with `q` and on later pages, semantic hits carry `rerank` and negative rerank means rejected, `relevance` is raw cosine and does not discriminate, caps of 200 tramitaciones / 20 votes / 10 interventions, country_code omission falling back to the OAuth default rather than 'all', and author-coverage gaps (91% CO/PE vs 28% BR/CL/DO, 0% VE) so an empty `authors` isn't misread.

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?

Long, but justified by 13 parameters and three distinct modes, and it is strongly front-loaded with bold section headers that let an agent jump to the relevant branch. Some passages duplicate the schema descriptions nearly verbatim (q/code guidance, cursor rules), which is the main slack in an otherwise dense, well-organized text.

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 13-parameter, three-mode, cross-country tool it covers what an agent needs to call correctly: mode selection, filter interactions, pagination, count semantics, empty-result interpretation, and where to go when caps are exceeded. Return-value explanations are a bonus rather than a gap, since an output schema exists and the annotations already carry the safety profile.

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% and the per-parameter descriptions are already detailed, so much of the prose (code vs q, party_id semantics, cursor handling) restates structured data. It still adds practical semantics the schema does not carry as crisply — e.g. that a bill number in `q` 'actively breaks the search', that `min_similarity` is a coarse filter while `min_rerank` is what discriminates, and the counting recipe using `since`/`until` with `limit=1`.

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 opening sentence gives a specific verb set and resource ('list, search, or fetch one by id') plus the data provenance ('official docket system, refreshed daily'). It then disambiguates its three modes with headers ('No `id`', 'Only know the topic?', 'With `id`'), so an agent can pick the branch without opening the schema, and it explicitly names the siblings it supersedes (get_bill + list_bill_updates + list_bill_votes + list_bill_interventions).

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

Usage Guidelines5/5

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

Explicit routing rules for every access pattern: topic → `q`, known number → `code` (not `q`), one bill → `id`, one legislator → `actor_id`, more than the caps → list_bill_updates/list_votes/list_interventions. It also states exclusions (actor_id ignores commission_id/q/since/until) and the party_id discovery path via list_parties.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources