Skip to main content
Glama

Calculate mileage reimbursement

calculate_mileage_reimbursement
Read-onlyIdempotent

Use this when the user asks for a mileage reimbursement calculator, mileage deduction, or the IRS mileage rate 2026 applied to a number of miles ("how much can I deduct for 4,200 business miles", "my employer pays 0.70 a mile how much do I get", "odometer 41230 to 46890 how many business miles"). Applies the IRS standard mileage rate for the date driven (2025: 70 cents; Jan-Jun 2026: 72.5 cents; Jul-Dec 2026: 76 cents per business mile; medical/moving 21, 20.5, 23.5 cents; charity 14 cents), splits miles across the July 1, 2026 rate change, compares a custom employer rate with the IRS rate, and turns odometer readings into miles. Does not build a trip-by-trip log (use generate_mileage_log), look up distances, or give tax advice.

Input Schema

NameRequiredDescriptionDefault
dateNoWhen the miles were driven, YYYY-MM-DD or YYYY-MM, e.g. "2026-08-15" or "2026-03". Picks the IRS rate for that date. Default: today.
milesNoMiles to reimburse or deduct, e.g. 4200. Leave out when odometer_start and odometer_end are given.
categoryNobusiness (default), medical, moving (Armed Forces only) or charity.
segmentsNoMiles split by date when they straddle a rate change, e.g. [{"miles":1800,"date":"2026-05"},{"miles":2400,"date":"2026-09"}].
odometer_endNoOdometer reading at the end, e.g. 46890.
odometer_startNoOdometer reading at the start, e.g. 41230.
personal_milesNoPersonal or commuting miles inside the odometer range to subtract, e.g. 900.
custom_rate_per_mileNoEmployer or contract rate in US dollars per mile, e.g. 0.70 or 0.60. The IRS amount is shown next to it.

Output Schema

NameRequiredDescriptionDefault
kindYes
linesYes
milesYes
notesYes
amountYes
customYes
categoryYes
odometerYes
irs_amountYes
rate_basisYes
amount_textYes
alternativesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral detail beyond that: the exact rate table by period and category, the July 1, 2026 rate-change splitting behavior, and the fact that a custom rate is shown alongside the IRS amount rather than replacing it. For a computation tool with an output schema, this is meaningful extra context.

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 trigger condition and routing exclusions are front-loaded in the first and last sentences, with operational detail in between. It is dense with parentheticals and enumerated rates, which is justified by the domain but makes it heavier than a two-sentence ideal, so not a 5.

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?

For an 8-parameter, all-optional computation tool with an output schema, the description covers trigger conditions, rate values by period and category, odometer conversion, segment splitting, and rate comparison, plus explicit exclusions. Nothing an agent needs to call it correctly is missing, and return values are left to the output schema.

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 description coverage is 100% with defaults and examples, so the schema carries the parameter burden and baseline is 3. The description goes further by explaining the semantics of the date field (picks the rate for that date), the either/or relationship between miles and odometer fields, and the split-across-rate-change purpose of segments, adding real meaning beyond field descriptions.

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 and spells out the distinct computations it performs: applying the IRS rate by date, splitting miles across the July 2026 rate change, comparing a custom employer rate, and converting odometer readings to miles. It also explicitly names what it is not, routing trip logging to the sibling generate_mileage_log, so an agent can differentiate without opening the schema.

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?

Opens with an explicit trigger phrase ('use this when the user asks...') and backs it with three realistic paraphrase examples covering deduction, employer rate, and odometer inputs. It also names the alternatives and exclusions ('does not build a trip-by-trip log (use generate_mileage_log), look up distances, or give tax advice'), leaving nothing 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.

Resources