Skip to main content
Glama

search_legislation

Read-onlyIdempotent

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.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare the safe read-only/idempotent profile, and the description adds genuine behavior: websearch_to_tsquery syntax, a fuzzy pg_trgm title-similarity fallback when exact matching yields nothing, and a bill-number fast path attempted first. It stops short of describing result shape or what limit does when omitted.

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?

Two tight paragraphs: capabilities and the routing rule. The distinguishing claim ('FULL BILL TEXT -- not just known-bill-number lookup') is front-loaded, and every sentence carries selection-relevant information despite the dense technical detail.

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?

For a five-parameter search tool with no output schema and no annotation detail on returns, the description covers matching semantics, fallback behavior, and the primary alternative well. The only real gap is the undocumented limit/result-count behavior and no hint at what a result row contains.

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 0%, so the description must compensate, and it does for q (phrase/OR/-exclusion syntax, three bill-number formats) plus jurisdiction (two-letter state code or name), chamber, and status. The limit parameter is never explained, leaving one of five parameters undocumented.

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+resource (full bill-text search) and immediately scopes it against the sibling it is not: known-bill-number lookup (get_bill_record). It also enumerates the searched fields (titles, descriptions, ingested document text), so an agent can distinguish it from every sibling without opening a schema.

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?

Explicitly routes the agent: use this for ad-hoc keyword search, but call list_topics first for a curated cross-state subject slice, with the reason given (subject tags this search can't see). It also states that a bill-number query is accepted and tried on a fast path, so the agent needn't avoid this tool for lookups.

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.