Skip to main content
Glama
AshwinSundar

Congress[.]gov MCP Server

by AshwinSundar

get_daily_congressional_record

Retrieve daily congressional record data from the official Congress.gov API to access legislative proceedings and activities.

Instructions

Retrieve daily congressional record information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/DailyCongressionalRecordEndpoint.md

Args: volume: Volume number issue: Issue identifier 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: Daily congressional record data from Congress.gov API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
volumeNo
issueNo
offsetNo
limitNo
from_datetimeNo
to_datetimeNo

Implementation Reference

  • The core handler function for the 'get_daily_congressional_record' MCP tool. It constructs the API URL for the Congress.gov daily-congressional-record endpoint, adds parameters based on inputs, makes a GET request using requests library, and returns the JSON response or an error dict. The @mcp.tool() decorator registers it as a tool.
    @mcp.tool()
    async def get_daily_congressional_record(
        volume: int | None = None,
        issue: str | None = None,
        offset: int = 0,
        limit: int = 20,
        from_datetime: str | None = None,
        to_datetime: str | None = None
    ) -> dict:
        """
        Retrieve daily congressional record information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/DailyCongressionalRecordEndpoint.md
    
        Args:
            volume: Volume number
            issue: Issue identifier
            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: Daily congressional record data from Congress.gov API
        """
        base_url = "https://api.congress.gov/v3/daily-congressional-record"
    
        url = base_url
        if volume:
            url += f"/{volume}"
            if issue:
                url += f"/{issue}"
    
        params = {
            "api_key": congress_gov_api_key,
            "format": "json",
            "offset": offset,
            "limit": min(limit, 250)
        }
    
        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 daily congressional record information: {str(e)}",
                "status_code": getattr(e.response, "status_code", None)
            }
  • server.py:735-735 (registration)
    The @mcp.tool() decorator registers the get_daily_congressional_record function with the FastMCP server instance 'mcp'.
    @mcp.tool()
  • Input schema defined by function parameters with type hints (volume, issue, offset, limit, from_datetime, to_datetime) and comprehensive docstring. Returns dict from API.
    async def get_daily_congressional_record(
        volume: int | None = None,
        issue: str | None = None,
        offset: int = 0,
        limit: int = 20,
        from_datetime: str | None = None,
        to_datetime: str | None = None
    ) -> dict:
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the API endpoint documentation link and some parameter defaults/constraints (limit max 250, default 20), but doesn't cover important behavioral aspects like rate limits, authentication requirements, error handling, pagination behavior, or what happens when parameters are omitted. For a tool with 6 parameters and no annotations, this leaves significant gaps in understanding how the tool behaves.

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 well-structured with clear sections (purpose, args, returns) and efficiently conveys necessary information. The API documentation link is appropriately placed. While slightly verbose due to listing all parameters, each sentence serves a clear purpose and the structure helps the agent parse the information effectively.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no annotations, no output schema), the description does a decent job but has notable gaps. It thoroughly documents parameters and states the return type, but lacks behavioral context (rate limits, auth, error handling) and doesn't explain the relationship to sibling tools. For a read-only API tool, this is minimally adequate but could be more complete.

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?

The description provides excellent parameter documentation despite 0% schema description coverage. It clearly explains all 6 parameters with their purposes, defaults, constraints (limit max 250), and format requirements (from_datetime/to_datetime format). This fully compensates for the lack of schema descriptions and gives the agent meaningful guidance on how to use each parameter effectively.

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?

The description clearly states the tool's purpose: 'Retrieve daily congressional record information from the Congress.gov API.' It specifies both the action ('retrieve') and the resource ('daily congressional record information'), making it easy to understand what the tool does. However, it doesn't explicitly differentiate this tool from its sibling 'get_congressional_record' or 'get_bound_congressional_record', which appear to be related tools for congressional records.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With multiple sibling tools related to congressional records (get_congressional_record, get_bound_congressional_record), there's no indication of how this 'daily' version differs or when it should be preferred. The description only states what the tool does, not when to use it.

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

Install Server

Other Tools

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