Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions development/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,27 @@ The current `Assistant.function_classes` registry exposes the following tools. T

| Tool | Description |
| --- | --- |
| `get_transactions` | Search transactions with optional filters and pagination; useful for finding transactions and calculating statistics for small groups of results |
| `get_accounts` | List accounts with current and historical balances and account metadata |
| `get_transactions` | Search transactions with optional filters (account IDs, category names, merchant names, tags, types, statuses) and pagination |
| `get_accounts` | List accounts with current balances and account metadata; pass `include_balance_series` to include historical balance data |
| `get_holdings` | Search Investment and Crypto account holdings, including portfolio, performance, and cost-basis data; results are paginated |
| `get_balance_sheet` | Retrieve balance-sheet and net-worth data with historical information |
| `get_income_statement` | Retrieve income and expenses by category for a date range |
| `get_balance_sheet` | Retrieve balance-sheet and net-worth data; accepts a named period or custom date range and interval |
| `get_income_statement` | Retrieve income and expenses by category for a date range; supports monthly grouping, prior-period comparison, and account-scoped totals |
| `get_budget` | Compare a monthly budget with spending by category, with an optional prior-month trend comparison |
| `get_merchants` | List merchants visible to the user, including IDs, exact names, and source; use IDs with `update_transaction` |
| `get_recurring_transactions` | List detected and manual recurring transactions with status filter and optional upcoming-window; includes per-currency totals for active non-transfer items |
| `get_tags` | List family tags alphabetically |
| `get_categories` | List family categories hierarchically, including IDs and parent relationships |
| `get_valuations` | List valuation entries for accessible accounts, newest first, with kind and citation notes |
| `search_family_files` | Search uploaded family documents and return relevant excerpts and source filenames |

### Preview tools

The following tools are only available when the corresponding feature is enabled on your Sure instance.

| Tool | Description |
| --- | --- |
| `get_insights` | Return the visible insights feed (type filter, acknowledged toggle, limit); does not mark insights as read |

### Create, update, and import

| Tool | Description |
Expand All @@ -53,6 +64,7 @@ The current `Assistant.function_classes` registry exposes the following tools. T
| `create_category` | Create a unique category, optionally as a subcategory |
| `update_category` | Update an existing category's name, color, or icon |
| `update_transaction` | Update an existing transaction's name, notes, category, merchant, or tags after finding it with `get_transactions` |
| `record_valuation` | Record a valuation entry for an account |

`import_bank_statement` is not read-only. It requires a bank-statement PDF already uploaded to Sure and creates an import for review; it does not publish the import automatically. Because MCP access is scoped to the Sure user who authorizes the client, tools can access that user's family data. Review tool calls whenever your client offers that option.

Expand Down
2 changes: 2 additions & 0 deletions features/recurring-transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ Use the trash icon to permanently remove a recurring transaction record.

You can manually mark any individual transaction as recurring from the transaction detail view. Click **Mark as Recurring** to create a manual recurring transaction. The system automatically calculates amount variance from the past 6 months of similar transactions, allowing it to track recurring charges that vary in amount (like utility bills).

If a manual recurring transaction already exists for the same pattern (same account, merchant, amount, and currency), the **Mark as Recurring** button is disabled and shows the reason inline. You do not need to submit the form to find out — the button reflects the current state before you click.

## Technical details

### Pattern clustering
Expand Down
15 changes: 15 additions & 0 deletions guides/app-features/csv-imports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,21 @@ Date,Amount,Name,Account,Category,Notes
01/20/2024,2500.00,Paycheck,Main Checking,Income,Bi-weekly salary
```

## Supported date formats

Sure supports the following date formats for CSV imports:

| Format | Example |
|--------|---------|
| `MM/DD/YYYY` | 01/15/2024 |
| `DD/MM/YYYY` | 15/01/2024 |
| `YYYY-MM-DD` | 2024-01-15 |
| `DD/MM/YY` | 15/01/24 |

<Note>
`DD/MM/YY` is available for CSV imports only and is not available as a global date preference. Two-digit years are interpreted by Ruby's `%y` rule, which maps `00–68` to `2000–2068` and `69–99` to `1969–1999`. Review the parsed preview before publishing to confirm dates are interpreted correctly.
</Note>

## Import process

1. **Navigate to imports**: Go to Settings → Imports or use the import button in the app
Expand Down
26 changes: 26 additions & 0 deletions guides/app-features/statement-vault.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@ When you upload a PDF through the import flow, Sure first stores it as an unmatc

After transactions are extracted, the import still needs an account before it can be published.

## Reconciliation against existing transactions

When you assign an account to a PDF import, Sure automatically compares each extracted transaction against what the account already holds. Transactions that already exist — for example, because they were synced from a bank provider — are marked as reconciled rather than offered for import. Only genuinely new transactions appear in the review screen.

This means:

- **Provider-backed accounts** can now be selected as import targets. The previous manual-only restriction existed because importing into a synced account would create duplicates; reconciliation removes that risk.
- **Matching** uses amount and date (with a ±2-day window to account for posting-date differences between statements and providers). Transaction names are not matched because statement descriptions and provider names for the same transaction rarely agree.
- **Reconciliation state** is recorded on each entry with a timestamp and a reference to the statement. It survives the statement being deleted (the reference is cleared, but the timestamp remains).
- **Reassigning an account** releases the previous account's reconciliations and re-evaluates all rows against the new account.

### Import summary

After AI extraction and account assignment, Sure shows a summary of the statement broken down into:

- **Extracted** — total transactions found in the statement
- **Already recorded** — transactions matched to existing entries
- **Imported** — transactions published from this import
- **Awaiting review** — transactions not yet published

A statement where every transaction was already on file completes with zero rows to import. The summary screen explains this outcome rather than showing a generic "document analyzed" message.

### Reverting a PDF import

Reverting a PDF import releases all reconciliation marks it set, so the matched entries return to their previous state. The import is returned to a reviewable state if there are rows to offer, or completed if everything was already recorded.

## Tips for better matches

- Keep the institution name in the filename.
Expand Down
8 changes: 6 additions & 2 deletions llm-support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ These optional variables fine-tune provider selection and the behavior of the Op
| `OPENAI_MODEL` | Model name (required for custom endpoints) | `gpt-4.1` |
| `OPENAI_REQUEST_TIMEOUT` | HTTP timeout in seconds for each individual HTTP call to the model | `60` |
| `AI_RESPONSE_TIMEOUT` | Whole-turn watchdog timeout in seconds. See [Chat response timeout](#chat-response-timeout) for sizing guidance | `90` |
| `ASSISTANT_MAX_TOOL_CALL_ITERATIONS` | Maximum number of tool-call rounds per chat turn | `5` |
| `ASSISTANT_MAX_TOOL_CALL_ITERATIONS` | Maximum number of tool-call rounds per chat turn | `8` |
| `OPENAI_SUPPORTS_PDF_PROCESSING` | Set to `false` for endpoints without vision support | `true` |
| `OPENAI_SUPPORTS_RESPONSES_ENDPOINT` | Override Responses API vs Chat Completions routing | Auto-detected |
| `LLM_JSON_MODE` | JSON output mode: `auto`, `strict`, `json_object`, or `none` | — |
Expand All @@ -347,7 +347,7 @@ Custom OpenAI-compatible providers (Ollama, LM Studio, etc.) route through a syn
+ tool execution time + queue wait
```

With the defaults (`ASSISTANT_MAX_TOOL_CALL_ITERATIONS=5`, `OPENAI_REQUEST_TIMEOUT=60`), a worst-case turn takes up to 360 seconds of model time — far beyond the 90-second watchdog. The chat will report "assistant not available" even though the model is still generating a reply.
With the defaults (`ASSISTANT_MAX_TOOL_CALL_ITERATIONS=8`, `OPENAI_REQUEST_TIMEOUT=60`), a worst-case turn takes up to 540 seconds of model time — far beyond the 90-second watchdog. The chat will report "assistant not available" even though the model is still generating a reply.

### Recommended approach

Expand All @@ -362,6 +362,10 @@ ASSISTANT_MAX_TOOL_CALL_ITERATIONS=2
AI_RESPONSE_TIMEOUT=1200
```

<Note>
When the tool-call round limit is reached, the assistant sends one final request with no tools available, so the model must answer in prose with whatever it gathered. This means the assistant always returns a response rather than showing an error banner when the cap is hit.
</Note>

For cloud providers (OpenAI, Anthropic) the defaults are usually fine. If you see timeouts, raise `AI_RESPONSE_TIMEOUT` using the formula above.

<Note>
Expand Down
6 changes: 6 additions & 0 deletions providers/enable-banking.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,9 @@ For technical details about the Enable Banking API, see the [official documentat
- Banks that use decoupled authentication (separate device approval) are not supported
- Subject to Enable Banking API rate limits
- Some banks may have additional authentication requirements

## Known bank-specific behavior

### N26

N26 rejects out-of-range transaction periods with a `PERIOD_INVALID` error shape (`{"code": "PERIOD_INVALID", "detail": "dateFrom=...,dateTo=..."}`) rather than the standard `WRONG_TRANSACTIONS_PERIOD` shape. Sure recognizes both shapes and retries with a shorter date window automatically, so N26 syncs recover without manual intervention.