Skip to main content
Glama

Mileage deduction or reimbursement calculator

calculate_mileage_deduction
Read-onlyIdempotent

Calculates the deduction or tax-free reimbursement for driven miles at the IRS standard mileage rates, splitting by the date each trip was driven. Applies the 2026 mid-year increase automatically (72.5 cents before July 1, 76 cents from July 1). Supports business, medical, charity and military moving miles, returns the amount per rate period and purpose, and the depreciation basis reduction for business miles. Notes who can and cannot deduct (employees' unreimbursed mileage is not deductible after the One, Big, Beautiful Bill Act).

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": {
      "trips": "<trips>"
    },
    "name": "calculate_mileage_deduction"
  }
}

Input Schema

NameRequiredDescriptionDefault
tripsYesTrips or mileage totals, each with a date.
default_purposeNoPurpose for trips that do not set one. Default business.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: it discloses concrete 2026 rate values, the automatic mid-year split, what the response contains (amount per rate period and purpose, depreciation basis reduction), and an eligibility caveat about unreimbursed employee mileage. That is substantive behavioral context an agent cannot get from the annotations.

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?

Front-loaded with the core action, then rate mechanics, then return contents, then eligibility. Dense but nearly every clause carries information. It is a single long paragraph rather than structured, which slightly reduces scannability.

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

Completeness5/5

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

With no output schema, the description carries the return-value burden and does so — amounts per rate period and purpose, plus depreciation basis reduction. Combined with the rate values and eligibility note, an agent has enough to call and interpret results correctly; only the moving/military wording is a small blemish.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the date on each trip determines which rate period applies, and purposes are enumerated with a business default. Minor friction: it says 'military moving' while the enum value is just 'moving', a small mismatch an agent must resolve.

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?

States a specific verb and resource: calculates the deduction or tax-free reimbursement for driven miles at IRS standard rates. The scope (date-split rates, per-purpose breakdown, depreciation basis) clearly separates it from sibling rate-lookup tools like get_mileage_rate and from calculate_trip_per_diem.

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

Usage Guidelines4/5

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

Gives clear context for when to use it — computing a deduction or reimbursement from actual trips, with a note on who can and cannot deduct. It does not explicitly route the agent away from siblings (e.g. 'use get_mileage_rate to look up a rate without computing an amount'), so the alternative selection is left to inference.

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.