Skip to main content
Glama

Search statutes

search_statutes
Read-only

Full-text search of a state's codified law (GET /v1/statutes/search). Use for 'what does the law say about X' and to find the section a bill or ballot measure changes. Returns matching sections with headings and excerpts; fetch the whole section with get_statute. Only states whose code is loaded resolve to section text (see list_statute_coverage); a link to a section we hold carries resolved:true and the text, otherwise just the citation as written.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "state": "<state>",
      "q": "<q>"
    },
    "name": "search_statutes"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYesWords to find in section headings and text.
codeNoRestrict to one code (code_key from list_statute_coverage), e.g. a California code.
limitNo
stateYes2-letter postal code (e.g. NJ), DC, GU, or US for the U.S. Code.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/openWorld/non-destructive, and the description adds substantive behavior beyond them: it discloses the response shape (matching sections with headings and excerpts), the partial-coverage limitation (only loaded states resolve to section text), and the resolved:true marker that signals whether full text is held. This is exactly the kind of outcome-predicting context an agent needs for a search call whose results can be silently empty of text.

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?

Four dense sentences, front-loaded with the purpose and use cases before the coverage caveat. Every sentence carries information, though the final coverage sentence is long and engages in some nesting ('a link to a section we hold carries resolved:true and the text, otherwise just the citation as written') that could be split for faster scanning.

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?

There is no output schema, and the description compensates fully by describing what is returned (sections, headings, excerpts) and how to detect resolved vs. unresolved results. For a four-parameter read-only search tool, nothing an agent needs to call it or interpret its output is missing.

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

Parameters3/5

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

Schema coverage is 75%, so most parameters are already documented in the schema (q, state, code all have descriptions). The description adds no extra meaning about query syntax, how to combine code with q, or what limit defaults to, so it does not exceed the baseline set by a well-covered schema.

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 — 'Full-text search of a state's codified law' — and even names the backing endpoint (GET /v1/statutes/search). It is immediately distinguishable from statute-adjacent siblings like get_statute (single-section fetch) and list_statute_coverage (coverage listing), and clearly separate from the bill-search siblings by resource.

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 two concrete use cases ('what does the law say about X' and locating the section a bill or ballot measure changes) and routes to get_statute for full text, which is explicit alternative guidance. It stops short of stating when NOT to use it — e.g. versus semantic_search_bills for bills, or keyword_search_bills — so it falls just short of a 5.

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