Skip to main content
Glama
klauern

MCP YNAB Server

by klauern

_find_transaction_by_id

Locate a specific transaction by its unique ID and type within the YNAB Server. Streamlines transaction retrieval for detailed tracking and management.

Instructions

Find a transaction by its ID and ID type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_typeYes
transaction_idYes
transactionsYes

Implementation Reference

  • The handler function for the '_find_transaction_by_id' tool, decorated with @mcp.tool(). It searches through a list of transactions to find one matching the given transaction_id based on the specified id_type (id, import_id, transfer_transaction_id, or matched_transaction_id).
    @mcp.tool() def _find_transaction_by_id( transactions: List[TransactionDetail], transaction_id: str, id_type: str ) -> Optional[TransactionDetail]: """Find a transaction by its ID and ID type.""" for txn in transactions: if ( (id_type == "id" and txn.id == transaction_id) or (id_type == "import_id" and txn.import_id == transaction_id) or ( id_type == "transfer_transaction_id" and txn.transfer_transaction_id == transaction_id ) or ( id_type == "matched_transaction_id" and txn.matched_transaction_id == transaction_id ) ): return txn return None

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/klauern/mcp-ynab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server