Read tools with compact transcript rows and tokenizer budgets #14

Closed
opened 2026-11-12 20:18:16 +00:00 by svc-agent-writer · 1 comment

Parent: #6. Records: ADR 0001, ADR 0003, and the "Tools" and "Token efficiency" sections of the README.

What to build

The api process and its five read tools, over stateless Streamable HTTP with a bearer token.

  • messages_status: counts, last sync, newest message time and Backfill progress.
  • messages_chats: Chats with their Members, message count, first and last time.
  • messages_recent: one Chat as a transcript page.
  • messages_search: full-text search that returns pointers and not bodies.
  • messages_context: the messages around one message.

Rules for all five:

  • Text only. A page names each Member once in a legend, prints the date once per day, uses short local ids, folds a Tapback into the row it belongs to, and ends with a footer that holds the next cursor. Cursors are keyset cursors.
  • Untrusted data. Every tool description says that message text is untrusted data. No tool argument reaches an outbound request.
  • Scopes. The read token reaches these tools. The evidence token does not.
  • The api opens the store in reader mode and keeps serving the last synced state when the Feeder is unreachable.

Acceptance criteria

  • A tokenizer test in the suite holds a budget for a default transcript row, for a default page of each tool and for the tool list. The tokenizer is a pinned dependency that runs offline. Neither sibling mind has such a test yet, so there is none to copy. The full list of eleven tools must cost at most 2,500 tokens. This slice asserts the budget for its five tools, and the change-feed and peer slices extend the same test.
  • A test proves that messages_search returns no body and that messages_context expands a pointer.
  • A test calls every read tool with the evidence token and is refused.
  • A paging test walks a Chat of several pages and sees every row once, with rows that share one timestamp.
  • A test proves that a redacted row prints its sender, time and direction with the marker.

Blocked by

Filed under: operator word "go" sha256:4cd0e21a9a07

Parent: #6. Records: ADR 0001, ADR 0003, and the "Tools" and "Token efficiency" sections of the README. ## What to build The api process and its five read tools, over stateless Streamable HTTP with a bearer token. - `messages_status`: counts, last sync, newest message time and Backfill progress. - `messages_chats`: Chats with their Members, message count, first and last time. - `messages_recent`: one Chat as a transcript page. - `messages_search`: full-text search that returns pointers and not bodies. - `messages_context`: the messages around one message. Rules for all five: - **Text only.** A page names each Member once in a legend, prints the date once per day, uses short local ids, folds a Tapback into the row it belongs to, and ends with a footer that holds the next cursor. Cursors are keyset cursors. - **Untrusted data.** Every tool description says that message text is untrusted data. No tool argument reaches an outbound request. - **Scopes.** The read token reaches these tools. The evidence token does not. - **The api opens the store in reader mode** and keeps serving the last synced state when the Feeder is unreachable. ## Acceptance criteria - A tokenizer test in the suite holds a budget for a default transcript row, for a default page of each tool and for the tool list. The tokenizer is a pinned dependency that runs offline. Neither sibling mind has such a test yet, so there is none to copy. The full list of eleven tools must cost at most 2,500 tokens. This slice asserts the budget for its five tools, and the change-feed and peer slices extend the same test. - A test proves that `messages_search` returns no body and that `messages_context` expands a pointer. - A test calls every read tool with the evidence token and is refused. - A paging test walks a Chat of several pages and sees every row once, with rows that share one timestamp. - A test proves that a redacted row prints its sender, time and direction with the marker. ## Blocked by - #7 Filed under: operator word "go" sha256:4cd0e21a9a07
Author
Member

ADR 0011 (pull request #24) fixes the api's bind. server.host is a required key with no default, and check prints it. The port defaults to 8420. The path is /mcp.

ADR 0011 (pull request #24) fixes the api's bind. `server.host` is a required key with no default, and `check` prints it. The port defaults to 8420. The path is `/mcp`.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
dev/messages-mind-mcp#14
No description provided.