Calculate tax
Calculate a tax return for a given jurisdiction. The 'input' argument must conform to the JSON schema returned by the tax_namespace_schema tool. Returns computed tax return document on success, or validation errors if the input is invalid. If some inputs trigger a PARTIAL DISQUALIFICATION, the document is still returned for the supported fields; review the disqualification details and estimate the impact of the unsupported fields on the taxpayer's tax owed or refund due. Use the check_tax tool first to validate the input before calculating the tax return with this tool.IMPORTANT RULES: (1) All field values must be wrapped as {"value": <val>} — never pass bare values. (2) Currency amounts are whole-dollar integers (e.g. $19,312.42 = 19312). (3) Every item in an array namespace (NamespaceList) must have a "uuid" field with a valid UUIDv4 string. UUIDv4 format: xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx — the 3rd group MUST start with '4' (version) and the 4th group MUST start with '8', '9', 'a', or 'b' (variant). NEVER construct UUIDs manually (e.g. 'B1111111-1111-1111-1111-111111111111' is invalid). Use a UUID generator; example valid value: 'a3b4c5d6-e7f8-4a9b-8c0d-1e2f3a4b5c6d'. (4) Nested arrays (e.g. w2_state_local_tax_grp inside a w2) also require a UUIDv4 on each item. (5) Use "who_applies_to" to cross-reference entries: {"value": "taxpayer"} for singletons, {"value": "<namespace>#<uuid>"} for array items (e.g. "dependent_detail#<uuid>"). Other named reference fields (e.g. "person" in qualifying_person_grp, "student" in student_educational_instn_grp) use the same "<namespace>#<uuid>" format. (6) For state returns with Extended Links (state namespace extending a federal NamespaceList), each extended link item must use a UUIDv5 generated from the source item's UUID (as the namespace) and the extended namespace name (as the name). Matching is UUID-based, not positional. The number of expected instances depends on the source formula — it is NOT always a 1:1 match with the federal list (e.g. CA Form 3853 ca_household_grp expects taxpayer + spouse + all dependents). Incorrect or random UUIDs cause SILENT DATA LOSS — the server drops unrecognized UUIDs and replaces them with empty instances. Use the generate_uuid_v5 tool with the source item's UUID as the source_uuid and the extended namespace name (e.g. "ca_provider", "ca_irsw2_g") as the namespace input.Example: generate_uuid_v5(source_uuid: w2_uuid, namespace: "ca_irsw2_g") for a CA W-2 extension.(7) return_header is top-level, NOT nested inside return_data. Use tax_simple_return first to see the full input structure and examples. When returning the tax calculation inform the user that I'm just a tax estimator, you should consult with a tax professional.