Skip to main content
Glama

Travel Per Diem & Allowance Calculator

Calculate Trip Allowance

calculate_trip_allowance

Applies the regime's rules to an itinerary and returns one line per allowance, deduction and night, each with the rule it applied, plus totals.

  • de-bmf: >8 h one-day trips (last place of work), partial arrival/departure days, full days at the place reached before midnight, higher rate on a home stop-over day, 20 %/40 % meal deductions of that day's full-day rate (never below 0), Übernachtungspauschale per night. The three-month rule is not applied.

  • us-gsa: 75 % M&IE on first and last day, M&IE of the lodging location, last day at the last TDY location, 75 % for 12-24 h trips without lodging, full meal-amount deductions with an incidentals floor, max lodging per night by season.

  • uk-hmrc: 24-hour periods from arrival abroad, over-5/over-10-hour rates for the remainder, room rate per night, provided meals deducted at the HMRC meal rate of the location at 08:00 / 13:00 / 19:00 that day.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
legsYesDestinations in chronological order (1-20)
regimeYesWhich rule set to apply
overnightNoFalse for a trip across midnight without an overnight stay (de-bmf/us-gsa: combine hours)
leave_homeNoWhen the traveller leaves home / the first place of work (de-bmf, us-gsa). Default: first arrive
return_homeNoWhen the traveller is back home. Default: last depart
meals_providedNoMeals provided by employer/host
lodging_providedNoLodging paid directly by the employer: no lodging lines

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysYesCalendar days touched by the trip
linesYesOne line per day/period, deduction and night, each with its rule
notesYesAssumptions and caveats that applied
totalYesGrand total (null if several currencies are involved; see totals)
regimeYesRegime applied
totalsYesTotals per currency
sourcesYesOfficial publications used
currencyYesCurrency of total, if the trip has a single currency
disclaimerYesInformational use only, not tax advice
meals_totalYesMeal allowances before deductions (single-currency trips, else null)
lodging_totalYesLodging total (single-currency trips, else null)
deductions_totalYesMeal deductions, negative (single-currency trips, else null)

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?

With no annotations, the description carries the full burden and largely meets it: it discloses the output shape (one line per allowance/deduction/night plus totals) and notable behavioral exceptions such as 'The three-month rule is not applied' and 'no lodging lines' for employer-paid lodging. It never states that this is a side-effect-free calculation with nothing persisted, which would have been useful for a tool with no annotations, so it falls short of 5.

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 what the tool does and returns before diving into bulleted regime detail, and each bullet is on-topic. It is long and dives deep into statutory rule minutiae that arguably belongs in documentation, which keeps it from a 5.

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?

For a complex tool with 7 parameters and three rule regimes, the description supplies enough regime-level detail to interpret results, and an output schema exists so return values need not be re-explained. It does not cover error behavior or regime-selection guidance, leaving a small gap.

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 every parameter, and the baseline of 3 applies. The description reinforces the semantics of regime-dependent inputs (meal deductions, Übernachtungspauschale, transport-dependent BMF rules) but adds little syntax or format information beyond what the schema's own field descriptions provide.

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 ('Applies the regime's rules to an itinerary and returns one line per allowance, deduction and night, each with the rule it applied, plus totals'), making the computation nature crystal clear. It nonetheless never names or contrasts itself against the sibling tools (get_per_diem_rates, list_per_diem_regimes, search_per_diem_locations), so a 4 rather than a 5.

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?

Usage is implied by the granular per-regime rule breakdowns, which tell the agent what to expect when regime is de-bmf, us-gsa or uk-hmrc. There is no explicit statement of when to choose this tool over the lookup siblings, nor any preconditions or exclusions, so it stays at 'implied 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.

Resources