Add missing idempotentHint and openWorldHint to server-filesystem #3402
Description
Activity
How we found this
This was discovered using AgentWard — an open-source MCP security scanner that enumerates tools via live JSON-RPC handshake and assesses risk levels, data access patterns, and annotation coverage.
Reproduce
pip install agentward # Create a minimal MCP config cat > /tmp/mcp_config.json << 'CONFIG' { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"] } } } CONFIG # Scan — enumerates all 14 tools, shows risk ratings and annotation coverage agentward scan /tmp/mcp_config.json # JSON output for programmatic use agentward scan /tmp/mcp_config.json --json
This server already has excellent annotation coverage — it's the only official server that annotates all its tools. We're referencing it as the gold standard in similar issues filed for the other servers (server-github #3399, server-memory #3400, server-everything #3401, server-sequential-thinking #3403).
- added a commit that references this issue
on Apr 8, 2026 I reduced this to a metadata-completeness bug rather than a broad security discussion.
The current gap seems to be:
- read-only filesystem tools already declare
readOnlyHint: true, but still omitidempotentHint: true - tools scoped to the configured allowed directories still omit
openWorldHint: false
That matters because many hosts use annotations as the deterministic boundary for retry and trust policy. Without those two hints, a host either under-retries safe reads or falls back to heuristics when deciding whether a tool is closed-world.
The smallest fix/test shape I would want is:
- add
idempotentHint: trueto the read-only tools - add
openWorldHint: falseto the filesystem tools bounded to allowed directories - add one metadata regression that enumerates every registered filesystem tool and asserts the annotation map
- add one focused assertion that write/edit/move tools do not become idempotent by accident
That keeps the scope narrow: no protocol changes, just making the server declare the retry/trust facts it already enforces.
- read-only filesystem tools already declare
- added 5 commits that reference this issue
on Oct 4, 2026
Request: Add missing tool annotations —
@modelcontextprotocol/server-filesystemv0.2.0Context
We ran an automated scan of this server via live JSON-RPC handshake. This server is the gold standard for tool annotations in the MCP ecosystem — it's the only official server that provides
readOnlyHint,destructiveHint, andidempotentHinton every tool.This issue is filed to acknowledge that, and to suggest two small additions that would make the coverage complete.
Current Annotation Coverage — 14/14 tools annotated
readOnlyHintdestructiveHintidempotentHintopenWorldHintread_filetrue✅read_text_filetrue✅read_media_filetrue✅read_multiple_filestrue✅write_filefalse✅true✅true✅edit_filefalse✅true✅false✅create_directoryfalse✅false✅true✅list_directorytrue✅list_directory_with_sizestrue✅directory_treetrue✅move_filefalse✅false✅false✅search_filestrue✅get_file_infotrue✅list_allowed_directoriestrue✅Every tool has
readOnlyHint. Every write tool hasdestructiveHint.edit_filecorrectly reportsidempotentHint: false. This is exactly what the MCP spec envisions.Suggested additions
Two small improvements to reach full annotation coverage:
1. Add
idempotentHintto read-only toolsAll 10 read-only tools currently omit
idempotentHint. Since reads are inherently idempotent, addingidempotentHint: truewould let clients safely implement automatic retries on failure.Affected tools:
read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directoriesExample — the change for
read_text_file:Same one-property addition for all 10 read-only tools.
2. Add
openWorldHint: falseto all toolsAll tools are scoped to allowed directories, making them closed-world by design. Explicitly marking
openWorldHint: falsecommunicates that the tool's behavior is fully determined by the configured directories, with no external side effects.Example — the change for
write_file:Why annotations matter — chaining risks in multi-server setups
This server is commonly installed alongside other MCP servers (GitHub, memory, email, shell). When agents use multiple servers together, tool annotations become the primary signal for distinguishing safe operations from risky ones:
write_file+ any input server → An agent receiving instructions from email or chat could be directed to overwrite files.destructiveHint: true(already present ✅) enables clients and emerging security tools to gate this regardless of the instruction source.read_media_file+ network server → Large base64-encoded files could be exfiltrated if an agent chains a file read into an outbound HTTP call.readOnlyHint: truehelps distinguish the safe local read from the risky outbound send.These composition risks are invisible when testing a server in isolation. Annotations are the metadata that makes them visible to downstream tooling as it matures.
This server as the ecosystem example
We're filing similar annotation requests on
server-memory(0/9 annotated),server-github(0/26 annotated),server-sequential-thinking(0/1), andserver-everything(0/13). In each of those issues, we referenceserver-filesystemas the example to follow.Thank you for setting the standard.
Found via automated scan with AgentWard. Enumerated via live JSON-RPC handshake, protocol
2025-11-25.