Skip to main content
Glama

Openfec Search Legal

openfec_search_legal
Read-onlyIdempotent

Search FEC legal documents: advisory opinions, enforcement cases (MURs), alternative dispute resolutions, and administrative fines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeNoDocument type filter. Omit to search all types. admin_fines is slow without a query or respondent filter.
queryNoFull-text search across legal documents.
from_hitNoOffset for pagination (0-indexed), counted within each document type rather than across them. Default 0. The search index serves a 10,000-result window, so from_hit plus hits_returned must be 10,000 or less — the ceiling here assumes hits_returned of 1.
max_dateNoLatest date (YYYY-MM-DD) for the date_kind selected. Requires type and date_kind.
min_dateNoEarliest date (YYYY-MM-DD) for the date_kind selected. Requires type and date_kind.
ao_numberNoSpecific advisory opinion number (e.g. "2024-01").
date_kindNoWhich date min_date/max_date bound. Each document type records its own dates, so this must be one the chosen type has: type=advisory_opinions → issue_date (opinion issued), request_date (request received), document_date; type=murs or adrs → open_date (case opened), close_date (case closed), document_date; type=admin_fines → rtb_date (reason-to-believe finding), fd_date (final determination). type=statutes cannot be date-filtered. Required whenever min_date or max_date is given, together with type.
respondentNoRespondent name (enforcement cases).
case_numberNoSpecific MUR or ADR case number.
hits_returnedNoResults per page, applied per document type. Default 20, max 200. Bounded together with from_hit by the 10,000-result window.
max_penalty_amountNoMaximum penalty amount in dollars. Filters enforcement cases (murs, adrs) only — other document types are returned unfiltered by it.
min_penalty_amountNoMinimum penalty amount in dollars. Filters enforcement cases (murs, adrs) only — other document types are returned unfiltered by it.
statutory_citationNoU.S.C. citation (e.g. "52 U.S.C. 30106").
regulatory_citationNoCFR citation (e.g. "11 CFR 112.4").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoGuidance when the response carries no legal documents: how to broaden a search that matched nothing, or that from_hit ran past the end when documents did match.
resultsNoLegal document result set spanning advisory opinions, MURs, ADRs, admin fines, and statutes.
totalCountNoTotal matching legal documents across all types.
total_countNoTotal matching documents across all types.
retrievalHintNoHow to recover the material trimmed out of these results. Present whenever any result was returned, because every result is trimmed.
search_criteriaNoEcho of the search filters this call applied, as the server parsed them, minus paging arguments. Always present — compare it against what you sent to confirm every filter was honoured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / from_hit / description
      Previous value: -"Offset for pagination (0-indexed). Default 0."New value: +"Offset for pagination (0-indexed), counted within each document type rather than across them. Default 0. The search index serves a 10,000-result window, so from_hit plus hits_returned must be 10,000 or less — the ceiling here assumes hits_returned of 1."
    • changedInput schema / properties / from_hit / maximum
      Previous value: -9007199254740991New value: +9999
    • changedInput schema / properties / hits_returned / description
      Previous value: -"Results per page. Default 20, max 200."New value: +"Results per page, applied per document type. Default 20, max 200. Bounded together with from_hit by the 10,000-result window."
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_filter`: Called without any scoping filter at all. `date_filter_incomplete`: min_date or max_date given without both a type and a date_kind, or a date_kind given with neither bound. `date_kind_not_valid_for_type`: The requested date_kind is not a date this document type records. Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_filter`: Called without any scoping filter at all. `date_filter_incomplete`: min_date or max_date given without both a type and a date_kind, or a date_kind given with neither bound. `date_kind_not_valid_for_type`: The requested date_kind is not a date this document type records. `legal_window_exceeded`: from_hit plus hits_returned exceeds the 10,000-result window the search index serves. Other values are possible when a failure originates below the handler."
    • changedOutput schema / properties / error / properties / data / properties / reason / examples
      Previous value: -[
      -  "missing_filter",
      -  "date_filter_incomplete",
      -  "date_kind_not_valid_for_type"
      -]New value: +[
      +  "missing_filter",
      +  "date_filter_incomplete",
      +  "date_kind_not_valid_for_type",
      +  "legal_window_exceeded"
      +]
    • changedOutput schema / properties / notice / description
      Previous value: -"Guidance when no legal documents matched — echoes filters and suggests how to broaden."New value: +"Guidance when the response carries no legal documents: how to broaden a search that matched nothing, or that from_hit ran past the end when documents did match."
  2. Changed1 schema field changed
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"Machine-readable failure mode. Declared by this tool: `missing_filter`: Called without any scoping filter at all `date_filter_incomplete`: min_date or max_date given without both a type and a date_kind, or a date_kind given with neither bound `date_kind_not_valid_for_type`: The requested date_kind is not a date this document type records Other values are possible when a failure originates below the handler."New value: +"Machine-readable failure mode. Declared by this tool: `missing_filter`: Called without any scoping filter at all. `date_filter_incomplete`: min_date or max_date given without both a type and a date_kind, or a date_kind given with neither bound. `date_kind_not_valid_for_type`: The requested date_kind is not a date this document type records. Other values are possible when a failure originates below the handler."
  3. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "results",
      +      "total_count",
      +      "search_criteria",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `missing_filter`: Called without any scoping filter at all `date_filter_incomplete`: min_date or max_date given without both a type and a date_kind, or a date_kind given with neither bound `date_kind_not_valid_for_type`: The requested date_kind is not a date this document type records Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "missing_filter",
      +            "date_filter_incomplete",
      +            "date_kind_not_valid_for_type"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "results",
      -  "total_count",
      -  "search_criteria",
      -  "totalCount"
      -]
  4. Changed2 schema fields changed
    • changedOutput schema / properties / results / items / description
      Previous value: -"Legal document record. The document_type field discriminates among advisory_opinion, mur, adr, admin_fine, and statute. Common fields include ao_no/case_no/no (identifier), name, document_type, document_count, and document_categories summarizing the related filings."New value: +"Legal document record. The document_type field discriminates among advisory_opinion, mur, adr, admin_fine, and statute. Common fields include no (the identifier every type carries, and the one openfec_get_legal_document takes; advisory opinions repeat it as ao_no), name, document_type, document_count, and document_categories summarizing the related filings."
    • addedOutput schema / properties / retrievalHint
      Added value: +{
      +  "description": "How to recover the material trimmed out of these results. Present whenever any result was returned, because every result is trimmed.",
      +  "type": "string"
      +}
  5. Changed2 schema fields changed
    • changedOutput schema / properties / search_criteria / description
      Previous value: -"Echo of the search filters that produced this result set. Populated when results are empty to help diagnose why nothing matched."New value: +"Echo of the search filters this call applied, as the server parsed them, minus paging arguments. Always present — compare it against what you sent to confirm every filter was honoured."
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "total_count",
      -  "totalCount"
      -]New value: +[
      +  "results",
      +  "total_count",
      +  "search_criteria",
      +  "totalCount"
      +]
  6. Changed5 schema fields changed
    • addedInput schema / properties / date_kind
      Added value: +{
      +  "description": "Which date min_date/max_date bound. Each document type records its own dates, so this must be one the chosen type has: type=advisory_opinions → issue_date (opinion issued), request_date (request received), document_date; type=murs or adrs → open_date (case opened), close_date (case closed), document_date; type=admin_fines → rtb_date (reason-to-believe finding), fd_date (final determination). type=statutes cannot be date-filtered. Required whenever min_date or max_date is given, together with type.",
      +  "enum": [
      +    "issue_date",
      +    "request_date",
      +    "open_date",
      +    "close_date",
      +    "document_date",
      +    "rtb_date",
      +    "fd_date"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / max_date / description
      Previous value: -"Latest document date (YYYY-MM-DD)."New value: +"Latest date (YYYY-MM-DD) for the date_kind selected. Requires type and date_kind."
    • changedInput schema / properties / max_penalty_amount / description
      Previous value: -"Maximum penalty amount."New value: +"Maximum penalty amount in dollars. Filters enforcement cases (murs, adrs) only — other document types are returned unfiltered by it."
    • changedInput schema / properties / min_date / description
      Previous value: -"Earliest document date (YYYY-MM-DD)."New value: +"Earliest date (YYYY-MM-DD) for the date_kind selected. Requires type and date_kind."
    • changedInput schema / properties / min_penalty_amount / description
      Previous value: -"Minimum penalty amount (enforcement cases)."New value: +"Minimum penalty amount in dollars. Filters enforcement cases (murs, adrs) only — other document types are returned unfiltered by it."
  7. Changed2 schema fields changed
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total matching legal documents across all types.",
      +  "type": "number"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "results",
      -  "total_count"
      -]New value: +[
      +  "results",
      +  "total_count",
      +  "totalCount"
      +]
  8. Changed1 schema field changed
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when no legal documents matched — echoes filters and suggests how to broaden.",
      +  "type": "string"
      +}
  9. Changed2 schema fields changed
    • changedOutput schema / properties / results / description
      Previous value: -"Legal documents with a document_type discriminator (advisory_opinion, mur, adr, admin_fine, statute)."New value: +"Legal document result set spanning advisory opinions, MURs, ADRs, admin fines, and statutes."
    • changedOutput schema / properties / results / items / description
      Previous value: -"A legal document record with a document_type discriminator (advisory_opinion, mur, adr, admin_fine, statute)."New value: +"Legal document record. The document_type field discriminates among advisory_opinion, mur, adr, admin_fine, and statute. Common fields include ao_no/case_no/no (identifier), name, document_type, document_count, and document_categories summarizing the related filings."
  10. Changed1 schema field changed
    • addedOutput schema / properties / results / items / description
      Added value: +"A legal document record with a document_type discriminator (advisory_opinion, mur, adr, admin_fine, statute)."
  11. Changed4 schema fields changed
    • addedOutput schema / properties / results / items / properties
      Added value: +{}
    • removedOutput schema / properties / results / items / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / search_criteria / properties
      Added value: +{}
    • removedOutput schema / properties / search_criteria / propertyNames
      Removed value: -{
      -  "type": "string"
      -}
  12. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations declare readOnlyHint and idempotentHint, so the agent knows this is a safe read operation. The description doesn't contradict these. The description adds context about the scope of the search (covering specific document types) and notes that admin_fines is slow without a query or respondent filter (within the schema, but still beyond the annotations). It could have mentioned the 10,000-result window, but that is in the schema. Given the strong annotations, the description does add value by clarifying what it searches, and it doesn't need to reiterate safety.

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

Conciseness5/5

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

The description is a single, concise sentence that fully captures the tool's purpose. It is front-loaded with the core function ('Search FEC legal documents') and immediately lists the types, making it scannable for an agent. No wasted words. It could have been longer, but it is appropriately minimal for a search tool with extensive schema documentation.

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?

Given the 14 parameters, 2 enums, and the presence of an output schema, the description is complete enough. The schema covers parameter semantics, defaults, and constraints. The description clarifies the tool's scope and the existing annotations cover safety. The agent has all necessary information to call the tool correctly, including pagination limits and date-kind rules from the schema. There are no significant gaps.

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%, so the schema already thoroughly documents all 14 parameters, including enums, defaults, and constraints. The description itself does not add much beyond the schema, but it doesn't need to because the schema is rich. The description's mention of document types is already captured in the type enum. Therefore, baseline 3 is appropriate; the schema does the heavy lifting.

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 states a specific verb ('Search') and a clear resource ('FEC legal documents'), and enumerates the document types covered (advisory opinions, MURs, ADRs, administrative fines). This distinguishes it from sibling tools like openfec_get_legal_document, which is about retrieving a specific document, not searching across types. The description is precise and immediately tells the agent what this tool does.

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 clearly establishes the context: searching legal documents. It implies this is the tool to use when you need to find legal documents by various filters. It does not explicitly state when not to use it or mention alternatives, but the sibling list includes openfec_get_legal_document, which is clearly a different operation. The schema's parameter descriptions add usage guidance (e.g., date_kind requirements), but the main description could be a bit more explicit about when to choose this over other search tools.

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.