Skip to main content
Glama

Trip per diem calculator (GSA rates)

calculate_trip_per_diem
Read-onlyIdempotent

Calculates the maximum federal per diem for a business trip: lodging for each night at that month's GSA rate (crossing seasons and the Oct. 1 fiscal year change), M&IE for each day with 75% on the first and last day, minus meals provided at the GSA breakdown amounts. Uses the official FY2026 and FY2027 GSA rates for trips between Oct. 1, 2025 and Sept. 30, 2027.

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": {
      "start_date": "<start_date>",
      "end_date": "<end_date>"
    },
    "name": "calculate_trip_per_diem"
  }
}

Input Schema

NameRequiredDescriptionDefault
zipNo5-digit ZIP code of the destination (best match).
cityNoCity or county name, e.g. "Boston" or "Maricopa".
stateNo2-letter state code, e.g. MA.
end_dateYesLast travel day (YYYY-MM-DD).
start_dateYesFirst travel day (YYYY-MM-DD).
meals_providedNoNumber of meals provided (by a conference or the employer) to deduct from M&IE.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, closed-world behavior, so the bar is lower, yet the description adds real substance: 75% M&IE on first/last day, meal deductions taken at GSA breakdown amounts, season and Oct. 1 fiscal-year crossing, and the supported rate vintages. It stops short of describing output shape or what happens on unmatched locations or out-of-range dates.

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?

Two sentences with the computation logic front-loaded and the coverage window stated last as a boundary condition; there is no filler. The nested parentheticals in the first sentence make it dense, but each clause carries computation-relevant information.

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

Completeness3/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 should convey what comes back — a single total, an itemized lodging/M&IE breakdown, or per-day lines — and it does not. It also omits error behavior for dates outside the supported fiscal years or unresolvable locations, which matters for a tool whose correctness hinges on rate lookup.

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 coverage is 100%, so the schema already documents all six parameters, establishing a baseline of 3. The description adds some interpretive value by explaining that meals_provided is deducted at the GSA breakdown amounts and that dates are evaluated per night/day across seasons, but it says nothing about how zip/city/state are resolved or prioritized beyond the schema's 'best match' note.

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?

Uses a specific verb ('Calculates') and a precisely scoped resource ('maximum federal per diem for a business trip'), enumerating the components computed: lodging per night, M&IE per day with proration, and meal deductions. It is clearly distinct from the getter-style siblings (get_per_diem_rates, get_mileage_rate), but it never names or contrasts those siblings explicitly, keeping it short of 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 rather than stated: the FY2026/FY2027 and Oct. 1, 2025–Sept. 30, 2027 window functions as an eligibility boundary, which is useful. However, there is no explicit 'use this instead of get_per_diem_rates when...' guidance and no stated behavior for trips outside that window, so the agent must infer routing and edge handling.

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.