Skip to main content
Glama

Organize transactions

annotate
Idempotent

Categorize, tag, rename, and organize transactions. Set party, category, transfer status, or ignored flag. Bulk operations: apply rules, detect recurring bills and subscriptions. All changes are reversible — raw bank data is never modified.

When reporting back to the user, translate counts and outcomes to plain English ("I categorized 14 transactions"). Don't echo schema field names.

ACTIONS:

  • Classify: categorize, set_party, tag, untag, annotate (set notes/url). Tags are normalized (lowercased, spaces→hyphens — "Greece Trip" stores as "greece-trip"); tag/untag input is normalized to match. untag is source-aware: removing a system (auto) tag also stops it from coming back on the next automatic refresh (re-tagging lifts the suppression); rule-applied tags are refused — edit or delete the rule instead.

  • Reserved tags: 'one-time' excludes a txn from recurring detection/forecast (effective next detection run, or immediately via detect_recurring); 'reimbursable'/'reimbursed' drive query { reimbursables: true }. 'refund' is the system's own marker for a returned charge.

  • Metadata: set_metadata (key+value; one value per key — set replaces), remove_metadata (key, optional value). Custom keys only: "tag"/"notes"/"receipt" are reserved and rejected with a pointer to their dedicated actions. Keys are trimmed + lowercased.

  • Flag: mark_transfer, mark_ignored, set_recurring

  • Revert: revert (clear manual overrides, restore import defaults)

  • Bulk: detect_recurring (creates/updates recurring_series — use preview:true to preview), apply_rules (applies saved rules — use preview:true to preview, rule_ids to limit which rules), infer_categories (fills a placeholder category from the party's own history elsewhere in the ledger; skips manual overrides and any party whose history isn't decisive; preview:true first). detect_recurring (always) and apply_rules with no filter/transaction_ids sweep the whole household: preview:true is a true dry run (no writes, no swept_at) and returns NO token — apply by re-running the same call without preview. NOTE filter.is_uncategorized will NOT find its targets — that means category IS NULL, and these rows carry a placeholder category. Select them with filter.category: ["Other Expense", "Other Income", "Uncategorized"] plus a date range COMPOUND: categorize accepts party_name/party_id to set both in one call. set_party accepts category_name/category_id/group_name to set both in one call.

TARGET: transaction_ids (max 5000) OR filter — one is required for most actions; if both are sent, the filter is ignored and a hint says so. detect_recurring takes no filter (use detect_start). FILTERS: filter.party, filter.category, filter.group, filter.tag, filter.exclude_tag are exact match (case-insensitive), accept string or string[]. filter.country ("GR" / "GRC" / "Greece") and filter.city select by where the merchant is. filter.account matches name or display name (exact, case-insensitive). filter.search is fuzzy text search across display name, party name, description, and check number. Date scope: filter.period (same named periods as query: this_month, last_month, ...) OR filter.start/end (YYYY-MM-DD) — not both. No date scope = ALL TIME. Also: amount_min/max, direction, is_uncategorized, is_recurring, is_transfer, is_ignored, is_pending, is_flagged, has_url, include_hidden. Unknown filter keys are rejected with a validation error (never silently dropped). Date keys at the TOP level (query's flat shape) are also rejected — they belong inside filter. TOKEN (filter-targeted writes only — explicit transaction_ids and filterless sweeps need none): call with preview:true → { matched, token, preview:[sample], will_set? }, review the matched rows and validated category/party/series targets (creates_party says whether a requested party name needs creation), then re-send the SAME action + filter WITH that token to execute (the token param says what makes one stale). Over 20000 matches is rejected: narrow filter.period/filter.account or pass explicit transaction_ids. Preview rows match detail: amt is signed (inflows positive, outflows negative), desc is the displayed name, raw is the original bank memo. RESPONSE: { affected: N, action, matched?, token?, will_set?: { category_id?, party_id?, party_name?, creates_party?, recurring_series_id? }, range?: { start, end } | "all", detail?: { ... }, warnings?: [...], hint? }. range echoes a filter write's effective date scope — check it matches your intent before and after bulk actions. REQUIRED PER ACTION: categorize needs category_id or category_name; set_party needs party_id or party_name; tag/untag need tag_name; annotate needs notes or url (notes:"" clears the note); set_recurring needs recurring_series_id; set_metadata needs key + value; remove_metadata needs key. mark_transfer/mark_ignored/revert need no payload. A missing one is rejected up front, before any write or preview. When affected=0, an error field explains why (e.g. party not found, category not found, missing required field, no matching transactions, missing/stale token) — or, when the requested state already holds (re-applying a tag), a hint says so. When overriding a rule-classified transaction (≤5 explicit IDs, categorize/set_party/mark_transfer/mark_ignored), warnings include rule details and recovery instructions. The write always succeeds; warnings are advisory. NOTE: To explain/debug a transaction's classification, use query { explain: true, transaction_id: "" } instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNoDo not use: end belongs inside filter: { filter: { end: ... } }
keyNoMetadata key (for set_metadata/remove_metadata)
urlNoReceipt URL to attach
notesNoNotes to add
startNoDo not use: start belongs inside filter: { filter: { start: ... } }
tokenNoREQUIRED to execute a filter-based write. Get it from a prior preview:true call (the response includes `token`) and pass it back unchanged. It binds the action + the exact set of matched transactions, so the write is rejected if that set, the scope, or the household changed since the preview (including a same-count swap). Not needed when targeting explicit transaction_ids, nor for detect_recurring or a filterless apply_rules (their previews return no token).
valueNoMetadata value (for set_metadata/remove_metadata)
actionYesAction to perform
filterNoTarget transactions by filter
periodNoDo not use: period belongs inside filter: { filter: { period: ... } }
dry_runNoDo not use: use preview: true (there is no dry_run param)
previewNoPreview without writing: matched transactions and validated will_set targets for filter-based targeting (creates_party reports whether a requested party name needs creation), or for detect_recurring the series it would create/update/deactivate and the links it would add/clear. Only a filter-targeted preview returns a token
group_idNoCategory group ID
party_idNoParty to assign
rule_idsNoLimit which rules to apply
tag_nameNoTag name
group_nameNoCategory group name
is_ignoredNoMark as ignored (excluded from all reports)
party_nameNoParty name (creates if needed)
party_typeNoParty type classification
category_idNoCategory to assign
is_transferNoMark as transfer
detect_startNoStart date for detect_recurring lookback (default: 18 months ago). A narrower window re-estimates every matched series from less history and UNLINKS its auto-linked charges older than the window — preview:true first
category_nameNoCategory name — must be an existing category (the taxonomy is a fixed set; use admin category list)
transaction_idsNoTarget specific transactions by ID
overwrite_manualNoOverwrite manual enrichments when applying rules
recurring_series_idNoLink to recurring series

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / preview / description
      Previous value: -"Preview without writing: matched transactions for filter-based targeting, or for detect_recurring the series it would create/update/deactivate and the links it would add/clear. Only a filter-targeted preview returns a token"New value: +"Preview without writing: matched transactions and validated will_set targets for filter-based targeting (creates_party reports whether a requested party name needs creation), or for detect_recurring the series it would create/update/deactivate and the links it would add/clear. Only a filter-targeted preview returns a token"
  2. Changed2 schema fields changed
    • changedInput schema / properties / filter / properties / amount_max / description
      Previous value: -"Maximum absolute amount (dollars)"New value: +"Maximum absolute amount (household's currency)"
    • changedInput schema / properties / filter / properties / amount_min / description
      Previous value: -"Minimum absolute amount (dollars)"New value: +"Minimum absolute amount (household's currency)"
  3. Changed2 schema fields changed
    • addedInput schema / properties / filter / properties / city
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Merchant city — exact match, case-insensitive"
      +}
    • addedInput schema / properties / filter / properties / country
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    }
      +  ],
      +  "description": "Merchant country — ISO alpha-2 (\"GR\"), alpha-3 (\"GRC\") or English name (\"Greece\")"
      +}
  4. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare it non-read-only, non-destructive, idempotent, but the description adds far more: all changes are reversible and raw bank data is never modified, tag normalization and source-aware untag suppression, reserved metadata keys, stale-token rejection (including same-count swaps), the 20000-match ceiling, warnings versus hard errors on rule overrides, and affected=0 error semantics. These are behavioral traits the structured fields cannot express.

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?

It is long, but for a 14-action, 27-parameter tool the labeled sections (ACTIONS, TARGET, FILTERS, TOKEN, RESPONSE, REQUIRED PER ACTION) keep it navigable and front-load the write semantics. Some segments duplicate the schema's own token/preview text verbatim, which is the main deduction; otherwise nearly every sentence carries actionable 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?

With no output schema, the description carries the full burden and delivers: the response envelope (affected, matched, token, will_set, range, detail, warnings, hint), per-action required payloads, token lifecycle, and error/hint behavior. It also flags the range field as a post-write sanity check, covering the complexity of a bulk multi-action tool.

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?

Schema coverage is 100% and the schema is already well annotated, so the baseline is 3; the description earns above that by adding cross-parameter semantics the schema does not: the top-level date-key rejection rule, unknown filter key rejection, one-value-per-metadata-key replacement behavior, the compound categorize/set_party dual-target behavior, and the preview-contract around will_set/creates_party. It clarifies how parameters interact rather than restating individual field docs.

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 opening states specific verbs and resources ('Categorize, tag, rename, and organize transactions', 'Set party, category, transfer status, or ignored flag') and enumerates the action set, so an agent knows exactly what class of write operation this is. It also routes the agent elsewhere when appropriate ('To explain/debug a transaction's classification, use query { explain: true }') and points to admin for the category taxonomy, distinguishing it from the read-oriented 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?

Explicit when/when-not guidance is pervasive: preview:true first for detect_recurring/apply_rules/infer_categories, token required for filter-targeted writes but not for explicit transaction_ids or filterless sweeps, transaction_ids OR filter with filter ignored on conflict, and detect_recurring takes no filter. It even gives a concrete workaround when filter.is_uncategorized won't find its targets, which is exactly the kind of alternative-routing guidance this dimension rewards.

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