Skip to main content
Glama
AshwinSundar

Congress[.]gov MCP Server

by AshwinSundar

get_crsreport

Retrieve Congressional Research Service reports from Congress.gov to access authoritative legislative analysis and policy research.

Instructions

Retrieve CRS (Congressional Research Service) report information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/CRSReportEndpoint.md

Args: product_code: Specific product code for CRS report 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: CRS report data from Congress.gov API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_codeNo
offsetNo
limitNo
from_datetimeNo
to_datetimeNo

Implementation Reference

  • The main handler function for the 'get_crsreport' tool, decorated with @mcp.tool() for registration in the MCP framework. It fetches CRS report data from the Congress.gov API using the provided parameters, handles pagination and date filtering, and returns the JSON response or an error dictionary.
    @mcp.tool()
    async def get_crsreport(
        product_code: str | None = None,
        offset: int = 0,
        limit: int = 20,
        from_datetime: str | None = None,
        to_datetime: str | None = None
    ) -> dict:
        """
        Retrieve CRS (Congressional Research Service) report information from the Congress.gov API. Full documentation for this endpoint -> https://github.com/LibraryOfCongress/api.congress.gov/blob/main/Documentation/CRSReportEndpoint.md
    
        Args:
            product_code: Specific product code for CRS report
            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: CRS report data from Congress.gov API
        """
        base_url = "https://api.congress.gov/v3/crsreport"
    
        url = base_url
        if product_code:
            url += f"/{product_code}"
    
        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 CRS report information: {str(e)}",
                "status_code": getattr(e.response, "status_code", None)
            }
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 source and default/limit values for parameters, but lacks critical behavioral details such as authentication requirements, rate limits, error handling, or whether it's a read-only operation. This is a significant gap for an API tool.

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 appropriately sized and front-loaded with the core purpose, followed by a documentation link and structured parameter details. Every sentence earns its place, though the link could be integrated more seamlessly. It avoids unnecessary verbosity.

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 complexity of an API tool with 5 parameters, no annotations, and no output schema, the description is partially complete. It excels in parameter semantics but lacks behavioral context (e.g., auth, errors) and output details, leaving gaps for effective agent use.

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?

Schema description coverage is 0%, so the description must compensate fully. It provides detailed semantics for all 5 parameters, including purpose (e.g., 'product_code: Specific product code for CRS report'), defaults, formats (e.g., timestamp format), and constraints (e.g., 'max 250'). This adds substantial value beyond the bare schema.

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 specific action ('Retrieve CRS report information') and resource ('from the Congress.gov API'), distinguishing it from sibling tools like get_bills or get_members. It precisely identifies what the tool does without being vague or tautological.

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

Usage Guidelines3/5

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

The description implies usage context by specifying the data source (Congress.gov API) and linking to full documentation, but it does not explicitly state when to use this tool versus alternatives like get_committee_reports or get_hearings. No exclusions or clear alternatives are provided.

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