Skip to main content
Glama
AshwinSundar

Congress[.]gov MCP Server

by AshwinSundar

get_bound_congressional_record

Retrieve bound congressional record data from Congress.gov by specifying date ranges or specific dates to access official legislative proceedings and debates.

Instructions

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

Args: year: Year month: Month (1-12) day: Day (1-31) 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: Bound congressional record data from Congress.gov API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNo
monthNo
dayNo
offsetNo
limitNo
from_datetimeNo
to_datetimeNo

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the core logic to query the Congress.gov API for bound congressional records by constructing the URL with year/month/day and handling pagination and date range filters. Includes input schema via type annotations and docstring.
    @mcp.tool()
    async def get_bound_congressional_record(
        year: int | None = None,
        month: int | None = None,
        day: int | None = None,
        offset: int = 0,
        limit: int = 20,
        from_datetime: str | None = None,
        to_datetime: str | None = None
    ) -> dict:
        """
        Retrieve bound congressional record information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/BoundCongressionalRecordEndpoint.md
    
        Args:
            year: Year
            month: Month (1-12)
            day: Day (1-31)
            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: Bound congressional record data from Congress.gov API
        """
        base_url = "https://api.congress.gov/v3/bound-congressional-record"
    
        url = base_url
        if year:
            url += f"/{year}"
            if month:
                url += f"/{month:02d}"
                if day:
                    url += f"/{day:02d}"
    
        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 bound congressional record information: {str(e)}",
                "status_code": getattr(e.response, "status_code", None)
            }
  • server.py:790-790 (registration)
    The @mcp.tool() decorator registers the get_bound_congressional_record function as an MCP tool with the name matching the function name.
    @mcp.tool()
Behavior3/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 source and a documentation link, which adds some context, but doesn't describe key behaviors like authentication requirements, rate limits, error handling, or pagination details (beyond offset/limit parameters). The description doesn't contradict annotations (none exist), but it lacks sufficient behavioral details for a mutation-free read operation.

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 and appropriately sized. It starts with the core purpose, includes a documentation link, lists parameters with helpful details (defaults, ranges, formats), and specifies the return type. Every sentence adds value, though the documentation link could be more integrated into usage guidance.

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 (7 parameters, no annotations, no output schema), the description is moderately complete. It covers parameters thoroughly but lacks output details (only mentions 'dict' return), behavioral context (e.g., rate limits), and differentiation from siblings. For a read-only API tool, this is adequate but has clear gaps in guiding effective use.

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 adds significant value beyond the input schema, which has 0% description coverage. It explains all 7 parameters with clear semantics: year, month, day, offset (starting record), limit (max 250, default 20), and datetime ranges in specific formats. This compensates well for the schema's lack of descriptions, though it doesn't clarify parameter interactions or dependencies.

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 bound congressional record information from the Congress.gov API.' It specifies the verb ('retrieve'), resource ('bound congressional record information'), and source ('Congress.gov API'), which is specific and actionable. However, it doesn't explicitly differentiate this tool from its sibling 'get_congressional_record' or 'get_daily_congressional_record', which appears to be a related tool 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. It mentions a link to full documentation but doesn't specify use cases, prerequisites, or comparisons with sibling tools like 'get_congressional_record' or 'get_daily_congressional_record'. This leaves the agent without context for tool selection.

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