# Part 11 — Writes: every change is asked about first
*Follows #6281
Everythi…ng an authorized local client could read, it can now change — and every change passes a question to the user first. 17 commits, 34 MCP tools in total.
## The write approval
`ModelWriteApprovalDialog` presents every change before it happens: the operation, the file, and the exact object it touches — in the user's language, in all 18 locales.
- `403 write-declined` — a no that stands; asking again changes nothing
- `423 write-unanswered` — nobody answered within two minutes, nothing changed, retry is fine
- `429 write-pending` — while one question is open, the next is refused as retryable
- `X-Portfolio-Changed: true|false` — answers on **every** write, also on ones that turned out to change nothing
- changes apply to the open file and reach the disk only when the user saves
## New read tools (8)
- **`pp_get_file_info`** — the file itself in the smallest answer: base currency, all currencies it moves in, file version, counts of everything. Read first, before anything large.
- **`pp_list_instrument_prices`** — the stored price series, day by day, oldest first; the only way to see how a series actually moved.
- **`pp_list_transactions`** — bookings as they happened: deposits, removals, interest, fees, taxes, transfers, dividends. The only place these live; a purchase or sale is two rows (security side and money side).
- **`pp_list_investment_plans`** — what the file intends to book next: rate, rhythm, next due date, last execution. The only tool that speaks of the future.
- **`pp_list_taxonomies`** — the classification trees: every class, its target weight, its parent, and on request the vehicles assigned to it.
- **`pp_get_category_performance`** — the full performance report (TTWROR, IRR, reconciliation) scoped to one class of a taxonomy.
- **`pp_list_watchlists`** — where an instrument is kept, without pulling every list of the file.
- **`pp_list_holdings`** *(extended)* — the statement of assets can now narrow to a single investment account or cash account; weights then share of that account.
## New write tools (13)
- **`pp_assign_vehicle` / `pp_unassign_vehicle`** — put an instrument or cash account into a taxonomy class and out again. PUT semantics: sending it twice does nothing twice.
- **`pp_update_class`** — set a class's target weight (`0.15` is 15 %; may exceed a whole, never negative).
- **`pp_create_class`** — bring a new class into a taxonomy, optional parent and target weight; a duplicate name under the same parent is refused before the dialog.
- **`pp_create_watchlist` / `pp_update_watchlist` / `pp_delete_watchlist`** — named baskets: create filled or empty, add and remove in one call (moving a name between two lists costs one request), take the whole list out again.
- **`pp_create_instrument`** — from whatever identifiers the caller has. Fetches nothing on purpose — reaching a provider is the application's dialog's job, not a connector's; a duplicate ISIN is refused naming the instrument that owns it.
- **`pp_delete_instrument`** — only while no transaction and no investment plan refers to it; the one real undo in this API.
- **`pp_create_cash_account`** — money in one currency; a currency outside the file's is refused listing what it does move in; same name in the same currency refused.
- **`pp_create_investment_account`** — a depot that must name its reference cash account when the file's money is not unambiguous.
- **`pp_update_instrument`** — merge-patch master data and custom attributes. Images in as base64 PNG (≤ 64 KiB — icons, not wordmarks; the bytes never travel back out), limit prices as the locale-free string `<=62.5`.
- **`pp_update_quotes`** — start the application's own quote update, scoped to `all`, `active`, one `instrument` or one `watchlist`. The only tool of the API that reaches the internet — which is exactly why the user is asked.
## For AI clients
- **Drift-guarded:** routes, `mcp-tools.json` and `openapi.yaml` are held in one truth by `McpToolsDriftTest` and `OpenApiSpecDriftTest`.
- **Token-lean:** the 34-tool catalog states every shared rule once with cross-references — about 800 tokens lighter per loaded request, nothing semantic removed.
- **Honest errors:** every refusal names the field, the value and what to do next; idempotent tools say `changed: false` instead of marking the file dirty.
## Measured live, not just unit-tested
Every tool ran against the developer's own open file: classes created and weighted, four logos written, a limit price read back unchanged, a 40-title DAX watchlist built and taken out, the quote update started — and the second refusal deliberately provoked. Every refusal code (`403`, `423`, `429`, `409 name-taken`, `409 no-such-watchlist`, `not-assigned`, `unknown-currency`, ISIN conflicts) was triggered on purpose and read back.