Skip to main content

Description

The Get User Transactions tool retrieves transactions for the current user with various filter options (e.g., currencies, banks, companies, partners, date range). If the number of transactions exceeds a threshold, they are saved to a temporary file on the filesystem, allowing for efficient data handling, especially with large datasets. The file response includes a structured schema, allowing other tools (e.g., Python processing tools) to understand and access the dataset efficiently.
Database Connection: Managed by Prisma Client

Arguments

  • currencies (array[string]): List of currency codes to filter transactions.
  • banks (array[string]): List of banks to filter by. The get_user_banks tool can provide available bank options.
  • companies (array[string]): List of companies to filter by. Use get_user_companies to retrieve available companies.
  • partners (array[string]): List of partners (companies or individuals) associated with transactions. Use get_user_partners to obtain partner options.
  • start_date (string): Start date for filtering transactions.
  • end_date (string): End date for filtering transactions.
  • limit (number): Limits the number of transactions returned. Default is 20,000 if unspecified.

Example Configuration

Response Handling

Successful Response: If the number of transactions is:
  • Small (less than or equal to 50): Returns a structured JSON object with a transactions_list.
  • Large (greater than 50): Saves transactions to a temporary file and returns the file path.
  • Error Handling: If the retrieval or file saving fails, an error message is logged, and details are returned for debugging.

Example Usage

  1. User Query: “Retrieve my transactions from January 2023, filtered by EUR currency.”
  2. Agent Invocation: The agent calls get_user_transactions with:
    • currencies: [“EUR”]
    • start_date: “2023-01-01”
    • end_date: “2023-01-31”
    • intention: “Retrieve user transactions in EUR for January 2023”
  3. Response:
    • If ≤ 50 transactions are found, returns as a JSON list.
  • If > 50 transactions are found, returns a file path for the saved data.
Example Response (Small Dataset)
Example Response (Large Dataset)