@levitating/tensor-mcp 5.3.2 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,19 +13,21 @@ groups the browser extension parks).
13
13
  allowlist**, so an MCP client can never reach anything its credential could
14
14
  not reach over REST. The boundary is deliberate: **no unrecoverable
15
15
  destruction, and no self-widening.** Every Trash purge, comment deletion,
16
- decryption-device enrollment, the file access logs, the generic cross-surface
17
- `/api/links*` and `/api/tags*`, FX and loan terms stay session-only. The
16
+ decryption-device enrollment, the file access logs and the generic
17
+ cross-surface `/api/links*` and `/api/tags*` stay session-only, and FX rates,
18
+ loan terms and fund terms can be read but only changed in Tensor itself. The
18
19
  reasoning lives in `docs/contract/MCP.md` in the Tensor repo, and Tensor's
19
20
  smoke tests assert those boundaries in both directions.
20
21
 
21
- Published as [`@levitating/tensor-mcp@^5.3.0`](https://www.npmjs.com/package/@levitating/tensor-mcp).
22
+ Published as [`@levitating/tensor-mcp@^6.0.0`](https://www.npmjs.com/package/@levitating/tensor-mcp).
22
23
  The complete inventory is the tables below — every tool, nothing needing a
23
24
  clone of the Tensor repo. CI derives and checks every listed name against
24
25
  `mcp-server/tools.ts`, in both directions. Reader-facing docs:
25
26
  [tensor.levitating.org/docs/mcp](https://tensor.levitating.org/docs/mcp).
26
27
 
27
28
  **Contents:** [Hosted or local](#do-you-need-this-package-at-all) ·
28
- [Configuration](#configuration) · [Writes are permanent](#writes-are-permanent) ·
29
+ [Configuration](#configuration) · [The agent guide](#the-agent-guide) ·
30
+ [Writes are permanent](#writes-are-permanent) ·
29
31
  [Available tools](#available-tools) · [Scopes](#scopes) · [Changelog](#changelog)
30
32
 
31
33
  ## Do you need this package at all?
@@ -80,13 +82,24 @@ Set two environment variables:
80
82
  |----------|-------------|
81
83
  | `TENSOR_API_KEY` | Your Tensor API key — shape `ak_live_…` (or `ak_test_…`). Create one at **Developer → Access** inside your Tensor instance and attach the scopes listed below. Shown once at creation. |
82
84
  | `TENSOR_BASE_URL` | Tensor instance URL, e.g. `https://tensor.levitating.org` (default: `http://localhost:5000`) |
85
+ | `TENSOR_MCP_READ_ONLY` | Optional. `1` lists only the tools that read (since 6.0.0) |
86
+ | `TENSOR_MCP_TOOLSETS` | Optional. A comma-separated subset of `ledger`, `work`, `files`, `web`: only those halves of Tensor are listed, plus the four tools that need no scope (since 6.0.0). Unknown names are ignored |
87
+ | `TENSOR_AGENT_NAME` | Optional. The name this agent goes by, when several agents share one key. Tensor records it beside the key on every write and prints it as a claim ("calls itself …"), never in place of the key's own name. Better still, give each agent its own key: a key's name must be unique among your live keys |
88
+
89
+ The two `TENSOR_MCP_*` variables narrow the list to save the agent's context;
90
+ they are not a security boundary (the key's scopes are). The hosted endpoint
91
+ takes the same two as request headers, `X-Tensor-Read-Only: 1` and
92
+ `X-Tensor-Toolsets: ledger,work`, and the agent's name as `X-Tensor-Agent`,
93
+ for a client that lets you set headers. They are headers rather than query
94
+ parameters because an OAuth token is bound to the exact MCP URL it was issued
95
+ for.
83
96
 
84
97
  ## Running standalone
85
98
 
86
99
  ```bash
87
100
  TENSOR_API_KEY=ak_live_xxxxxxxxxxxx \
88
101
  TENSOR_BASE_URL=https://tensor.levitating.org \
89
- npx -y @levitating/tensor-mcp@^5.3.0
102
+ npx -y @levitating/tensor-mcp@^6.0.0
90
103
  ```
91
104
 
92
105
  ## Claude Code integration
@@ -99,7 +112,7 @@ Add to your `~/.claude.json` or project `.claude.json`:
99
112
  "tensor": {
100
113
  "type": "stdio",
101
114
  "command": "npx",
102
- "args": ["-y", "@levitating/tensor-mcp@^5.3.0"],
115
+ "args": ["-y", "@levitating/tensor-mcp@^6.0.0"],
103
116
  "env": {
104
117
  "TENSOR_API_KEY": "ak_live_your_key_here",
105
118
  "TENSOR_BASE_URL": "https://your-instance.example.com"
@@ -118,7 +131,7 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
118
131
  "mcpServers": {
119
132
  "tensor": {
120
133
  "command": "npx",
121
- "args": ["-y", "@levitating/tensor-mcp@^5.3.0"],
134
+ "args": ["-y", "@levitating/tensor-mcp@^6.0.0"],
122
135
  "env": {
123
136
  "TENSOR_API_KEY": "ak_live_your_key_here",
124
137
  "TENSOR_BASE_URL": "https://your-instance.example.com"
@@ -128,6 +141,36 @@ Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_
128
141
  }
129
142
  ```
130
143
 
144
+ ## The agent guide
145
+
146
+ The tool descriptions say what each tool does. The guide says how to use them
147
+ together: which tool to reach for first, the order a job goes in, and what
148
+ needs the user's confirmation. It is written once, in `mcp-server/guide.ts`,
149
+ and reaches an agent through every door MCP has, so it works on any MCP client
150
+ rather than one vendor's:
151
+
152
+ - **Server instructions.** The `initialize` response carries a short brief
153
+ that a client loads into the model's context on connect, before any tool is
154
+ called.
155
+ - **`get_guide`**, a tool. Every MCP client supports tools, so this is the
156
+ door that always works: no topic for the overview, or one of `ledger`,
157
+ `imports`, `work`, `files`, `safety`. It calls no Tensor route and needs no
158
+ scope.
159
+ - **Resources** `tensor://guide/ledger`, `…/imports`, `…/work`, `…/files`,
160
+ `…/safety`: the same topics, for clients that attach resources.
161
+ - **Prompts**, which many clients show as slash commands:
162
+ `record_statement` (statement → checked, confirmed ledger entries),
163
+ `portfolio_review` (a read-only review) and `triage_inbox` (ideas and open
164
+ todos → proposals).
165
+ - **An Agent Skill**, [`skills/tensor/SKILL.md`](skills/tensor/SKILL.md), shipped
166
+ in this package. SKILL.md is an open format read by Claude, Codex, Gemini
167
+ CLI, Cursor, GitHub Copilot and others; copy the `tensor` folder into your
168
+ agent's skills directory (for example `.claude/skills/`, `.agents/skills/`,
169
+ `~/.gemini/skills/` or `.cursor/skills/`; check your tool's docs for its
170
+ path). It is the same text as the guide, generated from it by
171
+ `npm run mcp:skill` in the Tensor repo, so it is only worth installing for
172
+ an agent that reads skills before it connects.
173
+
131
174
  ## Writes are permanent
132
175
 
133
176
  Four tools have consequences an MCP client cannot undo. Confirm with the user
@@ -150,16 +193,85 @@ immediate on those surfaces: `delete_todo_state`, `delete_todo_tag`,
150
193
  is the recoverable unit, so a tab has no soft state of its own). The first
151
194
  three refuse while in use; once through, there is no undo.
152
195
 
196
+ ### What a client can tell before it calls
197
+
198
+ Every tool carries MCP annotations, so a client can run the reads without
199
+ asking and stop for a confirmation in front of anything that changes data:
200
+
201
+ - `readOnlyHint: true` on every `list_*` and `get_*` tool and on
202
+ `browse_files`, `search_records`, `search_market_quotes` and
203
+ `verify_market_quote`. They only read.
204
+ - `destructiveHint: true` on every `delete_*`, `update_*`, `set_*`,
205
+ `detach_*`, `reorder_*` and `move_*` tool, and on `data_apply` and `sell_all_position`.
206
+ A soft delete is marked too: the hint asks for a confirmation, and one click
207
+ in front of "move to Trash" is cheaper than none in front of the hard deletes
208
+ above.
209
+ - `idempotentHint: true` on the writes a retry repeats harmlessly (`update_*`,
210
+ `delete_*`, `restore_*`, `set_*`, `detach_*`, `reorder_*`, `move_*`), except
211
+ `update_asset_price`, which adds a row to the price history.
212
+ - `openWorldHint: true` on the four tools that reach the market-data provider.
213
+
214
+ The hints are advice to the client. The boundary is still the scope on the
215
+ REST route behind each tool.
216
+
217
+ ### Retrying a write safely
218
+
219
+ Every write that a retry would duplicate (`create_*` except the two upload-URL
220
+ tools, `attach_*`, `add_tabs_to_group`, `confirm_file_upload`, `update_asset_price`,
221
+ `sell_all_position`, `sync_prices`, `sync_asset_price`) takes an optional
222
+ `idempotencyKey`. Send any unique string; if the call times out and you retry
223
+ it with the **same** value and the same arguments, Tensor answers with the
224
+ first result instead of writing again (`Idempotency-Key`, Developer API §5.2A,
225
+ kept for 30 days). Above all use it on `create_transaction`, whose duplicate
226
+ can never be deleted.
227
+
153
228
  ## Available Tools
154
229
 
155
- The tables below are the complete list. At runtime, the authoritative
156
- inventory (names, descriptions and full input schemas) is a `tools/list`
157
- JSON-RPC request after `initialize`; inside the Tensor repo,
230
+ The tables below are the complete list. Inside the Tensor repo,
158
231
  `listRegisteredToolNames()` in `tools.ts` derives the same list. Neither this
159
232
  file nor any other states a tool count, because a typed count is the first
160
233
  thing to go stale.
161
234
 
162
- ### Rollups, quotes, sync & search
235
+ **A connection is shown the tools it can use, not all of them** (since 5.7.0).
236
+ A `tools/list` answers with the tools whose scope the credential carries and
237
+ its person's role can exercise: a key with only `tensor:todos:read` sees the
238
+ todo reads and the four tools that need no scope (`get_guide`, `whoami`,
239
+ `search_records`, `list_trash`), and a key pinned to `tensor:role:read-only` sees no write
240
+ tool whatever scopes it carries. The list comes from `whoami`'s `effectiveScopes`, asked of
241
+ Tensor once when the stdio server starts and on every `tools/list` from the
242
+ hosted endpoint. When Tensor cannot answer (an older instance, no answer in five
243
+ seconds), every tool is listed and one the credential cannot use answers 403
244
+ naming the scope, as before. Restart the stdio server after changing a
245
+ connection's scopes.
246
+
247
+ **A permanent delete takes two calls** (since 5.8.0). `delete_position`,
248
+ `delete_entity`, `delete_account`, `delete_asset`, `delete_institution`,
249
+ `delete_entity_type`, `delete_role_type`, `delete_account_type`,
250
+ `delete_asset_class`, `delete_bookmark_folder`, `delete_todo_tag` and
251
+ `delete_entity_group` (since 5.10.0) destroy
252
+ rows no Trash brings back. The first call deletes nothing: it answers
253
+ `NOT DELETED.` with a preview of what would go (the record, the rows deleted
254
+ with it, the rows unhooked from it) and a one-time `confirmToken`. Show the
255
+ person the preview; only after they agree, call the same tool again with the
256
+ same `id` and that `confirmToken` (good for ten minutes, once). A record other
257
+ records still use is refused outright with what is using it. The soft deletes
258
+ (`delete_todo`, `delete_idea`, `delete_file`, `delete_bookmark`,
259
+ `delete_tab_group`, …) are one call, because Trash can undo them.
260
+
261
+ **A list answers a page** (since 6.0.0). The paged `list_*` tools and
262
+ `browse_files` return `{ items, hasMore, nextOffset }`: 100 rows unless you pass
263
+ `limit` (at most 1000), and `nextOffset` is the `offset` of the next page, or
264
+ `null` on the last one. `list_files` (the export manifest) and the lists that
265
+ are small by nature (states, tags, folders, catalogs) still return the array.
266
+
267
+ ### Guide and identity
268
+
269
+ | Tool | Description |
270
+ |------|-------------|
271
+ | `get_guide` | How to use Tensor well, by topic (see "The agent guide"); answered by the server, needs no scope |
272
+ | `whoami` | Who the connection is: the person (user id, username, role), the organization (name, base currency, timezone), the credential and the name it was given, the scopes it carries, the scopes it can use (`effectiveScopes`) and its rate limit. Needs no scope |
273
+
274
+ ### Rollups, quotes, sync, search & Trash
163
275
 
164
276
  | Tool | Description |
165
277
  |------|-------------|
@@ -168,14 +280,31 @@ thing to go stale.
168
280
  | `verify_market_quote` | Resolve one symbol to a live price without writing |
169
281
  | `sync_prices` | Reprice every linked asset (or a subset) |
170
282
  | `sync_asset_price` | Reprice one asset |
171
- | `list_changes` | Creates, updates and deletes since a timestamp. You see only the types your scopes read: the ledger under `tensor:portfolio:read`, every other surface under its own read scope; memos, links, tags, loan and fund terms, FX and organisation settings never |
283
+ | `list_changes` | Creates, updates and deletes since a timestamp. You see only the types your scopes read: the ledger under `tensor:portfolio:read`, every other surface under its own read scope; memos, links, tags and organisation settings never |
172
284
  | `search_records` | Site-wide ranked search across every record type; lanes are gated per read scope, so the key sees exactly its slice. Memos are the one lane no scope opens — they are session-only |
285
+ | `list_trash` | Everything in Trash across the surfaces your scopes read (todos, ideas, files, bookmarks, tab groups), newest deletion first, with when each is purged. Restore through the surface's own tool; emptying Trash stays with a person |
286
+
287
+ ### Funds, loans & FX (read only)
288
+
289
+ Changing any of these stays in Tensor's web app.
290
+
291
+ | Tool | Description |
292
+ |------|-------------|
293
+ | `list_fund_performance` | Every fund LP position's paid-in, distributions, unfunded commitment, DPI/RVPI/TVPI, IRR or TWR and NAV freshness, with its terms; the same fold as the Portfolio page's fund card |
294
+ | `get_fund_performance` | One fund position's performance and terms |
295
+ | `list_fund_terms` | Every fund position's descriptive terms, without figures |
296
+ | `get_fund_terms` | One fund position's terms |
297
+ | `list_loan_terms` | Every private loan's borrower, rate and dates |
298
+ | `get_loan_terms` | One loan's terms |
299
+ | `list_fx_rates` | The organization's exchange rates to USD, with their source and age |
173
300
 
174
301
  ### Portfolio
175
302
 
176
303
  | Tool | Description |
177
304
  |------|-------------|
178
305
  | `list_entities` | List all entities (people, trusts, companies) |
306
+ | `get_entity` | One entity by id, the row `list_entities` returns |
307
+ | `get_entity_overview` | One entity's accounts, active positions and totals by asset class, in one call |
179
308
  | `create_entity` | Create a new entity |
180
309
  | `update_entity` | Update an entity |
181
310
  | `delete_entity` | Delete an entity |
@@ -183,7 +312,12 @@ thing to go stale.
183
312
  | `create_entity_relationship` | Link two entities |
184
313
  | `update_entity_relationship` | Update a relationship |
185
314
  | `delete_entity_relationship` | Remove a relationship |
315
+ | `list_entity_groups` | Named sets of entities, with their member ids |
316
+ | `create_entity_group` | Create a group |
317
+ | `update_entity_group` | Rename it, or replace its members (`entityIds` is the whole list) |
318
+ | `delete_entity_group` | Delete a group; its entities stay. Two calls, like the other permanent deletes |
186
319
  | `list_accounts` | List all accounts |
320
+ | `get_account` | One account by id |
187
321
  | `create_account` | Create a new account |
188
322
  | `update_account` | Update an account |
189
323
  | `delete_account` | Delete an account |
@@ -195,6 +329,8 @@ thing to go stale.
195
329
  | `list_asset_prices` | List historical prices |
196
330
  | `update_asset_price` | Record a new price |
197
331
  | `list_positions` | List all positions |
332
+ | `get_position` | One position by id |
333
+ | `get_position_overview` | One position with its newest transactions and valuations, and a loan's or fund's terms and performance, in one call |
198
334
  | `create_position` | Open a new position. Pass `costBasis` instead of `quantity`/`averageCost` to open a fund capital account |
199
335
  | `update_position` | Update a position |
200
336
  | `delete_position` | **Destructive.** Hard-deletes the position *and* its whole ledger and history — see above |
@@ -205,6 +341,7 @@ thing to go stale.
205
341
  | `list_position_events` | Valuation-event history for one position |
206
342
  | `list_events` | Valuation-event history across all positions |
207
343
  | `list_transactions` | List all transactions |
344
+ | `get_transaction` | One ledger row by id |
208
345
  | `create_transaction` | Append to the ledger. **Permanent** — no edit, no delete; `amount`/`quantity` are positive magnitudes and direction comes from the type |
209
346
 
210
347
  ### Reference Data
@@ -238,6 +375,7 @@ thing to go stale.
238
375
  |------|-------------|
239
376
  | `data_dry_run` | Step 1: validate a typed batch (`batchId` + ops) and get a persisted preview with a `requestHash` |
240
377
  | `data_apply` | Step 2: execute the persisted dry-run by `batchId` + `requestHash` + confirm sentinel (never takes fresh ops) |
378
+ | `get_data_batch` | Read a batch back by `batchId` (its preview or result and `requestHash`), to pick up after a dropped connection. Needs `tensor:data:read` |
241
379
 
242
380
  ### Files
243
381
 
@@ -246,7 +384,7 @@ The full feature: browse, upload (presign → PUT → confirm), organize, link,
246
384
  | Tool | Scope | Description |
247
385
  |------|-------|-------------|
248
386
  | `list_files` | `tensor:files:read` | Export manifest for backup/mirroring: human folder/filename paths, checksums, and — with `urls` — short-lived presigned download URLs. Encrypted files also release a per-file key when a registered `deviceId` is passed |
249
- | `browse_files` | `tensor:files:read` (+ the target's read scope for `targetType`, and per row for `links`) | Folder/Trash-aware listing the way the Files page reads: by folder, attached record, or title/filename search, in any of the page's eight orders (`sort`). `targetType` reads the `links` table since the 2026-08 fold, so a todo, idea or memo target is a question it can answer. Links to records your key cannot read are omitted |
387
+ | `browse_files` | `tensor:files:read` (+ the target's read scope for `targetType`, and per row for `links`) | Folder/Trash-aware listing the way the Files page reads: by folder, attached record (with `withDescendants`, the records beneath it too), or title/filename search, in any of the page's eight orders (`sort`). `targetType` reads the `links` table since the 2026-08 fold, so a todo, idea or memo target is a question it can answer. Links to records your key cannot read are omitted |
250
388
  | `get_file` | `tensor:files:read` | One file's metadata and attachment links. Links to records your key cannot read are omitted |
251
389
  | `create_file_upload_url` | `tensor:files:write` | Step 1 of the upload: presigned PUT URL + storage key (obey the echoed encryption terms) |
252
390
  | `confirm_file_upload` | `tensor:files:write` (+ each `links` target's read scope) | Step 3: confirm the object landed and create the file row (+ links) in one transaction. The optional `links` array takes the same target types as `attach_file_link` — the six ledger records plus todo, idea and memo, never `file` — and since 2026-08 a target your key cannot read fails the confirm with a `403` rather than being attached quietly |
@@ -271,7 +409,7 @@ Bodies and comments are TipTap JSON, never HTML — the write tools take plain t
271
409
  | `list_todos` | `tensor:todos:read` | List todos with server-side filters (state, category, assignee, priority, tag, parent, linked record, search, `trash`) and sort. `assigneeId` and `tagId` take one id or several |
272
410
  | `get_todo` | `tensor:todos:read` | One todo: body, state, canonical tags, links, sub-task counts. Links to records your key cannot read are omitted |
273
411
  | `get_todo_subtree` | `tensor:todos:read` | The branch under a todo — counts and depth, for naming what a delete or a re-parent takes with it |
274
- | `get_todo_activity` | `tensor:todos:read` | Activity feed, folded from the mutation audit log — a rolling 90-day window, not permanent history |
412
+ | `get_todo_activity` | `tensor:todos:read` | Activity feed, folded from the mutation audit log — a rolling one-year window (past 90 days an entry says what changed, not to what), not permanent history |
275
413
  | `create_todo` | `tensor:todos:write` + each `links` target's read scope | Create a todo (plain-text `body`, wrapped to TipTap JSON; `stateId` from `list_todo_states`). The optional `links` array takes the same target types as `attach_todo_link` — the six ledger records plus todo, idea and memo, never `file` — and a target your key cannot read fails the create with a `403` rather than being dropped |
276
414
  | `update_todo` | `tensor:todos:write` | Partial update; optional stale-write guard via `expectedUpdatedAt` |
277
415
  | `delete_todo` | `tensor:todos:write` | Move the todo **and its whole branch** to Trash, atomically. Soft; `restore_todo` undoes it, and Trash self-empties after 60 days |
@@ -299,21 +437,25 @@ Bodies and comments are TipTap JSON, never HTML — the write tools take plain t
299
437
 
300
438
  ### Ideas
301
439
 
302
- The capture inbox. An idea's body is a TipTap document since 4.2.0 — plain text in via `body`, plain text back out, with `bodyJson` alongside on reads; its comments are the same; its media are file rows behind the same upload machinery as Files. Delete is a restorable Trash; the purge and comment deletion are session-only. Since 4.1.0 an idea's record links are here too, the same three verbs the todo and file surfaces already had.
440
+ The capture inbox. An idea's body is a TipTap document since 4.2.0 — plain text in via `body`, plain text back out, with `bodyJson` alongside on reads; its comments are the same; its media are file rows behind the same upload machinery as Files. Delete is a restorable Trash; the purge and comment deletion are session-only. Since 4.1.0 an idea's record links are here too, the same three verbs the todo and file surfaces already had. Since 5.6.0 an idea can be **archived** — done with, kept on file: it leaves the active stream, never expires, and is still readable by id and found by search. Archive is not Trash.
303
441
 
304
442
  | Tool | Scope | Description |
305
443
  |------|-------|-------------|
306
- | `list_ideas` | `tensor:ideas:read` (+ the target's read scope for `targetType`) | The stream — filter by kind, tag, site, search, linked record; order it with `sort` (4.3.0); or, with `trash`, the deleted rows |
444
+ | `list_ideas` | `tensor:ideas:read` (+ the target's read scope for `targetType`) | The active stream — filter by kind, tag, site, search, linked record; order it with `sort` (4.3.0); with `archived` (5.6.0), the archived ideas instead; with `trash`, the deleted rows. Archived ideas are left out by default |
307
445
  | `get_idea` | `tensor:ideas:read` | One idea with tags and media gallery |
308
446
  | `create_idea` | `tensor:ideas:write` | Capture (needs a url, some text, or media; duplicate URLs are flagged, not refused). `body` is plain text in, document stored |
309
447
  | `update_idea` | `tensor:ideas:write` | Partial update; `tags` replaces, `media` appends, `body` REPLACES the whole body document |
310
448
  | `delete_idea` | `tensor:ideas:write` | Move to Trash. Soft — restorable; the purge is UI-only |
311
- | `restore_idea` | `tensor:ideas:write` | Restore from Trash |
449
+ | `restore_idea` | `tensor:ideas:write` | Restore from Trash, on the side of the archive it was deleted from |
450
+ | `archive_idea` | `tensor:ideas:write` | Archive: off the active stream, kept for good (5.6.0). Idempotent; an idea in Trash is a `409` |
451
+ | `unarchive_idea` | `tensor:ideas:write` | Back into the active stream (5.6.0). Idempotent; an idea in Trash is a `409` |
452
+ | `get_idea_activity` | `tensor:ideas:read` | Activity feed, folded from the mutation audit log — who changed the idea, through which client and why; a rolling one-year window (past 90 days an entry says what changed, not to what), not permanent history |
312
453
  | `list_idea_comments` | `tensor:ideas:read` | The comment thread |
313
454
  | `create_idea_comment` | `tensor:ideas:write` | Comment (plain text, stored as TipTap JSON) |
314
455
  | `update_idea_comment` | `tensor:ideas:write` | Edit your own comment — comments are never deletable here |
315
- | `list_idea_tags` | `tensor:ideas:read` | Every tag in use, with counts |
316
- | `list_idea_sites` | `tensor:ideas:read` | Every source site, with counts |
456
+ | `list_idea_tags` | `tensor:ideas:read` | Every tag in use on the active ideas, with counts; on the archived ones with `archived` |
457
+ | `list_idea_sites` | `tensor:ideas:read` | Every source site among the active ideas, with counts; among the archived ones with `archived` |
458
+ | `list_idea_kinds` | `tensor:ideas:read` | Every kind (link, note, image, …) among the active ideas, with counts; among the archived ones with `archived` |
317
459
  | `get_idea_media_url` | `tensor:ideas:read` **+ `tensor:files:read`** | Presigned URL (+ key release for encrypted media) for one gallery object; access-logged. An idea's media IS a file row, and the key release is permanent, so the files read scope is required too |
318
460
  | `create_idea_upload_url` | `tensor:ideas:write` | Presign a media upload; confirm it via `create_idea` / `update_idea` `media` |
319
461
  | `list_idea_links` | `tensor:ideas:read` + the target's read scope | Records the idea is linked to — the six ledger records plus a todo, another idea or a memo (a file too, if a `related` edge exists; the gallery is `get_idea` → `media`). Each row's `kind` says whether a person made it (`related`) or the reconciler did (`mention`). Rows your key cannot read are omitted rather than refused, memos for every key |
@@ -330,11 +472,13 @@ The filed half of Web: pages somebody decided to keep, in a folder tree. `/api/b
330
472
  | `get_bookmark` | `tensor:bookmarks:read` | One bookmark, with the `normalizedUrl` duplicate detection compares |
331
473
  | `create_bookmark` | `tensor:bookmarks:write` | File a page. Only `url` is required; no folder means unfiled, which is a resting state |
332
474
  | `update_bookmark` | `tensor:bookmarks:write` | Partial update — title, url, folder, excerpt, favicon. `folderId: null` unfiles |
475
+ | `move_bookmark` | `tensor:bookmarks:write` | Move into another folder and/or to a place in the order, next to a named neighbour (`beforeId` / `afterId`), or to the end |
333
476
  | `delete_bookmark` | `tensor:bookmarks:write` | Move to Trash. Soft — restorable; the purge is UI-only |
334
477
  | `restore_bookmark` | `tensor:bookmarks:write` | Restore, back into the folder it was filed in |
335
478
  | `list_bookmark_folders` | `tensor:bookmarks:read` | The folder tree, parents before children and siblings in the owner's order — keep it rather than sorting by name |
336
479
  | `create_bookmark_folder` | `tensor:bookmarks:write` | Create a folder, optionally nested |
337
480
  | `update_bookmark_folder` | `tensor:bookmarks:write` | Rename or re-parent. A cycle or a depth ceiling refuses with `409` saying which |
481
+ | `move_bookmark_folder` | `tensor:bookmarks:write` | Move under another folder and/or to a place among its siblings; the same `409`s |
338
482
  | `delete_bookmark_folder` | `tensor:bookmarks:write` | Destroy the folder and nothing else: its bookmarks are unfiled, its sub-folders promoted. No undo — a folder is a filing decision, not a Trash surface |
339
483
 
340
484
  ### Tab groups
@@ -343,10 +487,11 @@ Tabs parked from the browser extension, kept together and in order. Scoped SEPAR
343
487
 
344
488
  | Tool | Scope | Description |
345
489
  |------|-------|-------------|
346
- | `list_tab_groups` | `tensor:tabs:read` | Every group, hydrated with its tabs. Starred first, then newest first. `limit`/`offset` page the groups; a group's tabs are never truncated |
490
+ | `list_tab_groups` | `tensor:tabs:read` | Every group of the person the credential belongs to (groups are personal), hydrated with its tabs. Starred first, then newest first. `limit`/`offset` page the groups; a group's tabs are never truncated |
347
491
  | `get_tab_group` | `tensor:tabs:read` | One group with its tabs in order |
348
492
  | `create_tab_group` | `tensor:tabs:write` | Park 1–500 tabs as one group. One call carries the whole group — the rate limit makes per-tab posting unworkable |
349
- | `update_tab_group` | `tensor:tabs:write` | `name`, `locked`, `starred` — and deliberately not the tabs, so "which tabs did I have" stays answerable from the audit trail |
493
+ | `update_tab_group` | `tensor:tabs:write` | `name`, `locked`, `starred`; tabs arrive through `add_tabs_to_group` |
494
+ | `add_tabs_to_group` | `tensor:tabs:write` | Append 1–500 tabs to an existing group in one call. A trashed group is a `404` until restored |
350
495
  | `delete_tab` | `tensor:tabs:write` | Remove one tab from a live group. Immediate; the group is the recoverable unit |
351
496
  | `delete_tab_group` | `tensor:tabs:write` | Move the whole group to Trash. Soft — restorable; the purge is UI-only |
352
497
  | `restore_tab_group` | `tensor:tabs:write` | Restore the group, tabs and all |
@@ -357,7 +502,7 @@ Your API key needs the following Tensor scopes, attached when the key is created
357
502
 
358
503
  | Scope | Grants |
359
504
  |-------|--------|
360
- | `tensor:portfolio:read` | Read entities, accounts, assets, positions, transactions, events, relations — plus the portfolio summary, change feed, and market-quote lookups |
505
+ | `tensor:portfolio:read` | Read entities, entity groups, accounts, assets, positions, transactions, events, relations — plus the portfolio summary, fund performance, loan and fund terms, FX rates, the change feed and market-quote lookups |
361
506
  | `tensor:portfolio:write` | Create/update/delete portfolio resources, sell-all, record a price, trigger a price sync |
362
507
  | `tensor:reference:read` | Read institutions, entity types, role types, account types, asset classes |
363
508
  | `tensor:reference:write` | Create/update/delete reference data |
@@ -366,17 +511,17 @@ Your API key needs the following Tensor scopes, attached when the key is created
366
511
  | `tensor:todos:read` | Read todos, subtrees, activity, comments, workflow states, canonical tags and record links. A link row also needs its target type's own read scope; the attached-files list needs `tensor:files:read` outright |
367
512
  | `tensor:todos:write` | Create/update todos, soft-delete to Trash and restore, reorder/re-parent, comments, canonical tags, states, attachments. Attaching or linking also needs the other end's read scope; the Trash purge and comment deletion are not reachable at all |
368
513
  | `tensor:ideas:read` | Read the ideas stream, tag/site rails, comments and record links. **Not media URLs on their own** — an idea's media is a file row and that route releases its decryption key, so `get_idea_media_url` needs `tensor:files:read` as well |
369
- | `tensor:ideas:write` | Capture/update ideas, soft-delete to Trash and restore, comments, media uploads and record links. A link write also needs the target's read scope; the Trash purge and comment deletion are not reachable at all |
514
+ | `tensor:ideas:write` | Capture/update ideas, archive and unarchive, soft-delete to Trash and restore, comments, media uploads and record links. A link write also needs the target's read scope; the Trash purge and comment deletion are not reachable at all |
370
515
  | `tensor:bookmarks:read` | Read filed bookmarks and the bookmark folder tree. The tree is a sibling resource of `/api/bookmarks`, not a sub-path, and this one scope opens both |
371
516
  | `tensor:bookmarks:write` | Create/update bookmarks, move them between folders, folder create/rename/re-parent/delete, soft-delete to Trash and restore. The purge is not reachable at all |
372
517
  | `tensor:tabs:read` | Read tab groups and the tabs inside them. **Separate from `tensor:bookmarks:read` on purpose** — a synced group is in effect a partial browsing history, so a key issued to read the pages you filed does not also read every page you parked |
373
- | `tensor:tabs:write` | Create a group with its tabs, rename/lock/star, remove a tab, soft-delete a group to Trash and restore it. The purge is not reachable at all |
374
- | `tensor:data:read` | Retrieve a persisted dry-run batch |
518
+ | `tensor:tabs:write` | Create a group with its tabs, add tabs to it, rename/lock/star, remove a tab, soft-delete a group to Trash and restore it. The purge is not reachable at all |
519
+ | `tensor:data:read` | Read back a persisted dry-run or apply batch (`get_data_batch`) |
375
520
  | `tensor:data:dry_run` | Run data pipeline dry-runs |
376
521
  | `tensor:data:apply` | Apply data pipeline operations |
377
522
  | `tensor:data:admin` | Reserved; no endpoint requires it today |
378
523
 
379
- `search_records` needs no scope of its own — each result lane requires that domain's read scope, lanes the key does not cover are silently omitted, and a key covering no lane gets 403.
524
+ `search_records` needs no scope of its own — each result lane requires that domain's read scope, lanes the key does not cover are silently omitted, and a key covering no lane gets 403. `list_trash` works the same way, one lane per Trash. `whoami` needs none either: it answers about the credential, not the organization's records.
380
525
 
381
526
  The Tensor user who issued the key is the ceiling: a key can never do more than that user could do in the browser.
382
527
 
@@ -384,6 +529,209 @@ The Tensor user who issued the key is the ceiling: a key can never do more than
384
529
 
385
530
  Newest first. A tool rename or removal is a MAJOR bump; new tools and new optional inputs are MINOR (`docs/contract/MCP.md` §6).
386
531
 
532
+ ### 6.1.0 — Saying why, and working beside other agents
533
+ New optional inputs only; no tool is renamed or removed and no scope changes.
534
+
535
+ - **Every write tool takes `reason`**: one sentence, at most 200 characters,
536
+ sent as `X-Tensor-Reason`. Tensor keeps it with the write for a year and
537
+ shows it, quoted, beside the change in Activity and the change log.
538
+ - **The agent's own name**: `TENSOR_AGENT_NAME` (stdio) or the
539
+ `X-Tensor-Agent` header (hosted) is sent on every call, for agents sharing
540
+ one key. Tensor prints it as a claim beside the key's name.
541
+ - **Stale writes refused**: `update_entity`, `update_account`, `update_asset`,
542
+ `update_institution`, `update_position` and `update_idea` take
543
+ `expectedUpdatedAt`, as `update_todo` did. A record that changed meanwhile
544
+ answers 409 `stale_write` with the current record and who changed it, and
545
+ the tool says what to do about it.
546
+ - **`list_changes` says who**: each change carries `via` (kind, name, door,
547
+ tool, the name the agent called itself, and the credential's `ref`) and
548
+ `reason`. New filters: `excludeSelf`, `via` (`agent`, `web`, `app`, `key`,
549
+ `oauth`, `system`) and `actor` (one credential's `ref`).
550
+ - A write's answer now names the client that made it in `changedVia`
551
+ (and `createdVia` on a create), instead of the one before.
552
+ - **One new read tool, `get_idea_activity`** (`tensor:ideas:read`): an idea's feed, the
553
+ twin of `get_todo_activity` — the latest 50 entries of who changed it,
554
+ through which client, and why.
555
+
556
+ ### 6.0.0 — Shorter tool list, pages, and one call per question
557
+ **Breaking:** the paged list tools answer `{ items, hasMore, nextOffset }`
558
+ instead of a bare array, and ask for 100 rows by default (the REST default is
559
+ 500). That covers `list_entities`, `list_entity_relationships`,
560
+ `list_accounts`, `list_assets`, `list_asset_prices`, `list_positions`,
561
+ `list_position_events`, `list_events`, `list_position_relations`,
562
+ `list_transactions`, `browse_files`, `list_todos`, `list_ideas`,
563
+ `list_bookmarks` and `list_tab_groups`. A saved script that reads the array
564
+ must read `items`. No tool is renamed or removed and no scope changes.
565
+
566
+ - **Descriptions say only what changes what an agent does.** Every tool's
567
+ description and the long input descriptions were rewritten; the rules that
568
+ hold across tools (paging, plain-text bodies, link scopes, download links,
569
+ retries) are said once in the initialize instructions instead of in each
570
+ tool. A description no longer names its scope: a credential is shown only
571
+ the tools its scopes reach, and a 403 names the missing one. A full
572
+ `tools/list` went from 152 KB for 148 tools to 104 KB for 164.
573
+ - **Load less**: `TENSOR_MCP_READ_ONLY=1` lists only the tools that read, and
574
+ `TENSOR_MCP_TOOLSETS=ledger,work` (any of `ledger`, `work`, `files`, `web`)
575
+ only those halves of Tensor; the hosted `/mcp` takes the headers
576
+ `X-Tensor-Read-Only` and `X-Tensor-Toolsets`. See "Configuration".
577
+ - **One call per question**: `get_entity_overview` (an entity, its accounts,
578
+ its active positions and its totals) and `get_position_overview` (a position,
579
+ its newest transactions and valuations, and its loan or fund terms and
580
+ performance).
581
+ - **Faster to serve**: the tool definitions and their JSON schemas are built
582
+ once per process instead of once per request, and `tools/list` leaves out the
583
+ two fields every client reads as their default (`$schema` and
584
+ `execution.taskSupport`).
585
+
586
+ ### 5.10.0 — One record by id, the tools that were missing, and Tensor's logo
587
+ - **One record by id**: `get_entity`, `get_account`, `get_position` and
588
+ `get_transaction` read the row the list returns, without paging the list
589
+ (new routes `GET /api/{entities,accounts,positions,transactions}/:id`).
590
+ - **Tools for routes a key could already call**: `list_entity_groups`,
591
+ `create_entity_group`, `update_entity_group`, `delete_entity_group`;
592
+ `get_data_batch` (read a dry-run or apply batch back after a dropped
593
+ connection); `list_trash` (one Trash across every surface your scopes read);
594
+ `list_idea_kinds`; `move_bookmark` and `move_bookmark_folder` (order and
595
+ place, which `update_*` could not set); `add_tabs_to_group`.
596
+ - **`browse_files` takes `withDescendants`**: with a target, also the files on
597
+ the records beneath it, as a record's Files tab shows them, each marked with
598
+ `via`. A row beneath that your key cannot read is left out.
599
+ - **`delete_entity_group` takes two calls**, like the other permanent deletes:
600
+ a group has no Trash.
601
+ - `move_*` tools are marked destructive and idempotent, like `reorder_*`.
602
+
603
+ The server also introduces itself the way the 2025-11-25 MCP spec allows:
604
+ `serverInfo` carries the display name **Tensor** (`title`), a one-line
605
+ `description`, `websiteUrl` and `icons` (an SVG and 32px and 180px PNGs on
606
+ tensor.levitating.org). Clients that show servers by these fields (a connector
607
+ list, an install prompt) show Tensor and its logo instead of the bare id
608
+ `tensor`, which stays as `name`. The stdio package and the hosted `/mcp` send
609
+ the same object. Nothing is renamed or removed; a client that predates a field
610
+ ignores it.
611
+
612
+ ### 5.9.0 — Funds, loans and FX can be read
613
+ Seven new tools, all read-only under `tensor:portfolio:read`. Nothing is
614
+ renamed or removed and no scope changes.
615
+
616
+ - **`list_fund_performance` / `get_fund_performance`**: a fund LP position's
617
+ performance (paid-in, distributions, unfunded commitment, DPI/RVPI/TVPI, IRR
618
+ for a closed-end fund or time-weighted return for an open-end one, NAV and its
619
+ staleness) and its terms, folded on the server by the same code as the fund
620
+ card in Tensor's Portfolio page. Figures are in the position's currency.
621
+ - **`list_fund_terms` / `get_fund_terms`**, **`list_loan_terms` /
622
+ `get_loan_terms`**, **`list_fx_rates`**: the terms and rates behind them.
623
+ Changing any of them stays in the web app.
624
+ - **`list_changes`** now includes changes to loan terms, fund terms and FX
625
+ rates for a key with `tensor:portfolio:read`.
626
+
627
+ ### 5.8.0 — A permanent delete asks the person first
628
+ No tool is renamed or removed and no scope changes. Eleven tools gain an
629
+ optional input.
630
+
631
+ - **`confirmToken` on the eleven hard deletes** (`delete_position`,
632
+ `delete_entity`, `delete_account`, `delete_asset`, `delete_institution`,
633
+ `delete_entity_type`, `delete_role_type`, `delete_account_type`,
634
+ `delete_asset_class`, `delete_bookmark_folder`, `delete_todo_tag`). Tensor
635
+ now holds a key's or a third-party connection's hard delete for
636
+ confirmation (DEVELOPER_API.md §5.5): the first call returns `NOT DELETED.`, a
637
+ preview of what would go and a `confirmToken`; the second call, with that
638
+ token, deletes. See "Available Tools".
639
+ - **A delete other records block is refused with the reason** (`delete_blocked`
640
+ and the records in `preview.blockedBy`) instead of an anonymous "Unable to
641
+ complete request."
642
+ - **What changes for an existing caller:** an older stdio package cannot pass a
643
+ `confirmToken`, so against a Tensor that holds these deletes it cannot
644
+ complete one: update to 5.8.0. The hosted endpoint is always current.
645
+ - `delete_todo_tag` now reaches only a todo's tag: another surface's tag id is
646
+ 404, where it used to delete that tag from every record on its surface.
647
+
648
+ ### 5.7.0 — Who am I, and only the tools that can work
649
+ One new tool and a shorter tool list. Nothing is renamed or removed and no
650
+ scope changes.
651
+
652
+ - **New tool `whoami`** (no scope), over the new `GET /api/v1/whoami`: the
653
+ person (user id, username, role), the organization (name, base currency,
654
+ timezone), the credential (an API key; an OAuth connection with the name the
655
+ organization gave it; a Tensor app; a browser session), the scopes it carries
656
+ (`scopes`), the scopes it can actually use after the person's role
657
+ (`effectiveScopes`) and its rate limit. "List my todos" now works:
658
+ `list_todos` takes the user id as `assigneeId`.
659
+ - **`tools/list` shows only the tools the credential can use**, on both
660
+ transports: the tools whose scope is in `effectiveScopes`, plus `get_guide`,
661
+ `whoami` and `search_records`, which need none. A narrow key no longer puts
662
+ every tool's description in the agent's context, and an agent no longer
663
+ calls a tool that can only answer 403. See "Available Tools".
664
+ - **What changes for an existing caller:** a tool the credential could never
665
+ use is gone from its list. Over the hosted endpoint a call to one still
666
+ reaches Tensor and answers 403 naming the scope, so a client holding an older
667
+ list loses nothing. The stdio server asks once at start: restart it after
668
+ re-scoping a connection. If Tensor cannot answer, every tool is listed, as in
669
+ 5.6.0.
670
+
671
+ ### 5.6.0 — Ideas can be archived
672
+ Two new tools and two new optional inputs. Nothing is renamed or removed and no
673
+ scope changes.
674
+
675
+ - **`archive_idea`** and **`unarchive_idea`** (`tensor:ideas:write`). Archive
676
+ is "done with, kept on file": the idea leaves the active stream and never
677
+ expires. It is NOT the Trash — it keeps its tags, links, media and comments,
678
+ `get_idea` still reads it and `search_records` still finds it. Both tools
679
+ are idempotent (the side the idea is already on answers unchanged) and both
680
+ refuse an idea in the Trash with a `409`: `restore_idea` first, and it comes
681
+ back on the side it was deleted from.
682
+ - **`list_ideas` takes `archived`**: `true` lists the archived ideas instead
683
+ of the active stream. `list_idea_tags` and `list_idea_sites` take the same
684
+ input, so a count matches the list it filters.
685
+ - **What changes for an existing caller:** `list_ideas` without `archived`,
686
+ and the two rails, now leave archived ideas out. Nothing was archived before
687
+ this release (the column was cleared on every boot while Archive was
688
+ retired), so the answer only differs once someone archives an idea.
689
+ - `update_idea` still has no `archived` field and never will: archiving is
690
+ not an edit, and the REST `PATCH` answers `400` on the key.
691
+ - **The agent guide (5.5.0) knows about Archive**: the instructions, the
692
+ `work` and `safety` topics and the `triage_inbox` prompt now offer
693
+ `archive_idea` for an idea that is handled but worth keeping, and keep
694
+ `delete_idea` for one nobody wants, because Trash empties itself after 60
695
+ days and Archive never does.
696
+
697
+ ### 5.5.0 — The agent guide
698
+ Additive.
699
+
700
+ - **Server instructions**: the `initialize` response now tells the model what
701
+ Tensor is and the handful of rules that matter most (the ledger is
702
+ append-only, totals come from `get_portfolio_summary`, what is permanent,
703
+ what a 403 means).
704
+ - **New tool `get_guide`**, plus the same topics as `tensor://guide/<topic>`
705
+ resources, and three prompts: `record_statement`, `portfolio_review`,
706
+ `triage_inbox`. See "The agent guide".
707
+ - **An Agent Skill** ships in the package at `skills/tensor/SKILL.md`.
708
+ - **A rate-limited call says to wait.** Tensor answers a rate-limited
709
+ credential with a 403, and the tool error used to read it as a missing
710
+ scope. It now says to wait a minute and batch the work.
711
+ - Hosted `/mcp` only, no package change: one tool call is now one count
712
+ against the key's or connection's rate limit (it was two or more), a full
713
+ window answers 429 with `Retry-After`, and an OAuth connection now has a
714
+ limit of its own (600 a minute; Tensor's own apps exempt).
715
+
716
+ ### 5.4.0 — Annotations, safe retries, shorter answers
717
+ Additive; every tool keeps its name and its inputs.
718
+
719
+ - **Every tool carries MCP annotations** (`title`, `readOnlyHint`,
720
+ `destructiveHint`, `idempotentHint`, `openWorldHint`), so a client can let
721
+ the reads run and ask before a write. See "What a client can tell before it
722
+ calls".
723
+ - **New optional input `idempotencyKey`** on the writes a retry would
724
+ duplicate. The same value on a retry replays the first answer instead of
725
+ writing twice. See "Retrying a write safely".
726
+ - **Results are compact JSON**, no longer indented. Same fields, same values,
727
+ roughly a quarter fewer tokens.
728
+ - **A failed call says what to do next**: a missing scope names the scope and
729
+ where the user adds it, a rate limit says how long to wait, a server error
730
+ says to quote the `errorId`. The server's own answer follows unchanged.
731
+ - Wording: `list_tab_groups` says groups are personal (only the credential's
732
+ person's groups appear, since 2026-11-02), and `search_records` says the
733
+ browsing-history lane also answers the Safari extension inside the iOS app.
734
+
387
735
  ### 5.3.2 — zod 4
388
736
  Dependency only. The package now runs on zod `^4.6.7`, which stops validating
389
737
  an over-long array at `.max()` instead of filing an issue for every element
@@ -472,6 +820,10 @@ MCP tools never write `tag_catalog` or `tag_assignments` directly: the REST
472
820
  handlers validate scope and target type, then perform the canonical catalog and
473
821
  assignment writes transactionally.
474
822
 
823
+ ### 4.4.1 — README only
824
+ Republished so the npm page carries the README that says most people only need
825
+ the hosted `/mcp` endpoint. The code is byte-for-byte 4.4.0.
826
+
475
827
  ### 4.4.0 — `browse_files` can say what order it wants
476
828
  Additive, one optional input. `browse_files` takes **`sort`**, one of
477
829
  `modified_desc` / `modified_asc` / `added_desc` / `added_asc` / `name_asc` /
@@ -498,6 +850,10 @@ database's collation rather than a natural sort, so `Q10` comes before `Q9`; and
498
850
  an unrecognised value is ignored rather than refused — ordering is not a filter,
499
851
  so a bad one costs the default order and never an error.
500
852
 
853
+ 4.4.0 was also the first npm release since 1.0.0. It carried everything from
854
+ 1.4.0 onward to npm at once; the hosted `/mcp` had each change already, with
855
+ the deploy that shipped it.
856
+
501
857
  ### 4.3.0 — `list_ideas` can say what order it wants
502
858
  Additive, one optional input. `list_ideas` takes **`sort`**: `newest` (the
503
859
  default, and what every previous release did), `oldest`, `updated` (recently
@@ -605,3 +961,7 @@ Tensor's **Documents** feature was renamed to **Files** (2026-08), all the way d
605
961
  | Endpoint behind it | `GET /api/documents/manifest` | `GET /api/files/manifest` |
606
962
 
607
963
  There is no alias and no deprecation window — the old names are gone. **Existing API keys carrying `tensor:documents:read` must be re-issued with `tensor:files:read`**, and any prompt, script or saved workflow that calls `list_documents` by name has to be updated. Everything else in the tool set is unchanged.
964
+
965
+ ### 1.4.0 — Tools match the live routes
966
+ The tool set and the OpenAPI document were brought in line with the routes
967
+ already live at the time. Repository only; it reached npm inside 4.4.0.