update_transaction

Updates one transaction by transactionId. Wraps the updateTransaction RPC.

Use with an AI agent

Export this page as Markdown or bundle it with a task for your agent.

Try a task
Preview the prompt that will be copied

Access

  • Effect: Changes data
  • Required scope: write (the mcp scope also grants it)

Example request

The JSON-RPC message an MCP client sends to call this tool. Your client builds it for you; this is for reference and debugging in a tool such as MCP Inspector.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_transaction",
    "arguments": {}
  }
}

Example IDs refer to fictional demo data. Replace them with IDs from your account before calling the real server.

Description

Updates one transaction by transactionId. Wraps the updateTransaction RPC.

If transactionId is unknown, pass transactionNameHint (name or partial match like "coffee") or useLatestTransaction=true for the most recent entry (no name hint).
If several transactions match the hint, this asks which one — do not guess (even when useLatestTransaction is set).

Informal category names (e.g. "food", "dining", "this looks like groceries") auto-map to system categories; user-defined category names from list_categories resolve to their categoryId.
Unrecognized category labels are refused — ask the user or call list_categories.

To tag a transaction, pass tagNames (e.g. ["Client Meals"]): the named tags are added to its existing tags. transaction.tagIds replaces the full tag list instead. Pass one or the other, not both.

Get transactionId from list_transactions, read_transaction, or create_transaction.
If transactionFieldMasks is omitted, masks are inferred from the provided transaction fields.
For precision-aware edits, use exactVersion from a recent read as expectedExactVersion, set preserveExactAmounts, and use exactAmount with signed string units and a decimal scale; transfers also require toExactAmount.
After updating, confirm in plain language using friendly category names (not underscore enums).

Input parameters

NameTypeRequiredDescription
expectedExactVersionstringNo
preserveExactAmountsbooleanNo
tagNamesarrayNo
transactionobjectNo
transactionFieldMasksarrayNo
transactionIdstringNo
transactionNameHintstringNo
useLatestTransactionbooleanNo
Full input schema (JSON Schema)
json
{
  "additionalProperties": false,
  "properties": {
    "expectedExactVersion": {
      "type": "string"
    },
    "preserveExactAmounts": {
      "type": "boolean"
    },
    "tagNames": {
      "items": {
        "type": "string"
      },
      "type": [
        "null",
        "array"
      ]
    },
    "transaction": {
      "additionalProperties": false,
      "properties": {
        "accountId": {
          "type": [
            "null",
            "string"
          ]
        },
        "amount": {
          "type": [
            "null",
            "number"
          ]
        },
        "category": {
          "type": [
            "null",
            "string"
          ]
        },
        "categoryId": {
          "type": [
            "null",
            "string"
          ]
        },
        "cronExpression": {
          "type": [
            "null",
            "string"
          ]
        },
        "currency": {
          "type": [
            "null",
            "string"
          ]
        },
        "deletedOneOffSplitParticipants": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "description": {
          "type": [
            "null",
            "string"
          ]
        },
        "endDate": {
          "type": [
            "null",
            "string"
          ]
        },
        "exactAmount": {
          "additionalProperties": false,
          "properties": {
            "scale": {
              "description": "Decimal scale from 0 through 18",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "units": {
              "description": "Signed integer units encoded as a decimal string",
              "type": "string"
            }
          },
          "required": [
            "units",
            "scale"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "expenseCategory": {
          "type": [
            "null",
            "string"
          ]
        },
        "fileIds": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "inReview": {
          "type": [
            "null",
            "boolean"
          ]
        },
        "incomeCategory": {
          "type": [
            "null",
            "string"
          ]
        },
        "isExcludedFromAnalytics": {
          "type": [
            "null",
            "boolean"
          ]
        },
        "isPending": {
          "type": [
            "null",
            "boolean"
          ]
        },
        "lineItems": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "amount": {
                "type": "number"
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "amount"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "name": {
          "type": [
            "null",
            "string"
          ]
        },
        "oneOffSplitParticipants": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "amount": {
                "type": [
                  "null",
                  "integer"
                ]
              },
              "exactAmount": {
                "additionalProperties": false,
                "properties": {
                  "scale": {
                    "description": "Decimal scale from 0 through 18",
                    "maximum": 255,
                    "minimum": 0,
                    "type": "integer"
                  },
                  "units": {
                    "description": "Signed integer units encoded as a decimal string",
                    "type": "string"
                  }
                },
                "required": [
                  "units",
                  "scale"
                ],
                "type": [
                  "null",
                  "object"
                ]
              },
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "subcategory": {
          "type": [
            "null",
            "string"
          ]
        },
        "tagIds": {
          "items": {
            "type": "string"
          },
          "type": [
            "null",
            "array"
          ]
        },
        "toExactAmount": {
          "additionalProperties": false,
          "properties": {
            "scale": {
              "description": "Decimal scale from 0 through 18",
              "maximum": 255,
              "minimum": 0,
              "type": "integer"
            },
            "units": {
              "description": "Signed integer units encoded as a decimal string",
              "type": "string"
            }
          },
          "required": [
            "units",
            "scale"
          ],
          "type": [
            "null",
            "object"
          ]
        },
        "transactedAt": {
          "type": [
            "null",
            "string"
          ]
        },
        "type": {
          "type": [
            "null",
            "string"
          ]
        },
        "vendorId": {
          "type": [
            "null",
            "string"
          ]
        },
        "vendorName": {
          "type": [
            "null",
            "string"
          ]
        }
      },
      "type": "object"
    },
    "transactionFieldMasks": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "path": {
            "type": "string"
          }
        },
        "required": [
          "path"
        ],
        "type": "object"
      },
      "type": [
        "null",
        "array"
      ]
    },
    "transactionId": {
      "type": "string"
    },
    "transactionNameHint": {
      "type": [
        "null",
        "string"
      ]
    },
    "useLatestTransaction": {
      "type": [
        "null",
        "boolean"
      ]
    }
  },
  "type": "object"
}