get_recent_official_statements
Retrieve the ten most recent official statements filed in the municipal bond market, including issuer, series, dated date, and direct link to each document.
Instructions
List the EMMA Recent Official Statements grid — the 10 most recently filed OS documents across the muni market, with issuer, series, dated date, and a link back to the issuer. Feed a row's issue_url into get_official_statement_pdf to grab the PDF URL.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No |
Implementation Reference
- server.py:690-702 (registration)Tool registration for 'get_recent_official_statements' in the list_tools() function. Defines name, description, and input schema (limit param).
Tool( name="get_recent_official_statements", description=( "List the EMMA Recent Official Statements grid — the 10 most " "recently filed OS documents across the muni market, with issuer, " "series, dated date, and a link back to the issuer. Feed a row's " "issue_url into get_official_statement_pdf to grab the PDF URL." ), inputSchema={ "type": "object", "properties": {"limit": {"type": "integer", "default": 10}}, }, ), - server.py:1371-1402 (handler)Handler implementation in _dispatch(). Navigates to EMMA's RecentOfficialStatements page, scrapes the OS grid table, and returns issuer, series, dated date, and issuer_url fields.
if name == "get_recent_official_statements": url = f"{EMMA_BASE}/MarketActivity/RecentOfficialStatements" async with new_page() as page: await page.goto(url, wait_until=NAV_WAIT, timeout=NAV_TIMEOUT_MS) try: await page.wait_for_selector( "#ctl00_mainContentArea_oSGridView tbody tr, table.dataTable tbody tr", timeout=15000, ) except Exception: pass await page.wait_for_timeout(500) rows = await page.evaluate( """() => { const t = document.getElementById('ctl00_mainContentArea_oSGridView') || document.querySelector('table.dataTable') || document.querySelector('table'); if (!t) return []; return Array.from(t.querySelectorAll('tbody tr')).map(tr => { const a = tr.querySelector('a[href]'); const cells = Array.from(tr.cells).map(td => td.innerText.trim()); return { issuer: cells[0] || '', series: cells[1] || '', dated: cells[2] || '', issuer_url: a ? a.href : null, }; }).filter(r => r.issuer_url); }""" ) limit = int(args.get("limit", 10)) return {"count": len(rows), "filings": rows[:limit]}