Skip to main content
Glama

search_legislation

Search FULL BILL TEXT -- not just known-bill-number lookup. q is matched against titles, descriptions, AND ingested document text via Postgres websearch_to_tsquery (supports "quoted phrases", OR, and -exclusion, same syntax as a search engine), with a fuzzy pg_trgm title-similarity fallback when the exact query has no hits. q can ALSO be a bill number ("HB 123", "H.B. 123", "hb123" all match) and that fast path is tried first. Optionally filter by jurisdiction (two-letter state code or name), chamber, and status.

For a curated cross-state slice of a subject (e.g. "every AI bill in the
country") rather than an ad-hoc keyword search, call list_topics first --
its membership rules also match on structured subject tags this
full-text search does not see.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
limitNo
statusNo
chamberNo
jurisdictionNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so richly: it discloses query syntax (websearch_to_tsquery), quoted phrases/OR/-exclusion, fuzzy title fallback, bill-number fast path, and optional filters. It also reveals the limitation that structured subject tags are not searched, which is valuable behavioral context.

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 front-loaded with the core purpose, then logically expands into query syntax, fallback behavior, bill-number handling, filters, and alternative tool guidance. Every sentence adds meaningful information without filler.

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 query semantics, filtering, fallback behavior, and alternative tool usage, which is strong for a search tool. It lacks explicit mention of return format or pagination/limit behavior, and with no output schema or annotations this is a minor but real gap.

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?

The q parameter is heavily documented: accepted forms include bill numbers, phrases, operators, and fallback behavior. Jurisdiction gets format guidance (state code or name). However, the remaining params (limit, chamber, status) are only named without value enumerations or additional semantics, leaving some compensation gaps given 0% schema coverage.

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 the tool searches full bill text, explicitly distinguishing it from known-bill-number lookup and sibling tools like get_bill_record. It also highlights the bill-number fast path and optional filters, making its scope unambiguous.

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?

It provides explicit when-to-use guidance: use for ad-hoc keyword searches, and for curated cross-state topics call list_topics first. It also contrasts with known-bill-number lookup, giving clear context for choosing this tool over alternatives.

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.