Skip to main content
Glama
AshwinSundar

Congress[.]gov MCP Server

by AshwinSundar

get_committee_reports

Retrieve official committee reports from Congress.gov by specifying congress number, report type, and date range to access legislative documentation.

Instructions

Retrieve committee report information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/CommitteeReportEndpoint.md

Args: congress: Congress number (e.g., 118 for 118th Congress) report_type: Type of report - hrpt: House Report - srpt: Senate Report - erpt: Executive Report report_number: Specific report number offset: Starting record (default 0) limit: Maximum records to return (max 250, default 20) from_datetime: Start timestamp (YYYY-MM-DDTHH:MM:SSZ format) to_datetime: End timestamp (YYYY-MM-DDTHH:MM:SSZ format)

Returns: dict: Committee report data from Congress.gov API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
congressNo
from_datetimeNo
limitNo
offsetNo
report_numberNo
report_typeNo
to_datetimeNo

Implementation Reference

  • The complete implementation of the get_committee_reports tool, including registration via @mcp.tool(), input parameters defining the schema, and the logic to fetch committee reports from the Congress.gov API.
    @mcp.tool() async def get_committee_reports( congress: int | None = None, report_type: str | None = None, report_number: int | None = None, offset: int = 0, limit: int = 20, from_datetime: str | None = None, to_datetime: str | None = None ) -> dict: """ Retrieve committee report information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/CommitteeReportEndpoint.md Args: congress: Congress number (e.g., 118 for 118th Congress) report_type: Type of report - hrpt: House Report - srpt: Senate Report - erpt: Executive Report report_number: Specific report number offset: Starting record (default 0) limit: Maximum records to return (max 250, default 20) from_datetime: Start timestamp (YYYY-MM-DDTHH:MM:SSZ format) to_datetime: End timestamp (YYYY-MM-DDTHH:MM:SSZ format) Returns: dict: Committee report data from Congress.gov API """ base_url = "https://api.congress.gov/v3/committee-report" url = base_url if congress: url += f"/{congress}" if report_type: url += f"/{report_type}" if report_number: url += f"/{report_number}" params = { "api_key": congress_gov_api_key, "format": "json", "offset": offset, "limit": min(limit, 250) # API max limit for committee reports } if from_datetime: params["fromDateTime"] = from_datetime if to_datetime: params["toDateTime"] = to_datetime try: response = requests.get(url, params=params) response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: return { "error": f"Failed to retrieve committee report information: {str(e)}", "status_code": getattr(e.response, "status_code", None) }
  • server.py:434-434 (registration)
    Decorator that registers the get_committee_reports function as an MCP tool using FastMCP.
    @mcp.tool()
  • Function signature with type hints and default values that define the input schema for the tool.
    async def get_committee_reports( congress: int | None = None, report_type: str | None = None, report_number: int | None = None, offset: int = 0, limit: int = 20, from_datetime: str | None = None, to_datetime: str | None = None

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AshwinSundar/congress_gov_mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server