Skip to main content
Glama

deductDayPasses

Destructive

Deduct day passes from a customer's day pass balance, as an administrator charge. Returns the created day passes transaction. Day passes that expire soonest are deducted first. Fails when the customer has fewer day passes than the amount: check the balance with getDayPassesBalances first. Pass the customer's location as transaction.locationRef. Each call creates a new transaction: when a call fails or times out, list the customer's transactions before calling again, so the same amount is not applied twice. Call getLocations to list locations, or getLocation to fetch one by locationId. Call getCustomers to list valid customerRef values. Never invent UUIDs; only use values from prior tool responses.

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": {
      "transaction": "<transaction>"
    },
    "name": "deductDayPasses"
  }
}

Input Schema

NameRequiredDescriptionDefault
transactionYesDay passes to deduct.

Output Schema

NameRequiredDescriptionDefault
transactionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description adds real behavioral context beyond them: soonest-expiring passes are deducted first, the call fails on insufficient balance, and each call creates a new transaction, which is the source of double-charge risk. It does not, however, describe what the created transaction contains or any permission requirements beyond 'administrator charge'.

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 action and the key ordering rule, then the failure condition, then retry safety. The closing 'never invent UUIDs' sentence is generic boilerplate, but everything else is dense with useful information.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A destructive mutation with an output schema, where the description covers the deduction ordering, the failure mode, idempotency concerns, and how to obtain valid reference IDs. Nothing an agent needs in order to call it safely is missing.

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% and the nested fields are already documented, but the description still adds meaning by mapping the customer's location onto transaction.locationRef and by pointing at getCustomers as the source of valid customerRef UUIDs. That is more than restating the schema, though the optional description field is unaddressed.

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 — 'Deduct day passes from a customer's day pass balance, as an administrator charge' — plus the return value. This clearly separates it from the sibling addDayPasses and from getDayPassesBalances.

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?

Gives explicit preconditions and alternatives: check the balance with getDayPassesBalances first, use getCustomers for valid customerRef values, and getLocations/getLocation for locationRef. It also covers the retry case — list transactions before re-calling after a failure or timeout.

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