Add transaction name to get_transactions MCP tool output (#2026)

* fix(assistant): include transaction name in get_transactions MCP output

get_transactions already loads `entry = txn.entry` but only emits
`merchant`, which is null unless a merchant is assigned. As a result MCP
clients receive transactions with no identifying name. Add `entry.name`
(the description shown in the UI and returned by the REST API) at zero
extra query cost.

* fix(assistant): include transaction name in get_transactions MCP output

get_transactions already loads `entry = txn.entry` but only emits
`merchant`, which is null unless a merchant is assigned. As a result MCP
clients receive transactions with no identifying name. Add `entry.name`
(the description shown in the UI and returned by the REST API) at zero
extra query cost.
This commit is contained in:
SenaRinka / 陶音まの
2026-06-16 22:52:39 +08:00
committed by GitHub
parent 7dbb548479
commit aec851cae1

View File

@@ -155,6 +155,7 @@ class Assistant::Function::GetTransactions < Assistant::Function
normalized_transactions = paginated_transactions.map do |txn|
entry = txn.entry
{
name: entry.name,
date: entry.date,
amount: entry.amount.abs,
currency: entry.currency,