get_swagger
Access the OpenAPI specification to understand available endpoints and data structures for querying US Congressional information through the Congress.gov API.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_swagger"
}
}Input 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()