get_market_pulse
Get a weekly snapshot of the municipal primary market, including total par, deal count, top states, sectors, lead managers, and competitive vs negotiated split, built from the live new-issue calendar.
Instructions
Snapshot of this week's muni primary market: total par, deal count, top 5 states, top 5 sectors, top 5 lead managers if available, competitive-vs-negotiated split. Built entirely from the live new-issue calendar — one call, boardroom-ready.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.py:746-755 (registration)Tool registration for 'get_market_pulse' in the list_tools() function. Defines the tool name, description, and an empty input schema (no parameters needed).
name="get_market_pulse", description=( "Snapshot of this week's muni primary market: total par, deal count, " "top 5 states, top 5 sectors, top 5 lead managers if available, " "competitive-vs-negotiated split. Built entirely from the live " "new-issue calendar — one call, boardroom-ready." ), inputSchema={"type": "object", "properties": {}}, ), ] - server.py:953-982 (handler)Handler for 'get_market_pulse' inside the _dispatch() function. Fetches the new-issue calendar, computes total par, top 5 states/sectors, competitive-vs-negotiated split, and tax status mix. Returns a boardroom-ready snapshot of the primary market.
if name == "get_market_pulse": cal = await fetch_calendar() rows = cal["all"] total_par = sum(float(r.get("_principal_num", "0") or 0) for r in rows) def _top(fn, n: int = 5) -> list[dict]: agg: dict[str, float] = {} for r in rows: k = fn(r) agg[k] = agg.get(k, 0) + float(r.get("_principal_num", "0") or 0) return [ {"name": k, "par_usd": v, "par_formatted": _fmt_amount(v)} for k, v in sorted(agg.items(), key=lambda kv: kv[1], reverse=True)[:n] ] comp_cnt = len(cal["competitive"]) neg_cnt = len(cal["negotiated"]) return { "headline": f"{len(rows)} upcoming deals totaling {_fmt_amount(total_par)}", "total_deals": len(rows), "total_par_usd": total_par, "total_par_formatted": _fmt_amount(total_par), "top_states": _top(lambda r: r.get("State", "?")), "top_sectors": _top(lambda r: r.get("_sector", "?")), "sale_method_mix": { "competitive_count": comp_cnt, "negotiated_count": neg_cnt, }, "tax_status_mix": _top(lambda r: r.get("Tax Status", "?")), }