Skip to main content
Glama

get_mileage_summary

Read-only

Mileage analytics — totals, breakdowns by month / client / purpose / category, plus deduction framing (cents-per-mile or cents-per-km × distance, country-aware IRS / CRA rates). Examples: 'mileage this year', 'miles driven for Acme', 'mileage by month', 'mileage deduction estimate', 'business miles last quarter'. Supports YoY / MoM / QoQ comparison phrasing. Returns: { message, data: { totalDistance, deductionEstimate?, breakdown?, comparison?, sampleMeta? } }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoNatural language mileage question (e.g., 'mileage this year', 'miles driven for Acme client')
groupByNoHow to group the breakdown
dateRangeNoTime period filter. Use exactly one variant — pick the shape that matches the user's phrasing.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
messageNo
successNoPresent only on the error branch (out of scope) / async path.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Success returns message + data with the computed summary; success is not emitted on the inline analytics path.",
      +  "properties": {
      +    "data": {
      +      "additionalProperties": true,
      +      "type": [
      +        "object",
      +        "null"
      +      ]
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "description": "Present only on the error branch (out of scope) / async path.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "description": "Standard ExpenseBot tool result envelope. `message` is the human-readable summary the AI cites; `data` is the structured payload (totals, breakdowns, ids, etc.). On failure, `success` is false and `error` carries a code/message/hint triple.",
      -  "properties": {
      -    "data": {
      -      "additionalProperties": true,
      -      "description": "Structured payload. Shape varies per tool — common keys: total, breakdown, comparison, sampleMeta, ids, expenseId, reportId, signupUrl, results.",
      -      "type": "object"
      -    },
      -    "error": {
      -      "additionalProperties": true,
      -      "description": "Present only when success === false.",
      -      "properties": {
      -        "code": {
      -          "type": "string"
      -        },
      -        "hint": {
      -          "type": "string"
      -        },
      -        "message": {
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "message": {
      -      "description": "Human-readable result text. Always present on success; prefer rendering this verbatim before any further reasoning.",
      -      "type": "string"
      -    },
      -    "sampleMeta": {
      -      "additionalProperties": true,
      -      "description": "Set when the underlying dataset was truncated. isTruncated=true means the agent saw a sample of `sampleCount` of `totalCount` rows; aggregate totals are still accurate.",
      -      "properties": {
      -        "isTruncated": {
      -          "type": "boolean"
      -        },
      -        "sampleCount": {
      -          "type": "integer"
      -        },
      -        "totalCount": {
      -          "type": "integer"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "success": {
      -      "description": "False on tool errors; check before reading `data`.",
      -      "type": "boolean"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover the read-only, non-destructive safety profile. The description adds genuine behavioral context: country-aware IRS/CRA rates, cents-per-mile/km deduction framing, and YoY/MoM/QoQ comparison handling. It does not discuss edge cases like empty data, but that is a minor gap for a read-only summary tool.

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?

The description is compact, front-loads the core purpose, and packs example queries, grouping dimensions, comparison support, and return shape into two sentences worth reading. There is no filler, repetition, or tautology.

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?

With a rich output schema, full parameter documentation, and read-only annotations, the description only needs to cover scoping and use conditions. It does so with practical examples, comparison semantics, and country-aware deduction behavior. It could still be more explicit about sibling-tool routing or how query, groupBy, and dateRange interact, but nothing essential is missing for correct invocation.

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 baseline is 3; the description adds useful example queries and return-shape context. However, it mentions breakdowns 'by client' while the groupBy enum exposes 'tag' rather than 'client', creating a mild mismatch between prose and schema. The dateRange guidance is helpful but largely restates schema intent.

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 action-target pair—'Mileage analytics'—and enumerates totals, breakdown dimensions, and deduction framing, making the tool's scope unmistakable. The mileage focus clearly distinguishes it from sibling reporting tools like get_income_summary and get_spending_summary.

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?

Concrete natural-language examples ('mileage this year', 'miles driven for Acme', 'mileage deduction estimate') give clear context for when this tool applies. It also mentions comparison phrasing support, but it does not explicitly state when to prefer an alternative analytics sibling or what conditions rule this tool out.

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.