Skip to main content
Glama

Mileage reimbursement calculator

calculate_mileage_reimbursement
Read-onlyIdempotent

Calculate mileage reimbursement with the official GSA rate in effect on the travel date (today if omitted). Provide a distance in miles and the vehicle type: automobile, airplane, motorcycle or moving. For automobile travel, say whether a government-furnished automobile was available, which selects the reduced rate. Returns the rate category, rate and effective date, and the amount rounded to the cent. Use get_mileage for the rates alone.

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": {
      "distance": "<distance>",
      "vehicle_type": "<vehicle_type>"
    },
    "name": "calculate_mileage_reimbursement"
  }
}

Input Schema

NameRequiredDescriptionDefault
dateNoTravel date used to select the effective rate. Accepts YYYY-MM-DD or YYYYMMDD; defaults to today. Plan limits: Sandbox and Google add-on accounts may query dates within 30 days of today, Pro the current and previous US fiscal year, Business any date.
distanceYesOne-way or total travel distance in miles, from 0.001 through 100,000.
vehicle_typeYesVehicle or travel category used to select the applicable GSA mileage rate.
government_vehicle_availableNoOptional for automobile calculations and defaults to false. Use true when a government-furnished automobile is authorized and available; false selects the standard privately owned automobile rate.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / date / description
      Previous value: -"Travel date used to select the effective rate. Accepts YYYY-MM-DD or YYYYMMDD; defaults to today."New value: +"Travel date used to select the effective rate. Accepts YYYY-MM-DD or YYYYMMDD; defaults to today. Plan limits: Sandbox and Google add-on accounts may query dates within 30 days of today, Pro the current and previous US fiscal year, Business any date."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already establish that this is a safe, idempotent, non-destructive read, so the description is not obliged to cover safety. It instead adds behavior the annotations cannot convey: the default-to-today date resolution, the conditional branch that switches to a reduced rate when a government-furnished automobile is available, and cent-level rounding of the result. It does not surface the per-plan date-range restrictions, but those live in the schema.

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

Conciseness5/5

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

Four sentences, each doing distinct work: purpose and rate source, required inputs, the automobile branch, and the return shape, followed by the sibling routing hint. Inputs are front-loaded before the output description, and there is no filler or repetition.

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 available, the description compensates by naming the three returned fields (rate category, rate with effective date, rounded amount), so an agent knows what to expect without a response schema. Combined with the default date behavior, the conditional reduced-rate branch, and the sibling alternative, nothing needed to invoke the tool correctly is missing.

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%, and each field already documents its own range, default, enum values, and conditional applicability, so the baseline here is 3. The description restates the vehicle-type choices and the government-vehicle branch in prose, which reinforces the conditional logic but adds no format, unit, or constraint detail beyond what the schema already carries.

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 opens with a specific verb and resource ('Calculate mileage reimbursement') and immediately qualifies it with the authoritative source ('official GSA rate in effect on the travel date'). It also distinguishes itself from the closest sibling by naming get_mileage, so an agent can separate a computation tool from a rate-lookup tool without opening either schema.

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?

The final sentence gives an explicit alternative and the condition that selects it ('Use get_mileage for the rates alone'), which is exactly the routing decision an agent faces. It also tells the agent what inputs to supply per vehicle type, but it does not state any exclusions or prerequisites (e.g., what to do if the travel date is out of plan range), so it stops just short of full guidance.

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