Skip to content

feat(mcp): declare review_observations read-only - #61

Merged
jakewan merged 2 commits into
mainfrom
feature/annotate-read-only-tools
Oct 18, 2026
Merged

jakewan merged 2 commits into
mainfrom
feature/annotate-read-only-tools

Conversation

@jakewan

@jakewan jakewan commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Base access decisions on permission rather than exclusion.

— Saltzer & Schroeder

Overview

review_observations now declares itself read-only through the MCP readOnlyHint annotation, with openWorldHint: false since it reads only the local store. MCP's readOnlyHint defaults to false, so a client that gates writes treats an unannotated tool as a write: Claude Code's plan mode prompted before every review, and an allow rule could not stop it. record_observation stays unannotated, so the same gate still stands in front of every write.

A test pins the read/write classification of every exposed tool through a client session, so a tool added later has to be classified on purpose rather than inheriting the write default.

🤖 Generated with Claude Code

Clients that gate writes treat a tool without readOnlyHint as a write,
so every review prompted for approval. record_observation stays
unannotated.
The comment now names the MCP default it rests on, and the prose names
Claude Code plan mode rather than any approval prompt, which allow
rules already satisfy outside plan mode.
@jakewan
jakewan marked this pull request as ready for review October 18, 2026 19:03
@jakewan
jakewan merged commit 2573e3d into main Oct 18, 2026
4 of 5 checks passed
@jakewan
jakewan deleted the feature/annotate-read-only-tools branch October 18, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant