Explain a calculation step by step
explainRuns any operation and returns the receipt plus human-readable derivation steps. Set op, then pass the fields that operation's own tool takes. Use it when the user asks how an answer was reached.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"op": "<op>"
},
"name": "explain"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Operation to explain. holiday_lookup is the holidays tool; the others share their tool's name. | |
| to | No | ISO date YYYY-MM-DD, or "today" (resolved in tz) | |
| tz | No | IANA timezone that defines "today" (e.g. Africa/Kampala). Default UTC. | UTC |
| net | No | Net-N payment terms in calendar days (Net 30 = 30). | |
| date | No | ISO date YYYY-MM-DD, or "today" (resolved in tz) | |
| days | No | Day count for add_days, subtract_days and business_days add mode. | |
| from | No | ISO date YYYY-MM-DD, or "today" (resolved in tz) | |
| roll | No | Roll a weekend or holiday due date forward to the next business day. Default false. | |
| year | No | Calendar year for holiday_lookup, e.g. 2027 | |
| event | No | Event slug (e.g. christmas). Exactly one of event/weekday. | |
| weekday | No | 0 = Sunday .. 6 = Saturday. Exactly one of event/weekday. | |
| workweek | No | Working week. Default mon-fri (Sat+Sun weekend). | |
| invoiceDate | No | ISO date YYYY-MM-DD, or "today" (resolved in tz) | |
| jurisdiction | No | Holiday jurisdiction id: US, GB, GB-SCT, GB-NIR, IE, FR, CA, AU, UG (alias UK for GB). No default: omit for no holiday calendar. | |
| customHolidays | No | Custom organizational holiday calendar as ISO dates (mutually exclusive with jurisdiction) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | Yes | Human-readable derivation, identical to the REST /api/v1/explain output | |
| receipt | Yes | Auditable receipt for the operation |