Skip to main content
Glama

Federal Register

get_facet_counts

Read-only

Get document counts grouped by type, agency, topic, or time period.

Accepts the same filter conditions as search_documents. Returns
aggregated counts without individual document results.

Facets: type, agency, topic (categorical) plus daily, weekly, monthly,
quarterly, yearly (publication-date buckets, useful for trend lines).

Useful for understanding the volume of rulemaking by agency, type, or
over time within a date range before drilling into specific documents.

presidential_document_type (executive_order, proclamation, memorandum,
determination, notice, presidential_order, other) narrows to one kind
of presidential document, e.g. executive orders per month.

At least one filter (agencies, doc_types, term, pub_date_gte/lte, or
cfr_title) is required. An unfiltered facet query returns the entire
all-time aggregate.

FAR Council counts: facets cannot express "filed by DoD AND GSA AND
NASA", and no single agency slug covers FAR documents (OFPP only from
about mid-2025; 'federal-acquisition-regulation-system' holds 2 documents
ever). Count FAR rules with search_documents(far_council=True,
doc_types=[...], pub_date_gte/lte=...) and read its count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termNo
facetYes
agenciesNo
cfr_partNo
cfr_titleNo
doc_typesNo
pub_date_gteNo
pub_date_lteNo
presidential_document_typeNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

The description goes far beyond the basic safety hints (readOnlyHint: true). It specifies the nature of the returned data (aggregated counts vs. individual results), explains the functional difference between the various date buckets (e.g., 'useful for trend lines'), and warns about complex operational constraints like the FAR Council filtering limitations.

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 information is logically structured, moving from general purpose to specific usage rules and then to detailed constraints. However, its considerable length means some details are dense, making a perfect score challenging, though highly efficient overall.

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?

The definition is exceptionally complete. It outlines the required input filters, details the possible aggregation dimensions (facets), explains the output format (counts only), and provides critical system-level constraints (FAR Council limitations), leaving no ambiguity for the agent.

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

Parameters5/5

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

With 0% schema description coverage, the description must compensate fully. It excellently explains the functional meaning of the `facet` enum options (e.g., daily, weekly, monthly for trend lines) and defines complex parameter groups, such as the constraints surrounding `presidential_document_type` and the FAR Council limitations.

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 clearly states the purpose: 'Get document counts grouped by type, agency, topic, or time period.' It immediately distinguishes itself by stating it 'Returns aggregated counts without individual document results,' differentiating it from tools like search_documents.

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?

The description provides explicit guidance on when to use the tool ('Useful for understanding the volume... before drilling into specific documents') and defines critical mandatory behavior ('At least one filter... is required. An unfiltered facet query returns the entire all-time aggregate').

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.