Skip to main content
Glama

Tokenbooks - crypto and fiat accounting and payments

Edit Transaction

edit_transaction

Change one accounting transaction (a Portfolio Transaction): update_fields for memo, the full tag set, or operation type; update_journal_line for the ledger account, counterparty, or reporting-group assignments on one debit or credit line (read the line number first, look up selectable values with list_journal_line_assignment_options); or set_fmv_override to correct a fair market value and recompute dependent cost-basis records. Track returned requestIds, or pass waitForCompletion (update_fields, set_fmv_override) to wait for a terminal state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
memoNoNew memo; pass null to clear it Only for operation update_fields.
tagsNoReplace the full set of transaction tags Only for operation update_fields.
reasonNoImmutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references Only for operation set_fmv_override.
assetIdNoAsset ID to override (e.g. eth_1, as returned by the read tools) Only for operation set_fmv_override; required for each.
subTypeNoNew operation sub-type (requires operationType) Only for operation update_fields.
operationYesupdate_fields: Change memo, the full tag set, or the accounting operation type. update_journal_line: Change the ledger account, counterparty, or reporting-group assignments on one transaction's debit or credit line. set_fmv_override: Set a corrected fair market value per unit for one asset on the transaction and recompute dependent cost-basis records.
timeoutMsNoMaximum wait time in milliseconds, 1000 to 60000 (default 30000) Not for operation update_journal_line.
lineNumberNoJournal entry line number (1-based) Only for operation update_journal_line; required for each.
quoteSourceNoOptional source/justification for the price Only for operation set_fmv_override.
portfolioRefYesPortfolio name or slug inside that workspace. Call list_portfolios to resolve it.
workspaceRefYesWorkspace name or slug. Call list_workspaces to resolve it.
accountNumberNoChart-of-accounts number to assign (from list_journal_line_assignment_options, type: ledger_account) Only for operation update_journal_line.
newValueQuoteNoExact per-unit decimal string in base currency, e.g. "0". Do not use price. Only for operation set_fmv_override; required for each.
operationTypeNoNew accounting operation type Only for operation update_fields.
quoteCurrencyNoOptional quote currency (defaults to base currency) Only for operation set_fmv_override.
transactionIdYesPortfolio transaction ID
pollIntervalMsNoPolling interval in milliseconds, 100 to 5000 (default 500) Not for operation update_journal_line.
counterpartyNameNoCounterparty name to assign; pass null to unset Only for operation update_journal_line.
waitForCompletionNoWhen true, poll queued request IDs and include terminal status/final state before returning Not for operation update_journal_line.
responsibilityCenterAssignmentsNoTyped responsibility-center assignment set, one per dimension. Replaces the line assignments; pass [] to clear every dimension. Type keys and center names come from list_journal_line_assignment_options, type: responsibility_center. Only for operation update_journal_line.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNo
statusNo
resultsNo
successNo
requestsNo
statusesNo
completedNo
operationYes
requestIdNo
finalStateNo
lineNumberNo
transactionIdYes
primaryRequestIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • removedInput schema / oneOf
      Removed value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "memo": {
      -        "$ref": "#/properties/memo"
      -      },
      -      "operation": {
      -        "description": "Change memo, the full tag set, or the accounting operation type.",
      -        "enum": [
      -          "update_fields"
      -        ],
      -        "type": "string"
      -      },
      -      "operationType": {
      -        "$ref": "#/properties/operationType"
      -      },
      -      "pollIntervalMs": {
      -        "$ref": "#/properties/pollIntervalMs"
      -      },
      -      "portfolioRef": {
      -        "$ref": "#/properties/portfolioRef"
      -      },
      -      "subType": {
      -        "$ref": "#/properties/subType"
      -      },
      -      "tags": {
      -        "$ref": "#/properties/tags"
      -      },
      -      "timeoutMs": {
      -        "$ref": "#/properties/timeoutMs"
      -      },
      -      "transactionId": {
      -        "$ref": "#/properties/transactionId"
      -      },
      -      "waitForCompletion": {
      -        "$ref": "#/properties/waitForCompletion"
      -      },
      -      "workspaceRef": {
      -        "$ref": "#/properties/workspaceRef"
      -      }
      -    },
      -    "required": [
      -      "workspaceRef",
      -      "portfolioRef",
      -      "operation",
      -      "transactionId"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "accountNumber": {
      -        "$ref": "#/properties/accountNumber"
      -      },
      -      "counterpartyName": {
      -        "$ref": "#/properties/counterpartyName"
      -      },
      -      "lineNumber": {
      -        "$ref": "#/properties/lineNumber"
      -      },
      -      "operation": {
      -        "description": "Change the ledger account, counterparty, or reporting-group assignments on one transaction's debit or credit line.",
      -        "enum": [
      -          "update_journal_line"
      -        ],
      -        "type": "string"
      -      },
      -      "portfolioRef": {
      -        "$ref": "#/properties/portfolioRef"
      -      },
      -      "responsibilityCenterAssignments": {
      -        "$ref": "#/properties/responsibilityCenterAssignments"
      -      },
      -      "transactionId": {
      -        "$ref": "#/properties/transactionId"
      -      },
      -      "workspaceRef": {
      -        "$ref": "#/properties/workspaceRef"
      -      }
      -    },
      -    "required": [
      -      "workspaceRef",
      -      "portfolioRef",
      -      "operation",
      -      "transactionId",
      -      "lineNumber"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "assetId": {
      -        "$ref": "#/properties/assetId"
      -      },
      -      "newValueQuote": {
      -        "$ref": "#/properties/newValueQuote"
      -      },
      -      "operation": {
      -        "description": "Set a corrected fair market value per unit for one asset on the transaction and recompute dependent cost-basis records.",
      -        "enum": [
      -          "set_fmv_override"
      -        ],
      -        "type": "string"
      -      },
      -      "pollIntervalMs": {
      -        "$ref": "#/properties/pollIntervalMs"
      -      },
      -      "portfolioRef": {
      -        "$ref": "#/properties/portfolioRef"
      -      },
      -      "quoteCurrency": {
      -        "$ref": "#/properties/quoteCurrency"
      -      },
      -      "quoteSource": {
      -        "$ref": "#/properties/quoteSource"
      -      },
      -      "reason": {
      -        "$ref": "#/properties/reason"
      -      },
      -      "timeoutMs": {
      -        "$ref": "#/properties/timeoutMs"
      -      },
      -      "transactionId": {
      -        "$ref": "#/properties/transactionId"
      -      },
      -      "waitForCompletion": {
      -        "$ref": "#/properties/waitForCompletion"
      -      },
      -      "workspaceRef": {
      -        "$ref": "#/properties/workspaceRef"
      -      }
      -    },
      -    "required": [
      -      "workspaceRef",
      -      "portfolioRef",
      -      "operation",
      -      "transactionId",
      -      "assetId",
      -      "newValueQuote"
      -    ],
      -    "type": "object"
      -  }
      -]
    • changedInput schema / properties / accountNumber / description
      Previous value: -"Chart-of-accounts number to assign (from list_journal_line_assignment_options, type: ledger_account)"New value: +"Chart-of-accounts number to assign (from list_journal_line_assignment_options, type: ledger_account) Only for operation update_journal_line."
    • changedInput schema / properties / assetId / description
      Previous value: -"Asset ID to override (e.g. eth_1, as returned by the read tools)"New value: +"Asset ID to override (e.g. eth_1, as returned by the read tools) Only for operation set_fmv_override; required for each."
    • changedInput schema / properties / counterpartyName / description
      Previous value: -"Counterparty name to assign; pass null to unset"New value: +"Counterparty name to assign; pass null to unset Only for operation update_journal_line."
    • changedInput schema / properties / lineNumber / description
      Previous value: -"Journal entry line number (1-based)"New value: +"Journal entry line number (1-based) Only for operation update_journal_line; required for each."
    • changedInput schema / properties / memo / description
      Previous value: -"New memo; pass null to clear it"New value: +"New memo; pass null to clear it Only for operation update_fields."
    • changedInput schema / properties / newValueQuote / description
      Previous value: -"Exact per-unit decimal string in base currency, e.g. \"0\". Do not use price."New value: +"Exact per-unit decimal string in base currency, e.g. \"0\". Do not use price. Only for operation set_fmv_override; required for each."
    • changedInput schema / properties / operation / description
      Previous value: -"Change memo, the full tag set, or the accounting operation type."New value: +"update_fields: Change memo, the full tag set, or the accounting operation type. update_journal_line: Change the ledger account, counterparty, or reporting-group assignments on one transaction's debit or credit line. set_fmv_override: Set a corrected fair market value per unit for one asset on the transaction and recompute dependent cost-basis records."
    • changedInput schema / properties / operationType / description
      Previous value: -"New accounting operation type"New value: +"New accounting operation type Only for operation update_fields."
    • changedInput schema / properties / pollIntervalMs / description
      Previous value: -"Polling interval in milliseconds, 100 to 5000 (default 500)"New value: +"Polling interval in milliseconds, 100 to 5000 (default 500) Not for operation update_journal_line."
    • changedInput schema / properties / quoteCurrency / description
      Previous value: -"Optional quote currency (defaults to base currency)"New value: +"Optional quote currency (defaults to base currency) Only for operation set_fmv_override."
    • changedInput schema / properties / quoteSource / description
      Previous value: -"Optional source/justification for the price"New value: +"Optional source/justification for the price Only for operation set_fmv_override."
    • changedInput schema / properties / reason / description
      Previous value: -"Immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references"New value: +"Immutable root reason whose nonempty bytes are preserved exactly; use ptx:<uuid> for transaction references Only for operation set_fmv_override."
    • changedInput schema / properties / responsibilityCenterAssignments / description
      Previous value: -"Typed responsibility-center assignment set, one per dimension. Replaces the line assignments; pass [] to clear every dimension. Type keys and center names come from list_journal_line_assignment_options, type: responsibility_center."New value: +"Typed responsibility-center assignment set, one per dimension. Replaces the line assignments; pass [] to clear every dimension. Type keys and center names come from list_journal_line_assignment_options, type: responsibility_center. Only for operation update_journal_line."
    • changedInput schema / properties / subType / description
      Previous value: -"New operation sub-type (requires operationType)"New value: +"New operation sub-type (requires operationType) Only for operation update_fields."
    • changedInput schema / properties / tags / description
      Previous value: -"Replace the full set of transaction tags"New value: +"Replace the full set of transaction tags Only for operation update_fields."
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Maximum wait time in milliseconds, 1000 to 60000 (default 30000)"New value: +"Maximum wait time in milliseconds, 1000 to 60000 (default 30000) Not for operation update_journal_line."
    • changedInput schema / properties / waitForCompletion / description
      Previous value: -"When true, poll queued request IDs and include terminal status/final state before returning"New value: +"When true, poll queued request IDs and include terminal status/final state before returning Not for operation update_journal_line."
  2. Added

TDQS

A4.3/5.0
Behavior4/5

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

The annotations establish only mutation (readOnlyHint: false) and non-idempotency, so the description adds useful behavioral context: it flags the side effect 'recompute dependent cost-basis records', the asynchronous requestId flow, and the terminal-state wait semantics. It does not enumerate all possible side effects or permission/rollback behavior, but for a tool with these annotations this is a solid disclosure level.

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?

Two dense sentences front-load the tool's purpose and then compactly organize the operation modes, lookup requirement, and async completion behavior. Every clause maps to actionable information for the agent, with no filler or repeated schema content.

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 tool's 20-parameter complexity, the description covers the decision space (which operation, how to prepare via read/line-number/lookup, and how to handle completion) while the 100%-covered schema handles field-level detail and the output schema handles return values. Nothing an agent needs to call the tool correctly is missing at the usage level.

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

Parameters3/5

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

Schema description coverage is 100% and every parameter carries an 'Only for operation...' note, so the schema already performs the heavy lifting. The description only groups parameters into the three operations and adds workflow hints; it does not explain parameter values or constraints beyond what the schema already states, matching the baseline 3.

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?

Opens with a specific verb and resource: 'Change one accounting transaction (a Portfolio Transaction)'. It then enumerates the three distinct operations (update_fields, update_journal_line, set_fmv_override) with their exact targets, so an agent can immediately distinguish this from sibling transaction tools such as merge_transactions or split_transactions.

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 clear operation-by-operation selection context, including the advice to 'read the line number first' and 'look up selectable values with list_journal_line_assignment_options'. It also tells the agent when to track requestIds versus pass waitForCompletion, but it never explicitly names sibling tools or states when not to use this tool, so it stops short of a 5.

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