Provably correct day-count, holiday-calendar, business-day, and payment-schedule calculations, as a TypeScript library and an MCP server.
Shikamaru is a well-engineered financial domain MCP server with consistently excellent tool definitions. All 7 tools have explicit schemas, comprehensive descriptions, and proper parameter typing. The codebase shows thoughtful design: every tool is read-only (correct for deterministic calculations), descriptions are precise and domain-appropriate (100 - 250 chars, well within best practices), and input schemas use Zod with validation. Output schemas are documented in structured form. The server uses tool annotations correctly (readOnlyHint=true for all tools). Minor gaps: descriptions could be slightly more explicit about when LLMs should call each tool (e.g., 'If you need exact interest accrual for a bond…'), and there's no per-tool error recovery guidance (though errors are unlikely given pure-math operations). Overall, this is a mature, focused domain tool that passes code review standards.
Exact simple accrued interest (notional * rate * day-count fraction) between two dates. Dates are ISO YYYY-MM-DD; rate is the annual rate as a decimal (0.05 = 5%). Deterministic.
Move a signed number of business days under a holiday calendar (settlement math: T+2 is count 2). Zero returns the date unchanged. Deterministic.
Adjust a date to a business day under an ISDA convention and holiday calendar. Business days pass through unchanged. modified-following falls back to preceding rather than leave the month (the bond-market default). Deterministic.
Exact day-count fraction between two dates under a market convention. Dates are ISO YYYY-MM-DD. For ACT/ACT ICMA also pass frequency (coupons per year) and, for stub periods, the reference period boundaries. Deterministic; do not estimate this with a model.
Generate coupon/payment accrual periods between an effective and a termination date: monthly to annual frequency, backward or forward roll, short or long stub, optional end-of-month rule, business-day adjustment per calendar. Returns each period's unadjusted and adjusted start and end. This is where hand-rolled date code goes wrong; do not approximate it.
Tool selection guidance missing: descriptions do not explain interdependencies or when to call one tool vs another in common scenarios (e.g., 'Call adjust_date before generate_schedule if settlement dates need adjustment').
Error recovery guidance absent: while pure-math tools rarely error, descriptions lack hints on what to do if validation fails (e.g., 'Invalid date format: use ISO YYYY-MM-DD').
list_conventions description is very brief (54 chars) and lacks context on when to call it. Should hint that it's a discovery tool to call before day_count_fraction.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 67 | 2025-06-18+ | v2 |
Whether a date is a business day under a holiday calendar, with the reason when it is not (weekend or holiday). Calendars are rules in code (no stale data feed). Deterministic; do not let a model guess market holidays.
List the supported day-count conventions.