Update an account held elsewhere
sync_external_accountCreate or update the client's own account held elsewhere, from a full snapshot. Writes.
For holdings at a bank or broker, not strategies, read from a screenshot or from
the bank's or broker's own MCP connector.
A new ``(source, account_ref)`` creates an account; a known one is made to match.
Update an account with the pair from its ``held_elsewhere`` in list_portfolios.
``holdings`` is the whole account: a holding left out is set to zero, so a source
that only reports changes cannot use this tool.
Size each line with ``units`` or ``market_value`` plus ``currency``; identify it
by ``isin`` (most reliable), ``ticker`` or ``name``. Cash is a line with
``cash_currency`` and no identifier. Market values convert at Analyzera's price.
The account counts toward wealth and concentration, cannot be traded here and
does not refresh itself. Instruments not carried are listed in ``unmatched`` and
excluded, so ``imported_value`` can be below the source's.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>",
"account_ref": "<account_ref>",
"holdings": "<holdings>"
},
"name": "sync_external_account"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| as_of | No | ISO date the snapshot describes. Defaults to the latest priced date, and a later date is moved back to it. | |
| source | Yes | A stable slug for where the holdings came from, e.g. `montrose`. The same slug every time for the same institution — it is half the account key. | |
| currency | No | The account's reporting currency. Defaults to the client's, and is ignored once the account exists. | |
| holdings | Yes | The complete account, not only the lines that changed. Anything missing from this list is treated as sold. | |
| account_ref | Yes | The source's own id for this account. It must be stable across calls: a reference that changes creates a new account each time instead of updating the one you meant. | |
| account_name | No | ||
| account_type | No | The source's own label, e.g. `ISK` or `Depot`. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| say | No | What this result means for the client, in plain words. | |
| as_of | Yes | ||
| source | Yes | ||
| created | Yes | True when this call created the account. | |
| node_id | Yes | ||
| currency | Yes | ||
| unmatched | No | ||
| account_ref | Yes | ||
| account_name | Yes | ||
| portfolio_id | Yes | ||
| imported_value | Yes | What the imported positions are worth, in `currency`. | |
| unmatched_value | No | How much reported value the unmatched lines carried, where they carried a value. | |
| positions_closed | Yes | Holdings the account had that the snapshot did not, now sold to zero. | |
| positions_written | Yes |