Skip to main content
Glama

search_cfr

Read-only

Search the Code of Federal Regulations for current or historical text. By default, returns only in-effect sections; filter by agency, date, or hierarchy to narrow results.

Instructions

Full-text search across the Code of Federal Regulations.

Returns matching sections with excerpts, headings, scores, and hierarchy.

CRITICAL: Set current_only=True (default) to search only in-effect text. Without it, search returns ALL historical versions including superseded, so a section amended 5 times appears 5 times.

Search caps at 10,000 total results. Use hierarchy filters (title, chapter, part) to narrow if you hit the cap.

order controls result ordering: 'relevance' (default), 'newest_first', 'oldest_first', 'hierarchy', or 'citations'.

agency_slugs filters to one or more agencies (single slug string or a list, e.g. 'defense-acquisition-regulations-system'). Use list_agencies() to find slugs.

last_modified_after/before use YYYY-MM-DD format and filter by the date sections were last amended. Useful for finding recent regulatory changes.

per_page accepts 1 to 5000 (default 20); paginate with page for more.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
partNo
orderNo
queryYes
titleNo
chapterNo
sectionNo
subpartNo
per_pageNo
agency_slugsNo
current_onlyNo
last_modified_afterNo
last_modified_beforeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.0.7
    • addedInput schema / properties / agency_slugs
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Agency Slugs"
      +}
    • addedInput schema / properties / chapter / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / order
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Order"
      +}
    • addedInput schema / properties / part / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / section / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / subpart / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observedv0.2.6

TDQS

A4.6/5.0
Behavior5/5

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

The description adds substantial behavioral context beyond the read-only annotations: the critical current_only behavior and historical-version duplication, the 10,000-result cap, the meaning of each order option, and how agency_slugs and date filters behave. This is exactly the kind of non-obvious tool behavior an agent needs to invoke it safely and correctly.

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?

The description is long but information-dense, front-loading the core purpose and return format before the critical current_only warning and parameter details. A few points duplicate schema defaults, such as current_only defaulting to true and per_page defaulting to 20, but the redundancy is minor given the importance and the lack of schema-level descriptions.

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 search tool with 13 parameters and no schema descriptions, this description is complete: it covers the key edge cases (historical versions, result caps, ordering, agency slugs, date filtering, pagination), describes the return shape, and works with the read-only annotations and output schema to give an agent everything needed to call it correctly.

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?

Schema description coverage is 0%, so the description must carry the burden of parameter documentation, and it largely does. It explains order values, current_only, agency_slugs format, last_modified date format, per_page range, pagination via page, and hierarchy narrowing via title/chapter/part. Section and subpart parameters are not explicitly described, but their names and the hierarchy context make them understandable.

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?

The description opens with a specific action and resource: 'Full-text search across the Code of Federal Regulations.' It also states what is returned — matching sections with excerpts, headings, scores, and hierarchy — which clearly distinguishes this from content-retrieval siblings like get_cfr_content and list_sections_in_part.

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?

The description gives detailed, practical guidance for when to adjust parameters: use current_only to avoid historical duplicates, use hierarchy filters when hitting the 10,000 cap, and use last_modified dates for finding recent regulatory changes. It does not explicitly contrast this tool with alternative search/lookup siblings, but the context for using parameters is clear and actionable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.