Skip to main content
Glama

calculate_tax

Compute US federal INDIVIDUAL income tax (or balance due if withholding is given) from a content-addressed corpus of cited rules. NEVER estimate tax yourself — call this, and report ONLY numbers returned by oracle calls made with the real facts (never hand-check or approximate a line the oracle can compute: your recalled parameters may be stale). Negative result = refund. Returns the answer, every assumption made, and hashes that let anyone re-verify the full derivation offline. Facts are grouped (filing, income, retirement, credits, …) — fill the groups that apply; unknown keys are rejected, and the engine names any missing fact the target needs. When source documents CONFLICT on a value, do not silently pick one: compute both branches, disclose the conflict and your choice; an interview/confirmation answer (rollover, conversion, taxable-amount screens) usually reflects taxpayer intent better than a payer form's box code — prefer it and disclose. That heuristic covers FACTS only: LEGAL classifications (qualifying child vs other dependent, filing status, SSTB) follow the statute's tests, not intake checkbox labels — a generic 'claim dependent credit' flag does not convert a qualifying child into an ODC dependent. TRANSCRIBE documented amounts as given even when they look anomalous (e.g. state withholding in a no-income-tax state): disclose the anomaly, never delete or 'correct' a documented number from outside knowledge. If you believe an oracle result is wrong, report the ORACLE's number and note your dissent — never substitute your own: the corpus is primary-source-verified and your recollection is not. Business entities → calculate_business_tax; estates/trusts → calculate_fiduciary_tax; § 152 dependency → determine_dependent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
asOfNoREQUIRED for computation: the law-in-force date — use the intended tax year's year-end (e.g. "2025-12-31" for TY2025). Omitting it is an error, never a default.
stateNostate taxable income for the state tax targets (us.ca/us.va/us.il/us.ny/us.oh/us.nc/us.ga/us.md/us.mo/us.wi/us.mn income_tax; parameters via lookup_tax_parameter)
filingNowho is filing: status, age/blindness, dependency, student status
incomeNowages, interest, capital gains, unemployment, foreign earned income
targetNorule to derive (default: net tax; balance due when payments_estimates.federalTaxWithheld is given). Determinations: us.federal.eligible.tips_deduction, us.federal.estimated.quarterly_payment, us.federal.estimated.safe_harbor_met
creditsNoCTC/ODC counts, dependent care, saver's, adoption, education
itemizedNoSchedule A: SALT, mortgage, medical, charitable
documentsNoRAW document transcription (preferred over hand-mapped facts): W-2 boxes, 1099-R boxes/codes, SSA-1099 boxes, dependents' birth dates. SSA-1099s are first-class: box 5 sums into socialSecurityBenefits and box 6 into withholding, so the § 86 taxable-benefits worksheet runs on the transcribed total instead of a hand-mapped guess. The tool derives wages/withholding (incl. Form 8959 Part IV), box-3/5 wage coordination, dependent classifications, age facts, and early-distribution penalties deterministically — and errors if the same value is also passed as a hand-mapped fact.
kiddie_taxNoForm 8615 inputs for a child subject to § 1(g)
retirementNosocial security, IRA/pension distributions, early-distribution penalty
adjustmentsNoIRA/HSA contributions, student-loan and car-loan interest
investor_amtNoAMT preferences (ISO spread) and § 1202 QSBS exclusion
tips_overtimeNo§ 224 tips and § 225 overtime deductions (OBBBA)
healthcare_ptcNo§ 36B premium tax credit / Form 1095-A reconciliation
rentals_passiveNoSchedule E rentals/royalties + § 469 passive-loss netting (Form 8582 via us.federal.passive_loss_allowed)
self_employmentNoSchedule C / K-1, QBI inputs, SE deductions, home office
household_employerNoSchedule H nanny/household-employee taxes
payments_estimatesNowithholding, prior-year safe harbor, annualized installments

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description fully discloses the tool's behavior: it will never hand-check computations, always report oracle-called numbers, disclose conflicts and assumptions, and refuse to 'correct' documented amounts. It also explains the heuristic for preference given to interview answers over box codes. This is exemplary transparency for an agent-facing tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is dense and long but every sentence carries functional value: scope, constraints, conflict handling, transcription rules, and routing. It is not redundant; it packs a lot of essential guidance into a single block, though it could be slightly more streamlined.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the input schema (nested objects, many parameters), the description provides strong context on overall behavior, returns (answer + assumptions + hashes), and edge-case handling (conflicts, anomalies, missing facts). It does not detail output structure (no output schema available) but covers the essential operational context adequately.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides per-parameter descriptions covering 100% of parameters, so the description adds little beyond the schema. The description's global instructions (e.g., never estimate, transcription rules) apply across parameters but do not per-parameter clarify meaning or usage beyond what the schema states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool computes US federal individual income tax (or balance due) using a cited-rule corpus, which clearly identifies its purpose and distinguishes it from sibling tools like calculate_business_tax and calculate_fiduciary_tax.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives explicit when-to-use guidance, including 'Business entities → calculate_business_tax; estates/trusts → calculate_fiduciary_tax; § 152 dependency → determine_dependent' and instructs never to estimate tax, instead always calling this tool with real facts. It also outlines conflict-resolution behavior, which is crucial for correct usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.1/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: calculate_tax handles individuals, calculate_business_tax handles entities, calculate_fiduciary_tax handles estates/trusts, compute_return produces the complete federal return, compute_state_return handles state returns, and the remaining tools cover specific lookups (parameters, rules, facts, dependencies, cliffs, tipped occupations) or verification. Even with overlapping domains (explain_rule, lookup_tax_parameter, search_tax_rules, verify_fact, verify_tax_claim), their roles are sharply delineated.

Naming Consistency4/5

Tool names follow a clear pattern: compute_return, compute_state_return, calculate_tax, calculate_business_tax, calculate_fiduciary_tax, determine_dependent, explain_rule, find_tax_cliffs, is_tipped_occupation, list_input_facts, lookup_tax_parameter, search_tax_rules, verify_fact, verify_tax_claim. Most use verb_noun (calculate_tax, lookup_tax_parameter, search_tax_rules, verify_fact). Minor deviations: compare_filing_statuses and compute_return use adjective/noun phrases rather than verb_noun, but they're still readable and follow the 'compute/calculate' theme.

Tool Count5/5

15 tools is well-scoped for a comprehensive tax computation server. Each tool covers a distinct aspect of tax law (federal individual, business, fiduciary, state returns, dependency, rule lookup, parameter lookup, validation, cliff detection, fact verification, search). No tool feels redundant, and the count supports the ambitious scope without bloating.

Completeness5/5

The tool surface covers the full tax workflow: input discovery (list_input_facts), computation (calculate_tax, calculate_business_tax, calculate_fiduciary_tax, compute_return, compute_state_return), dependency determination (determine_dependent), rule/parameter lookup (explain_rule, lookup_tax_parameter, search_tax_rules), verification (verify_fact, verify_tax_claim), and specialized analysis (find_tax_cliffs, is_tipped_occupation, compare_filing_statuses). There's no obvious gap; the only potential missing feature is payroll tax computation, but that's outside the stated domain of income tax.

Resources