Skip to main content
Glama

haggl_hotel_cashback_add_trip

Idempotent

Optional, before asking a hotel's agent for a rate: prove one past trip to San Francisco (last 12 months) with its signed flight booking, hotel booking or hotel post-stay email, one email per call, to raise the user's cashback tier (1+ trips: returning, 3+ trips: frequent). Only with the user's go-ahead to send that email. The email itself is not kept.

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": {
      "haggl_id": "<haggl_id>",
      "raw_mime_b64": "<raw_mime_b64>"
    },
    "name": "haggl_hotel_cashback_add_trip"
  }
}

Input Schema

NameRequiredDescriptionDefault
haggl_idYesThe user's haggl ID.
raw_mime_b64YesBase64 (standard or url-safe) of the original email, byte for byte (Gmail format=RAW, or Show original → Download original).

Output Schema

NameRequiredDescriptionDefault
codeNoPresent only when the call failed: a machine-readable error code, e.g. quote_uncertain or rate_limited.
tripNoThe trip as read from the email.
errorNoPresent only when the call failed: what went wrong.
tripsNoTrips that count, per destination.
recoveryNoWhen the outcome is uncertain: the tool and session_id to read before retrying.
retryableNoWhether the same call may be retried.
retry_after_secondsNoWhen rate limited: seconds to wait before retrying.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Adds real behavior beyond the annotations: one email per call, the email is discarded ('not kept'), an explicit user-consent requirement, the 12-month recency window, and the tier thresholds (1+ returning, 3+ frequent). This is the kind of side-effect and privacy disclosure annotations cannot carry.

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?

Front-loaded with the optional/ordering cue and every clause adds facts (evidence types, window, tier math, consent, retention). It is dense but no sentence is wasted.

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 an output schema present and annotations covering safety, the description supplies the consent, privacy and evidence constraints an agent needs. Minor gap: no mention of failure/rejection outcomes or duplicate-email handling, which matters somewhat given idempotentHint=true.

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?

Schema coverage is 100%, so baseline is 3, and the description earns more by constraining raw_mime_b64 to a signed, original, in-window trip email and by stating one email per call. It still doesn't clarify format details already handled by the schema.

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?

Specific verb and object: 'prove one past trip to San Francisco ... with its signed flight booking, hotel booking or hotel post-stay email' to 'raise the user's cashback tier'. Scope (last 12 months, one email per call) is stated. Sibling tools are not named, so differentiation from haggl_hotel_cashback_stay/claim relies on inference.

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?

Clear timing context: 'Optional, before asking a hotel's agent for a rate', plus the consent gate 'Only with the user's go-ahead to send that email'. No explicit exclusions or named alternatives, so it stops short of a 5.

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