list_accounts
List all connected accounts in Tusk Ledger with balances, types, and last sync timestamps. Use this to identify available accounts before analyzing transactions or holdings.
Instructions
List every connected account in Tusk Ledger with current balance, type (checking, savings, credit, investment, loan), and last-sync timestamp. Use this first to understand what accounts exist before drilling into transactions or holdings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tuskledger_mcp/client.py:103-104 (helper)The HTTP client method `list_accounts()` that performs the actual GET /api/accounts/ request to the backend.
def list_accounts(self) -> list[dict]: return self._request("GET", "/api/accounts/") - tuskledger_mcp/server.py:48-57 (registration)Tool registration: defines the 'list_accounts' tool with name, description, and empty input schema.
Tool( name="list_accounts", description=( "List every connected account in Tusk Ledger with current " "balance, type (checking, savings, credit, investment, loan), " "and last-sync timestamp. Use this first to understand what " "accounts exist before drilling into transactions or holdings." ), inputSchema={"type": "object", "properties": {}, "additionalProperties": False}, ), - tuskledger_mcp/server.py:271-272 (handler)Dispatch handler: routes the 'list_accounts' tool call to `client.list_accounts()`.
if name == "list_accounts": return client.list_accounts() - tests/test_server.py:70-75 (helper)Test verifying the dispatch of 'list_accounts' calls the client method correctly.
def test_dispatch_list_accounts_calls_client(): client = MagicMock() client.list_accounts.return_value = [{"id": 1, "name": "Checking"}] out = srv._dispatch("list_accounts", {}, client) client.list_accounts.assert_called_once_with() assert out == [{"id": 1, "name": "Checking"}]