Skip to main content
Glama

set_balance

Save expiring balances such as airline vouchers, credits, certificates, or points by program and value to track them; matching name and program updates the entry, and zero removes it.

Instructions

Save a balance the user owns that can expire: an airline voucher or code, an earned credit, a certificate, points. Same name + program replaces; value 0 removes it. Never store account or member numbers.

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": {
      "name": "<name>",
      "program": "<program>",
      "value": "<value>",
      "unit": "<unit>"
    },
    "name": "set_balance"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYese.g. 'Companion fare', '$100 travel voucher'.
unitYes
notesNo
ownerNoWhose account it's on, if not the user's (e.g. a partner).
valueYes
expiresNoISO date it expires, if any.
programYese.g. 'Alaska', 'Delta', 'Marriott'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full load and does disclose meaningful behavior: upsert semantics keyed on name+program, deletion via value 0, and a privacy prohibition on account numbers. It says nothing about what the call returns, whether deletion is reversible, or what errors occur on invalid expiry dates, so the disclosure is partial rather than thorough.

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?

Three dense sentences, front-loaded with what the tool stores, followed by mutation semantics and a hard constraint. No filler and nothing repeated from the schema.

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?

For a 7-parameter mutation tool with no annotations and no output schema, the description covers identity, keying, deletion, and a safety rule. Only the return value and validation behavior are unaddressed, which are minor relative to the rest of the coverage.

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 57%, and the description compensates by explaining the composite key (name + program), the sentinel meaning of value 0, and the privacy constraint that governs the owner field. The unit enum and notes parameter remain undefined in both schema and description, leaving a small gap.

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?

States a specific verb and resource — 'Save a balance the user owns that can expire' — and enumerates concrete examples (airline voucher, credit, certificate, points) that pin down the scope. It does not differentiate itself from the close sibling mark_credit, so an agent must infer the boundary between logging a credit and marking one used.

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?

Provides explicit conditional behavior: same name + program replaces, value 0 removes, and never store account/member numbers. That covers what to do in the ambiguous cases, but it offers no explicit when-to-use-vs-siblings guidance and no prerequisites or confirmation requirements for the destructive value=0 path.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.