Skip to main content
Glama

edit_transaction

Destructive

Surgically edits one or more individual legs of a single action, leaving sibling legs untouched. Use to correct specific fields on specific legs — e.g. fix the price on just the outgoing leg of one trade. Not for applying one change across many actions at once — use bulk_edit_transactions for that. The actionId parameter is the action to edit; forward an actionId from a query_summ_transactions result — never invent one. The edits parameter is an array of per-leg edits; each addresses one leg by transactionId and carries an updates object. The transactionId parameter is the _id of one leg inside the action; get it from inspect_transaction (the per-leg _id in incoming[]/outgoing[]/fees[]). The updates parameter holds the fields to change: trade, currencyId, quantity, price, priceValueCurrency, from, to, timestamp, blockchain, reviewed (others ignored). Pass currencyId as a string from search_currencies or search_filter_options (txCurrency/feeCurrency). Legs are edited INDIVIDUALLY: a trade's buy and sell sides are separate legs, so only patch the leg(s) the user means. Applying this triggers a recalculation of the user's data. Editing rebuilds the action, so its action id changes — use the returned Affected Action IDs afterwards. Pass the returned Bulk Edit ID to undo_edit to reverse the change. To resolve a missing-blockchain data issue, set the blockchain field on the affected leg(s) to the correct chain identifier (e.g. 'eth', 'btc'). Name categories to the user by their UI label, never the raw API enum: deposit→Receive, withdrawal→Send (others usually match). For the full rules (fiat, transfers, what must never be surfaced), read the User-facing wording section of read_me_first if you haven't already.

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": {
      "actionId": "<actionId>",
      "edits": "<edits>",
      "context": "<context>",
      "llm_model": "<llm_model>"
    },
    "name": "edit_transaction"
  }
}

Input Schema

NameRequiredDescriptionDefault
editsYesOne entry per leg to edit; sibling legs are left untouched.
contextYesWrite one short, abstract, third-person sentence about the task. Refer to the requester only as "the user". Refer to any selected customer, client profile, business, portfolio, account, or data source only as "the client". Never copy, abbreviate, initialize, quote, or paraphrase a user or client name from the conversation, request, or tool data. Never put a name, initials, label, possessive name, business name, email, account name, or identifier before or after "the user" or "the client". Rewrite every named reference to exactly "the user" or "the client". For example, rewrite "User wants to know the inventory method for the client Alex R" as "The user wants to know the inventory method for the client." Do not include wallet names, wallet addresses, transaction hashes, amounts, balances, prices, dates, tax identifiers, account identifiers, or other personal or financial values. Use only generic data categories such as "transactions", "accounts", "wallets", or "tax settings". If a safe abstract summary is not possible, write exactly "the request contains sensitive details".
actionIdYesAn Action `_id` (the "Action ID") — a `query_summ_transactions` result row's `_id`, labelled `Action ID` in its text output. Use one from this conversation's results. It changes after a report refresh (a sync, an edit, a merge or a tag change can trigger one), so if it is not found, query again; where a tool also takes a `transactionId`, prefer that, because Transaction IDs do not change. NOT the Transaction `_id` that `add_manual_transaction` returns, and NOT the tx hash (the `txId` filter); passing either matches nothing and silently does nothing. To turn a Transaction `_id` into its Action ID, query with the `id` filter (`{ type: "id", value: ["<id>"], showAssociated: 1 }`) and read the `Action ID` off the result.
clientIdNoThe client this call acts for — its ID comes from list_clients. Accountants and collaborators: set it on every client-scoped call to operate on that client's data. Only accountant/collaborator accounts have clients; individual accounts omit it.
llm_modelYesThe exact model identifier you (the assistant) are running as, taken from your system prompt or environment (e.g. "claude-opus-4-8", "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" — never guess.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Far exceeds the annotations: it discloses that editing triggers a recalculation of the user's data, that the action id is rebuilt and changes, and that the returned Affected Action IDs and Bulk Edit ID must be used downstream (undo_edit reverses the change). It also documents a concrete remediation path for a missing-blockchain data issue. This is exactly the destructive-mutation context the annotations alone (destructiveHint=true) do not convey.

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 purpose and the bulk_edit exclusion are front-loaded, then ID provenance, then consequences, then undo — a sensible order. It is long and the trailing user-facing-wording paragraph plus the read_me_first referral are somewhat tangential to invoking the tool, though not wasteful.

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?

For a destructive multi-parameter mutation with no output schema, it covers consequences (recalculation), ID instability (action id changes; prefer transactionId where possible), return values (Affected Action IDs, Bulk Edit ID), and reversal via undo_edit. Nothing an agent needs to call it safely is missing.

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%, so the schema already documents every parameter in depth, including the allowed update fields and the 'never invent an id' rules. The description mostly restates that content (it repeats the field list for `updates` almost verbatim), adding only modest routing context. Baseline 3 is appropriate where the schema carries the detail.

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?

States a specific verb and resource with explicit scope: 'Surgically edits one or more individual legs of a single action, leaving sibling legs untouched.' It also names the sibling it is not (bulk_edit_transactions), so an agent can distinguish the two without reading either schema.

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?

Gives explicit when-to-use ('correct specific fields on specific legs — e.g. fix the price on just the outgoing leg'), explicit when-not ('Not for applying one change across many actions at once'), and names the alternative. It also states required provenance for both IDs (actionId from query_summ_transactions, transactionId from inspect_transaction).

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