Municipal bonds: Claude skills backed by tested code
Analysis only. No tool in this server places orders, modifies custodian records or files returns. This server holds no client data: every figure arrives in the call and nothing is stored. Results are estimates over those figures, not a return and not tax advice. Whether a bond is a private activity bond, and what any state charges, are supplied by the caller rather than looked up.
What taxagent-muni computes
4 commands, every one callable over MCP. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.
| Command | What it returns | What it needs |
calculate_muni_yield | What a taxable bond must yield to match this municipal one, counting state tax and the 3.8% surtax the exemption also avoids. | nothing required |
calculate_muni_discount | Whether a discount bond's accretion is capital gain or ordinary income. Above the threshold a tax-exempt bond carries the top rate. | nothing required |
calculate_muni_premium | Mandatory on a tax-exempt bond, with no deduction. Basis falls to the redemption price, so there is no loss at maturity. | nothing required |
get_muni_capabilities | Which calculators taxagent-muni exposes, what it will not compute, and the rule pack its figures are pinned to. | nothing required |
When to use it
Municipal bond yields, market discount and premium amortization. It holds no client data: every figure arrives in the call and nothing is stored.
Requests it answers:
- “What taxable yield matches this municipal bond?”
- “Is my discount bond's accretion ordinary income?”
- “Must I amortize a municipal bond premium?”
- “What municipal bond tax does this server cover?”
Skills that route here, each with the moment it applies:
muni-review
Someone is comparing a muni against a taxable bond, or holds one bought above or below par and wants to know how it will be taxed.
Compare a municipal bond against a taxable alternative, and work out how a discount or premium will be taxed. Use for muni yield questions, de minimis market discount, and bond premium. Does not decide whether a bond is a private activity bond and does not look up any state's treatment.
What it does not do
Named here because leaving it out is how an agent ends up asserting something the code never computed. Each line is the registry's own wording, not a summary of it.
- Whether a bond is a private activity bond. That is a fact about the issue, and it decides whether the interest is an AMT preference.
- Any state's treatment of its own or another state's bonds. The holder's state rate is supplied by the caller, not looked up.
- Credit risk, call features, duration and liquidity, none of which a yield comparison sees.
- Original issue discount accrual schedules, and the constant-yield premium schedule the statute requires: amortization is shown straight-line, which reaches the same place at maturity.
- The effect of exempt interest on how much Social Security is taxable, which is real and is why 'tax-free' overstates it.
Where the figures come from
10 rules in the pack this server reads, each carrying its authority and legal effective date. The engines read from the pack, and a constant reappearing in the calculation path fails the build.
| Rule | Authority |
de_minimis_discount_character | IRC 1278(a)(2)(C); 1276(a)(1) |
de_minimis_fraction | IRC 1278(a)(2)(C) |
market_discount_character | IRC 1276(a)(1) |
premium_amortization_election | IRC 171(c)(1) |
premium_basis_adjustment | IRC 1016(a)(5); 171(a)(3) |
premium_deduction_allowed | IRC 171(a)(2) |
private_activity_amt_exempt_issue_years | IRC 57(a)(5)(C)(vi) |
private_activity_amt_preference | IRC 57(a)(5)(A) |
tax_exempt_interest_in_net_investment_income | IRC 1411(c)(1)(A)(i) read with IRC 103(a) |
tax_exempt_interest_in_provisional_income | IRC 86(b)(2)(B) |
Scripted case coverage
10 of the 71 console cases call this server over JSON-RPC on every build, across 1 of the 15 client objectives the case inventory groups by: Municipal bonds.
| Case | What it asks | What it shows | Outcome |
muni-naive-understates | What a taxable bond would have to pay | 7.01% against the 5.56% the federal-only formula gives. State tax and the 3.8% surtax are both avoided, and both are routinely left out. | completed |
muni-out-of-state | The same bond, bought out of state | Federally exempt, state taxable. 5.91% instead of 7.01% — a different proposition that looks identical on a screen. | completed |
muni-private-activity-in-amt | A private activity bond held by someone in AMT | The interest is a preference item, so nothing is avoided and the advantage is zero. The answer reverses rather than shades. | completed |
muni-2009-window | The same bond, issued in 2009 | Bonds issued in 2009 and 2010 are excepted from the preference, so the advantage survives AMT. A narrow window with a total effect. | completed |
muni-discount-is-ordinary | Bought below par, taxed at the top rate | A $50 discount against a $25 threshold: accrued market discount is ordinary income on disposition. The interest stays exempt; the discount does not. | completed |
muni-discount-de-minimis | A smaller discount stays capital | $20 against the same $25 threshold is treated as zero, so the gain on redemption is capital. The margin is what a buyer can act on. | completed |
muni-discount-short-maturity | The same discount on a two-year bond | The threshold is a quarter point per year, so two years allows only $5. Maturity drives this more than price does. | completed |
muni-premium-no-loss | Paid 105, redeems at 100, no loss | Amortization is mandatory with no deduction, and basis falls to the redemption price. The expectation of a loss at maturity is the thing to correct before they buy. | completed |
muni-rejects-percentage-rate | A rate given as 37 instead of 0.37 | Refused rather than producing a yield nobody could sanity-check. | VALIDATION_FAILED |
muni-capabilities | What it will not decide | Whether a bond is a private activity bond, what any state charges, and credit or call risk. Munis are also outside every portfolio engine. | completed |
Questions it answers
What taxable yield matches this municipal bond?
What a taxable bond must yield to match this municipal one, counting state tax and the 3.8% surtax the exemption also avoids. Nothing is required to start: every input has a declared default the result reports. Call calculate_muni_yield on taxagent-muni over MCP. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.
Is my discount bond's accretion ordinary income?
Whether a discount bond's accretion is capital gain or ordinary income. Above the threshold a tax-exempt bond carries the top rate. Nothing is required to start: every input has a declared default the result reports. Call calculate_muni_discount on taxagent-muni over MCP. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.
Must I amortize a municipal bond premium?
Mandatory on a tax-exempt bond, with no deduction. Basis falls to the redemption price, so there is no loss at maturity. Nothing is required to start: every input has a declared default the result reports. Call calculate_muni_premium on taxagent-muni over MCP. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.
What municipal bond tax does this server cover?
Which calculators taxagent-muni exposes, what it will not compute, and the rule pack its figures are pinned to. Nothing is required to start: every input has a declared default the result reports. Call get_muni_capabilities on taxagent-muni over MCP. Every result carries the method it used, the rule pack it was pinned to, what is still missing and whether coverage was complete, for a licensed professional to review.