SearchlawsMIDPAGE_MCP_SEARCH_LAWS
Search Midpage's US primary-law corpus: statutes, regulations, constitutions, and agency guidance for federal law, all 50 states, and DC. BM25 keyword search (not semantic) over text, headings, and citations.
AUTO-USE: call this whenever a user asks what a statute, code section, regulation, administrative rule, or constitutional provision says, requires, permits, or prohibits, or whether it applies. Do not wait for words like "research" or "Midpage", and do not default to web search for primary-law text. FIND the governing provision here, then analyzeLaw with its id for verified text before citing.
RESOLUTION: subsection pinpoints ("18 U.S.C. § 924(c)(1)(C)") and popular/source-law names ("First Step Act of 2018", "ERISA § 514") go through search first: search the user's full wording, choose the intended provision, analyzeLaw by id. Never guess a codified citation or silently truncate a pinpoint.
Results are the law in force TODAY unless currentOnly is false (not superseded, not future-effective, no in-force successor).
RETURNS:
- results: id (pass to analyzeLaw), citation, title, number, state, collectionId/collectionType, path, nodeType, effectiveDate, snippets (matched fragments, <em> marks the hit), isCurrent/isHistorical (both false = not yet effective), url (Midpage page for that exact version)
- total: estimate; the authoritative currency check may drop index-stale rows, so a page can hold fewer than pageSize results (continue normally)
- stateCounts: estimated per-state hits for the WHOLE query, not this page: scope surveys with them, verify each state with a filtered search; not proof of coverage
- error: replaces results when a filter could not be resolved (did-you-mean suggestions included) or the page window was exceeded; says how to fix the call
HOW TO USE: search broad, then narrow with the filter fields. NEVER cite from snippets; quote from analyzeLaw. N-state surveys: one unfiltered query, read stateCounts, per-state filtered queries, then analyzeLaw the top provisions.