tools · POST /v1/tools/explain_rule
explain_rule
A rule's formula, parameters, validity window and verbatim law text.
Call it
bash
curl -s https://opentax.invaro.ai/v1/tools/explain_rule \
-H "Authorization: Bearer $OPENTAX_KEY" \
-H "Content-Type: application/json" \
-d '{
"ruleId": "us.federal.standard_deduction",
"asOf": "2025-12-31"
}'What it does
Get a tax rule in full: statutory citation with its verbatim excerpt, validity window, parameters, the formula and applicability guard (the rule IR — rules are data), the rules and facts it depends on, and its content hash. Use to quote and explain the actual law behind an answer. Pass asOf to see only the version in force on that date.
This is the description the MCP server hands to a model. The imperative sentences are addressed to the model; the facts about scope apply to every caller.
Inputs
Required: ruleId. Everything else is optional and defaults are disclosed in assumptions.
| field | type | description |
|---|---|---|
| ruleIdrequired | string | e.g. "us.federal.standard_deduction" — list via calculate_tax proof, search_tax_rules, or the corpus |
| asOf | string | ISO date; when given, only the version valid on that date is returned (omit for every version) |
Example
explain rule. Captured from the engine at corpus build time.
argumentsjson
{
"ruleId": "us.federal.standard_deduction",
"asOf": "2025-12-31"
}responsejson
{
"ok": true,
"ruleId": "us.federal.standard_deduction",
"asOf": "2025-12-31",
"ruleVersions": [
{
"id": "us.federal.standard_deduction",
"version": 1,
"jurisdiction": "us.federal",
"title": "Standard deduction",
"citation": {
"source": "26 U.S.C. § 63(c)(1)",
"section": "§ 63(c)(1)",
"url": "https://www.law.cornell.edu/uscode/text/26/63",
"excerpt": "the term 'standard deduction' means the sum of (A) the basic standard deduction, and (B) the additional standard deduction."
},
"excerpt": "the term 'standard deduction' means the sum of (A) the basic standard deduction, and (B) the additional standard deduction.",
"effectiveFrom": "2025-01-01",
"effectiveTo": "open",
"output": {
"type": "money"
},
"parameters": {},
"formula": {
"kind": "add",
"args": [
{
"kind": "rule",
"ruleId": "us.federal.standard_deduction.base"
},
{
"kind": "rule",
"ruleId": "us.federal.standard_deduction.additional"
}
]
},
"dependencies": {
"rules": [
"us.federal.standard_deduction.additional",
"us.federal.standard_deduction.base"
],
"facts": []
},
"hash": "sha256:01d7b058f3a2ab7cea941b30ad1509790ea50495d75136e4d1c9ddf267e16e13"
}
],
"note": "ruleVersions lists every version of the rule (one per validity window; `versions` is the build identity). formula and applicability are the rule IR (PROOF-FORMAT v2 expressions): kind 'rule' nodes reference other rules, kind 'fact' nodes read inputs, kind 'param' nodes read this rule's parameters. The hash covers id, version, citation, dates, parameters and formula.",
"versions": {
"engine": "0.1.0",
"composer": "0.7.0",
"corpus": "0.41.0",
"corpusMerkleRoot": "sha256:703e88a44dc7ef8a95875a57fb9d54777515c19deeabdf8892674e2921278960"
}
}