Keyword search over statute text
search_statute_textKeyword (BM25) search over the body text of statute sections and, in the default source, Kansas administrative regulations, in the same snapshot as the get_statute tool; source= searches one regulation source alone. Without jurisdiction=, results mix states: on 6,852 benchmark housing-law questions run unconfined, the top-ranked section came from a state other than the asker’s in 97.7% of them. Each row carries its jurisdiction, corpus and as_of; statute and regulation rows can appear together. Rank is textual match strength only. Keyword, not concept, with no stemming: very common words are dropped, duplicates collapse, at most 40 words run, matched any-of, so a top hit may share one word with the query; terms_searched and terms_dropped report what ran, and "double quotes" require a phrase. Only the body is searched, not the heading. Scores drift in their last digits between restarts, so close rows can swap places. Returns metadata, a snippet with [hl]...[/hl] marks and a rank; the get_statute tool returns the full section. A section not returned is a miss, not an absence. ends_at_colon is flagged as in the get_statute tool. A missing keyword index returns a visible 503, not zero matches. Every response, including 400 and 503, carries "note" and "coverage_note". The describe_sources tool returns this tool’s full coverage statement and, per source code, its coverage and counts.
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": {
"q": "<q>"
},
"name": "search_statute_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | words to match in the statute section text. A full natural-language question is fine: common words are dropped and the rest matched ANY-OF, so more words widen the search rather than narrowing it. "double quotes" for a phrase that must appear together | |
| limit | No | max results, default 20, capped at 50 | |
| title | No | only with source=: narrows the search to one title, part or chapter of that source; the forms per source are given by describe_sources(tool="search_statute_text", source=<code>) | |
| source | No | omit for statutes and Kansas regulations; a regulation source code ("cfr" for federal, or a state code) searches that source alone; each code’s coverage is given by describe_sources(tool="search_statute_text", source=<code>) | |
| jurisdiction | No | restrict to one jurisdiction, e.g. "ks" or "us". STRONGLY preferred when the user’s state is known: without it results mix states |