Read tools with compact transcript rows and tokenizer budgets (#14) #27
No reviewers
Labels
No labels
boundary:crosses
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/messages-mind-mcp!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-14-read-tools"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #14.
What this adds
The api process and its five read tools, over stateless Streamable HTTP with a bearer token:
messages_status,messages_chats,messages_recent,messages_searchandmessages_context.messagesmind api --config FILEbinds the one address that[server]states, on port 8420 unless the config sets another, and serves the one path/mcp(ADR 0011).[server]is now required for every verb.messages_searchreturns pointers and no text.messages_contextexpands a pointer.Security controls
Hostgets421and a foreignOrigingets403. The allow-lists of the guard are stated in code.FASTMCP_variable, or a.envfile in the working directory, changes a setting of the MCP framework. Such a setting can turn theHostandOriginchecks off.Error: code=<code>. No reply repeats an argument, a tool name that the caller sent, a file path or the message of a fault.|, so it cannot forge a row, a flag or a footer.Acceptance criteria of #14
tests/test_server.py, the four budget teststests/test_layout.py, the vocabulary hash and the offline loadermessages_searchreturns no body;messages_contextexpands a pointertests/test_views.pytests/test_server.pytests/test_views.pytests/test_views.py, for a received row and a sent rowPoints for the reviewer
tests/tokenizer/o200k_base.tiktokenis 3.6 MB. Its publisher states no licence for the file.tests/tokenizer/README.mdrecords its source and its SHA-256.isErrorfalse, as People Mind does it. The MCP specification asks forisErrortrue.Checks
make checkis green on macOS: 182 tests. Mutation runs prove that the tests for the log filter, the fault formatter and the framework-settings refusal fail when the control is removed.🤖 Generated with Claude Code