get_issuer_outstanding_bonds
Retrieve an issuer's outstanding bond issues from their EMMA profile, including issue description, dated date, and maturity range. Get a reliable drill-down on any municipal bond issuer.
Instructions
List an issuer's outstanding bond issues from their EMMA profile — issue description, dated date, maturity range. The most reliable drill-down on any issuer.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issuer_id | No | EMMA issuer GUID (from search_issuers_by_state) | |
| issuer_url | No | Any EMMA issuer URL (from emma_quick_search; can be a QuickSearch/Navigate redirect) | |
| limit | No |
Implementation Reference
- server.py:536-556 (registration)Tool registration in list_tools() — defines the schema for get_issuer_outstanding_bonds with issuer_id, issuer_url, and limit parameters.
name="get_issuer_outstanding_bonds", description=( "List an issuer's outstanding bond issues from their EMMA profile — " "issue description, dated date, maturity range. The most reliable " "drill-down on any issuer." ), inputSchema={ "type": "object", "properties": { "issuer_id": { "type": "string", "description": "EMMA issuer GUID (from search_issuers_by_state)", }, "issuer_url": { "type": "string", "description": "Any EMMA issuer URL (from emma_quick_search; can be a QuickSearch/Navigate redirect)", }, "limit": {"type": "integer", "default": 25}, }, }, ), - server.py:1156-1200 (handler)Handler in _dispatch() — navigates to the EMMA issuer page, waits for the #lvIssues table, scrapes rows including issue URLs, structures the data, and returns a limited list of outstanding bond issues.
if name == "get_issuer_outstanding_bonds": iid = args.get("issuer_id") iurl = args.get("issuer_url") if iid: url = f"{EMMA_BASE}/IssuerHomePage/Issuer?id={iid}&type=M" elif iurl: url = iurl else: return {"error": "issuer_id or issuer_url is required"} async with new_page() as page: await page.goto(url, wait_until=NAV_WAIT, timeout=NAV_TIMEOUT_MS) try: await page.wait_for_selector("#lvIssues tbody tr", timeout=15000) except Exception: pass await page.wait_for_timeout(500) data = await page.evaluate( """() => { const t = document.getElementById('lvIssues'); if (!t) return {header: [], rows: []}; const head = Array.from(t.querySelectorAll('thead th')).map(th => th.innerText.trim()); const rows = Array.from(t.querySelectorAll('tbody tr')).map(tr => { const cells = Array.from(tr.cells).map(td => td.innerText.trim()); const a = tr.querySelector('a[href*="IssueView/Details/P"]'); return {cells, issue_url: a ? a.href : null}; }); return {header: head, rows}; }""" ) header = data.get("header", []) raw_rows = data.get("rows", []) issues: list[dict[str, Any]] = [] for r in raw_rows: item = structured(header, [r.get("cells", [])]) if item: row = item[0] if r.get("issue_url"): row["issue_url"] = r["issue_url"] issues.append(row) return { "issuer_id": iid, "issuer_url": url, "count": len(issues), "issues": issues[: int(args.get("limit", 25))], } - server.py:542-555 (schema)Input schema for get_issuer_outstanding_bonds — accepts optional issuer_id, issuer_url, and limit.
inputSchema={ "type": "object", "properties": { "issuer_id": { "type": "string", "description": "EMMA issuer GUID (from search_issuers_by_state)", }, "issuer_url": { "type": "string", "description": "Any EMMA issuer URL (from emma_quick_search; can be a QuickSearch/Navigate redirect)", }, "limit": {"type": "integer", "default": 25}, }, },