You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1a7b9f9
Browse filesBrowse the repository at this point in the historyBrowse files
feat(filesystem): set idempotentHint and destructiveHint on the read-only tools
The ten read-only tools set only readOnlyHint and openWorldHint, so a
client reading idempotentHint or destructiveHint fell back to the spec's
defaults (not idempotent, destructive). Set both explicitly (true, false),
pin them in the tools/list table test, and add protocol-level invariants
every tool must keep: all four hints present, a read-only tool idempotent
and not destructive, none open-world. The README's annotation table now
shows them, and lists read_file.
Closes#3402
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: cliffhall <[email protected]>
Every read-only tool (`read_file`, `read_text_file`, `read_media_file`, `read_multiple_files`, `list_directory`, `list_directory_with_sizes`, `directory_tree`, `search_files`, `get_file_info` and `list_allowed_directories`) now also sets `idempotentHint: true` and `destructiveHint: false`, so all four tool annotation hints are explicit on every tool and a client never falls back to the spec's defaults (destructive, not idempotent).
> Note: `idempotentHint` and `destructiveHint`are meaningful only when `readOnlyHint` is `false`, as defined by the MCP spec. Every tool also sets `openWorldHint: false` — this server only accesses the local filesystem within its allowed directories, never an open or external world.
268
+
> Note: the MCP spec gives `idempotentHint` and `destructiveHint`meaning only when `readOnlyHint` is `false`, but every tool sets them anyway, so a client that reads them without checking `readOnlyHint` first still sees the truth: a read can be repeated safely and changes nothing. Every tool also sets `openWorldHint: false` — this server only accesses the local filesystem within its allowed directories, never an open or external world.
0 commit comments