mirror of
https://github.com/we-promise/sure.git
synced 2026-07-19 08:15:21 +00:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user