Skip to main content
Glama

add_balance

Record or update balance sheet entries for assets and liabilities. Accepts single or multiple entries with predefined categories, currency conversion to USD, and historical exchange rates.

Instructions

Upsert one or more balance sheet entries (also edits — same composite key overwrites). entries is an array: pass one entry to record a single balance item, many to import a net-worth spreadsheet (rows = months, columns = categories) in one call. Prefer add_monthly for full month-end settlement. sub_type: cash|investment|other (assets) or short_term|long_term (liabilities). VALID BALANCE CATEGORIES — assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other. Use ONLY these category strings — do NOT invent your own. For non-USD users: pass currency as the native currency (e.g. "KRW") and amount in that currency — converted to USD via historical FX at date. Use category="usd_cash" (currency="USD") for USD-denominated assets held alongside home-currency ones.

A single-entry call returns the upserted entry; a multi-entry call returns counts grouped by period.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
entriesYesOne or more balance entries to upsert

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed10 schema fields changedv0.20.0
    • removedInput schema / properties / amount
      Removed value: -{
      -  "description": "Amount in `currency` units (whole units, no decimals)",
      -  "type": "integer"
      -}
    • removedInput schema / properties / category
      Removed value: -{
      -  "description": "Must be one of the predefined balance categories: assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other.",
      -  "type": "string"
      -}
    • removedInput schema / properties / currency
      Removed value: -{
      -  "default": "USD",
      -  "description": "Currency of `amount` (USD/KRW/JPY/EUR/CNY/GBP). Defaults to USD. Non-USD values are converted to USD via historical FX at `date` for storage.",
      -  "type": "string"
      -}
    • removedInput schema / properties / date
      Removed value: -{
      -  "description": "YYYY-MM-DD (typically month-end)",
      -  "type": "string"
      -}
    • addedInput schema / properties / entries
      Added value: +{
      +  "description": "One or more balance entries to upsert",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "amount": {
      +        "description": "Amount in `currency` units (whole units, no decimals)",
      +        "type": "integer"
      +      },
      +      "category": {
      +        "description": "Must be one of the predefined balance categories: assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other.",
      +        "type": "string"
      +      },
      +      "currency": {
      +        "default": "USD",
      +        "description": "Currency of `amount` (USD/KRW/JPY/EUR/CNY/GBP/HKD/INR/TWD). Defaults to USD. Non-USD values are converted to USD via historical FX at `date` for storage.",
      +        "type": "string"
      +      },
      +      "date": {
      +        "description": "YYYY-MM-DD (typically month-end)",
      +        "type": "string"
      +      },
      +      "memo": {
      +        "type": "string"
      +      },
      +      "period": {
      +        "description": "YYYY-MM",
      +        "type": "string"
      +      },
      +      "sub_type": {
      +        "description": "cash | investment | other | short_term | long_term",
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "asset",
      +          "liability"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "period",
      +      "date",
      +      "type",
      +      "sub_type",
      +      "category",
      +      "amount"
      +    ],
      +    "type": "object"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • removedInput schema / properties / memo
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / period
      Removed value: -{
      -  "description": "YYYY-MM",
      -  "type": "string"
      -}
    • removedInput schema / properties / sub_type
      Removed value: -{
      -  "description": "cash | investment | other | short_term | long_term",
      -  "type": "string"
      -}
    • removedInput schema / properties / type
      Removed value: -{
      -  "enum": [
      -    "asset",
      -    "liability"
      -  ],
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "period",
      -  "date",
      -  "type",
      -  "sub_type",
      -  "category",
      -  "amount"
      -]New value: +[
      +  "entries"
      +]
  2. Changed3 schema fields changedv0.1.3
    • changedInput schema / properties / amount / description
      Previous value: -"Amount in USD (whole dollars)"New value: +"Amount in `currency` units (whole units, no decimals)"
    • changedInput schema / properties / category / description
      Previous value: -"Specific category name"New value: +"Must be one of the predefined balance categories: assets: cash, savings, housing_sub, usd_cash, cash_other, domestic_stock, overseas_stock, real_estate, pension, vehicle, deposit, asset_other. Liabilities: credit_card, short_term_other, loan, long_term_other."
    • addedInput schema / properties / currency
      Added value: +{
      +  "default": "USD",
      +  "description": "Currency of `amount` (USD/KRW/JPY/EUR/CNY/GBP). Defaults to USD. Non-USD values are converted to USD via historical FX at `date` for storage.",
      +  "type": "string"
      +}
  3. Changed4 schema fields changedv0.1.2
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / amount / description
      Previous value: -"Amount in KRW"New value: +"Amount in USD (whole dollars)"
    • removedInput schema / properties / amount / maximum
      Removed value: -9007199254740991
    • removedInput schema / properties / amount / minimum
      Removed value: --9007199254740991
  4. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description fully discloses behavior: upsert semantics (overwrite on same composite key), currency conversion, and return values for single vs multi-entry calls. No contradictions.

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?

The description is relatively long but every sentence serves a purpose. It is front-loaded with the core action and then provides necessary details. Minor redundancy could be trimmed, but overall well-structured.

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?

Given the complexity of the tool (upsert, multi-entry, currency conversion) and no output schema, the description covers all necessary aspects: categories, sub_types, currency handling, return values, and appropriate sibling tool reference. It is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Although schema coverage is 100%, the description adds substantial meaning beyond the schema: explains array usage patterns, valid category strings, sub_type mapping, currency conversion details, and return value behavior. This significantly aids correct usage.

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 clearly states 'Upsert one or more balance sheet entries (also edits — same composite key overwrites)' and distinguishes from sibling 'add_monthly' by advising to prefer that for full month-end settlement. The verb and resource are specific.

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 states when to use this tool vs alternatives: 'Prefer add_monthly for full month-end settlement.' Also provides detailed instructions on category, sub_type, and currency usage, guiding correct invocation.

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