get_swagger
Access the OpenAPI specification to understand available endpoints and data structures for querying US Congressional information through the Congress.gov API.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:22-25 (handler)The handler function for the 'get_swagger' tool. It fetches and returns the Swagger JSON specification from the Congress.gov API GitHub repository.@mcp.tool() async def get_swagger(): url = "https://raw.githubusercontent.com/LibraryOfCongress/api.congress.gov/refs/heads/main/Documentation/swagger.json" return requests.get(url).json()
- server.py:22-22 (registration)The @mcp.tool() decorator registers the get_swagger function as an MCP tool.@mcp.tool()