Skip to main content
Glama

Keyword full-text search

search_opinion_text
Read-onlyIdempotent

Keyword full-text search (BM25) over opinion body text in the local mirror. Keyword, not concept: matches the exact words given (case-insensitive) with no stemming ("petition" does not match "petitions"); all words must appear; "double quotes" mark an exact phrase. A case that states the concept in other words does not appear; search_by_concept covers that gap. Coverage (exact scan 2026-07-18): the best extracted text per record is searched; 8,751,062 records carry 500+ characters, 1,993,069 carry 1-499, and 1,798 have no text and cannot match. Returns opinion_id, cluster_id, rank (BM25), case metadata and a matched-text snippet with [hl]...[/hl] around hits. Case law in this mirror ends 2026-09-30 (exact scan of all 10,174,547 case records): a thin or empty result for recent authority means the collection ends there, not that no such case exists. Responses carry body_as_of, body_pending (state, exact count, read_at) and body_note, which say when the stored opinion text is older than the case records while a refresh is written; a count that could not be read makes an empty result inconclusive. A cold index may answer 503 briefly; the server retries once. Every response carries a "note" stating that response’s source and coverage limits.

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_opinion_text"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYeskeywords; all must appear, no stemming; "quotes" = exact phrase
courtNofilter to CourtListener court ids (e.g. ["scotus","ca10"]); OR within the list
limitNomax results, 1-20 (default 20)
date_filed_afterNoonly cases filed on/after this date (YYYY-MM-DD)
date_filed_beforeNoonly cases filed on/before this date (YYYY-MM-DD)
min_citation_countNominimum citation_count
precedential_statusNofilter by precedential status; OR within the list

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations cover the safety profile (readOnlyHint, idempotentHint, no destruction, closed-world mirror), and the description goes well beyond them: coverage counts per record, the 2026-09-30 collection end, 503 cold-index behavior with a single retry, and the body_as_of/body_pending/body_note freshness fields. These are the behaviors that determine whether a result set is trustworthy, and none of them are in the annotations.

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?

Front-loaded with the matching semantics and the sibling hand-off, which is the right order. It runs long and packs exact-scan counts and freshness details into dense clauses, some of which could be tightened, but almost every sentence carries operational value.

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 by naming the returned fields (opinion_id, cluster_id, BM25 rank, case metadata, [hl]-marked snippet) plus the per-response freshness and note fields. Together with the coverage and date-range caveats, an agent has everything needed to call it and interpret the results.

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 description coverage is 100%, including the q operator semantics, court id format, date patterns and limits, so the schema carries the parameter burden. The description restates the q semantics (no stemming, quoted phrase, all words required) but adds nothing about court, date, citation-count or precedential filters. Baseline 3 is appropriate.

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 ('Keyword full-text search (BM25) over opinion body text in the local mirror') and immediately distinguishes itself from the named sibling search_by_concept. The exact-match semantics are spelled out with examples ('petition' does not match 'petitions'), so an agent knows precisely what it is calling.

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 says when to use it (exact keywords, phrase matching) and when not to ('A case that states the concept in other words does not appear; search_by_concept covers that gap'). It also warns about the thin-result trap near the collection end date, which prevents a common misuse of the results.

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