Skip to main content
Glama

Concept (semantic) search

search_by_concept
Read-onlyIdempotent

Semantic (vector) search over embedded opinion chunks: finds cases by concept or plain-language description when there is no fixed term of art. Returns one row per case: opinion_id, cluster_id, metadata, matched_chunk, distance, similarity, matched_text (the passage the case matched on) and matched_text_status; same_case_other_opinions counts other opinions of the same case, and duplicate_records names a second record holding identical text. Limits: ranking covers only a partial embedded subset of the 10,903,917 opinion records (coverage_note gives it), so relevant authority that is not embedded does not appear; similarity is a relevance signal only, not treatment, validity or "good law"; matched_text is re-derived from the opinion text and present only when that reconstruction agrees with the stored chunk count (about 90% of opinions), otherwise null with matched_text_status giving the reason. A matched_text marks where the match happened, not a holding. 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. Degraded state: the route depends on an embedding service that may be down; it then returns a 503 error carrying coverage_note, which means concept search is unavailable, not that nothing matched (search_opinion_text is a separate route). Every response carries a "note" and a coverage_note. The describe_sources tool returns this tool’s full coverage statement.

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

Input Schema

NameRequiredDescriptionDefault
qYesa concept or plain-language description of the legal issue
limitNomax results, 1-20 (default 20)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive, openWorld=false), and the description adds substantial behavior beyond them: partial embedded coverage, similarity-is-not-validity caveat, matched_text re-derivation succeeding ~90% of the time with a status field otherwise, and the 2026-09-30 corpus cutoff. The only gap is that it never says whether the embedding route is rate-limited or slow, and the coverage percentage itself is delegated to coverage_note/describe_sources rather than stated, which is a deliberate but real deferral.

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 purpose and the return row shape, and nearly every sentence carries load — the field list, the matched_text status caveat, the corpus cutoff, and the degraded-state rule all matter given no output schema. It is delivered as a single dense paragraph without breaks, which makes the distinct caveats harder to scan than they need to be.

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?

With no output schema, the description carries the return shape itself (listing every field including matched_text_status, same_case_other_opinions, duplicate_records) and pairs it with the three things an agent could otherwise misread: partial coverage, similarity vs. validity, and the corpus end date. Nothing needed to interpret an empty or thin result 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 100% and there are only two parameters, both documented in the schema, so the baseline is 3. The description's framing of q as a concept or plain-language description where no term of art exists adds a little interpretive guidance, but limit is never mentioned and no query-phrasing or length constraints are reinforced.

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: semantic (vector) search over embedded opinion chunks, and explicitly scopes it to the case where there is 'no fixed term of art', which distinguishes it from keyword routes. It also names search_opinion_text as a separate route, so an agent can pick between them without opening either 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?

Gives explicit when-to-use (concept or plain-language description, no known term of art) and an alternative route for the term-matching case. It also gives an operational decision rule for the degraded case: a 503 with coverage_note means search is unavailable, not that nothing matched.

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