Skip to main content
Glama

401k.loans: 401(k) loan and withdrawal calculators

401(k) early withdrawal tax and penalty

calculate_401k_early_withdrawal
Read-onlyIdempotent

Runs the 401k.loans early withdrawal calculator for a cash-out or hardship withdrawal: amount taken out (or the gross needed to net a target), income tax at your marginal rates, the 10% additional tax, what you keep, what the plan withholds up front (20% mandatory, or 10% default for hardship), the check amount, and the balance due or refund at filing.

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": {
      "amount": "<amount>"
    },
    "name": "calculate_401k_early_withdrawal"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNo"gross" = amount is what you take out of the plan; "net" = amount is what you need in hand after tax. Default gross.gross
amountYesDollar amount, e.g. 20000. See mode.
hardshipNotrue for a hardship withdrawal (10% default withholding instead of the 20% that applies to most other withdrawals). Default false.
state_tax_pctNoState income tax rate in percent, 0 to 15. Default 0.
federal_bracket_pctNo2026 federal income tax bracket in percent (Rev. Proc. 2025-32): 10, 12, 22, 24, 32, 35 or 37.
additional_10pct_tax_appliesNotrue if you are under 59.5 and no exception applies, so the 10% additional tax is due. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already establish that this is a read-only, idempotent, non-destructive calculation. The description adds useful behavioral detail about withholding rules (20% mandatory vs. 10% hardship default), the 10% additional tax, and the resulting check/balance/refund outputs.

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 front-loaded with the tool's purpose and then lists the calculated outputs in a single dense sentence. It is appropriately sized for a calculator with no output schema, though the long colon list is slightly heavy.

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 absence of an output schema, the description does a good job enumerating the return values: taxes, penalty, withholding, check amount, and filing balance. It is complete enough to call correctly, with only minor gaps around alternatives and edge-case limitations.

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?

Schema description coverage is 100%, so the schema already documents all six parameters, including mode, hardship, and the additional-tax flag. The description reinforces the gross-vs-net and withholding semantics but does not add syntax or constraints beyond the schema.

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

Purpose4/5

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

The description states a specific verb and resource: it runs the 401k.loans early withdrawal calculator for cash-out or hardship withdrawals. It clearly separates this from the loan-focused siblings by domain, though it does not explicitly name them.

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

Usage Guidelines3/5

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

It gives implied usage context by saying the tool is for a cash-out or hardship withdrawal, but it does not state when to use this versus the loan-cost or comparison siblings, nor does it provide exclusions.

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.

Resources