Skip to main content
Glama

Log an expense

log_expense

Log a new travel expense for the authenticated user. Amounts are integer minor units (e.g. cents) with an ISO-4217 currency code. Every expense is TIED to exactly one owned journey OR stay — provide journeyId or stayId (one, not both; standalone expenses do not exist). Categories are preset: ticket/addon/upgrade for journey expenses, room/addon/upgrade for stay expenses. Tip: when logging a journey/stay AND its price, prefer the log_journey/log_stay costs input — one call instead of two. If a matching record already exists, this returns a warning naming its ID instead of inserting a duplicate — pass allowDuplicate: true to create it anyway. If unfamiliar with TripLedger semantics, call get_tripledger_guide first.

Input Schema

NameRequiredDescriptionDefault
fxRateNo
stayIdNo
spentAtNo
categoryNo
currencyNo
feesMinorNo
journeyIdNo
amountMinorNo
descriptionNo
payerPersonIdNo
allowDuplicateNoSet true to create even if a matching record already exists (see the duplicate-guard note above). Defaults to false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only say non-read-only, non-destructive, non-idempotent; the description adds the real behavioral facts an agent needs — the duplicate guard returns a warning naming the existing record's ID rather than inserting, and allowDuplicate:true overrides it. It also discloses the currency/amount representation contract and the fixed category vocabulary per parent type.

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?

Front-loaded with purpose, then constraints, then the cross-tool tip, then the duplicate behavior, then the onboarding pointer — a deliberate ordering where each sentence carries a rule an agent would otherwise get wrong. No marketing filler or restatement of the name.

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?

Adequate for the risky parts of an 11-parameter mutation with no output schema, but several inputs (fxRate, spentAt, feesMinor, payerPersonId) are left entirely to an almost undocumented schema, and the linked-currency/FX semantics are never explained. The duplicate-warning return is described only insofar as it differs from a normal insert.

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?

With only 9% schema description coverage across 11 parameters, the description must carry the load, and it does for the highest-risk ones: amountMinor is defined as integer minor units, currency as ISO-4217, journeyId/stayId as a mutually exclusive one-of, and category as a preset enum conditioned on parent type. However fxRate, spentAt, feesMinor, description, and payerPersonId are never mentioned, so coverage is strong but incomplete.

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 ('Log a new travel expense') and immediately scopes it to the authenticated user. The tip naming log_journey/log_stay as the combined alternative makes it unambiguously distinguishable from the record-creation siblings.

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?

Explicitly specifies the mandatory parent relationship (exactly one of journeyId or stayId, not both, no standalone expenses), routes the agent to log_journey/log_stay when logging a record plus its price, and points unfamiliar agents at get_tripledger_guide first. Positive and negative conditions are both stated.

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