Skip to main content
Glama

Search a collection

search
Read-only

Search a collection (bills, domain, constitutions, statutes, regulations). For US bills or law: bills holds federal and state bills, domain holds the U.S. Code, C.F.R. and U.S. Constitution.

search_type for bills and domain. If you omit search_type on bills, the search uses KEYWORD when the query holds a bill number (HR1, S. 1234, HB 529), a number alone that is not a year (529), the word Act, or a quoted phrase, and max_distance is not set. Otherwise it uses HYBRID, so a topic with a number in it (529 plan, 401(k)) stays HYBRID. Without search_type on domain, the search uses KEYWORD when the query holds a printed citation (26 U.S.C. 501, 12 CFR 1026), a lone non-year number, the word Act, or a quoted phrase, and max_distance is not set. Otherwise HYBRID. HYBRID blends keyword and vector scores; on bills, if unavailable, retry KEYWORD. KEYWORD matches exact terms, citations and bill numbers. SIMILARITY is vector search for a concept with no fixed wording and takes tens of seconds. Constitutions, statutes and regulations serve SIMILARITY only.

filters is the list_items object (statutes and regulations: jurisdictionIsoCodes). totalCountIsLowerBound true means totalCount is a floor, not the whole match set. Bill and domain hits carry a match with score, source and excerpt. A domain hit's own excerpt appears only when it differs. cosineDistance is absent on keyword-only matches. Only enacted true (stage "Law") means the bill became law. include_links=True adds resource-link blocks, which cost more than the rows. limit max 100; pass nextOffset as after for the next page.

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": {
      "collection": "<collection>",
      "query": "<query>"
    },
    "name": "search"
  }
}

Input Schema

NameRequiredDescriptionDefault
afterNo
limitNo
queryYes
filtersNo
collectionYes
search_typeNo
max_distanceNo
include_linksNo
response_formatNoSelection-set size for get/list/search results.concise

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only declare readOnly/destructive/openWorld, and the description adds substantial behavior beyond that: SIMILARITY latency in tens of seconds, include_links costing more than the rows, totalCountIsLowerBound semantics, cosineDistance absence on keyword-only matches, 'only enacted true means the bill became law', and pagination via nextOffset/after. These are exactly the operational details an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded and nothing is padding, but the near-verbatim parallel paragraphs for bills and domain defaults are repetitive and the sentences are long and run-on, making the default-resolution rules harder to scan than necessary. A tabular or condensed phrasing would convey the same rules in less space.

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?

For a 9-parameter, no-output-schema tool, the description covers the decision logic (search_type defaults), the return shape (match with score/source/excerpt, cosineDistance), the enacted caveat, cost tradeoffs, and pagination. Almost nothing an agent needs to invoke it correctly is missing.

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

Parameters4/5

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

With only 11% schema description coverage, the description carries most of the burden and largely succeeds: collection values are enumerated with semantics, filters is tied to the list_items object with jurisdictionIsoCodes noted, max_distance's interaction with default search_type is described, and limit/after behavior is spelled out. Gaps remain: max_distance's own meaning and the response_format enum are not explained in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Search a collection') and immediately enumerates the valid collections (bills, domain, constitutions, statutes, regulations), clarifying that 'domain' means U.S. Code/C.F.R./Constitution. It does not explicitly differentiate itself from siblings like list_items or find, so an agent must infer that this is the full-text/vector search entry point.

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 unusually detailed when-to-use guidance for search_type: exact conditions where KEYWORD is the default on bills and domain, when HYBRID applies, when to retry KEYWORD if HYBRID is unavailable, and that SIMILARITY is for concepts with no fixed wording (tens of seconds). It also notes constitutions/statutes/regulations serve SIMILARITY only. It gives no guidance on choosing this tool over list_items or find, which is the main gap.

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