Skip to content

fix(filesystem): declare openWorldHint on all tools#4480

Merged
olaservo merged 2 commits into
modelcontextprotocol:mainfrom
bryan-anthropic:fix/openworldhint-annotations
Jul 6, 2026
Merged

fix(filesystem): declare openWorldHint on all tools#4480
olaservo merged 2 commits into
modelcontextprotocol:mainfrom
bryan-anthropic:fix/openworldhint-annotations

Conversation

@bryan-anthropic

@bryan-anthropic bryan-anthropic commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Every tool in the filesystem server operates only on the local filesystem within its allowed directories — none reaches an open or external world — but none declared the MCP openWorldHint annotation, so open-world-hint coverage was 0/14. This sets openWorldHint: false on all 14 tools (alongside their existing readOnlyHint/idempotentHint/destructiveHint) and documents it in the README.

Why

MCP ToolAnnotations include openWorldHint to tell clients whether a tool interacts with an open/external world (e.g. web search, sending mail). A local filesystem server does not, so the correct value is an explicit false. Per the spec, an omitted openWorldHint defaults to true — clients are told to assume an open world — so these tools were implicitly declared open-world. Setting the hint explicitly to false corrects that implied default, makes the server's sandboxed, closed-world nature legible to clients, and satisfies annotation-coverage checks that flag the absent hint.

Changes

  • src/filesystem/index.ts: add openWorldHint: false to all 14 tools' annotations.
  • src/filesystem/README.md: document openWorldHint: false in the "Tool annotations (MCP hints)" section.

No behavior change. npm run build + npm test pass; a live tools/list now reports openWorldHint on 14/14 tools.

Related

🤖 Generated with Claude Code

Every filesystem tool operates only on the local filesystem within its allowed
directories — none reaches an open or external world — but none declared the
MCP `openWorldHint` annotation, leaving open-world-hint coverage at 0/14. Set
`openWorldHint: false` on all 14 tools and document it in the README's tool
annotations section.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bryan-anthropic

Copy link
Copy Markdown
Contributor Author

@olaservo @domdomegg — could I get a review on this when you have a chance? 🙏

@olaservo olaservo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@olaservo olaservo merged commit d31124c into modelcontextprotocol:main Jul 6, 2026
17 checks passed
@olaservo

Copy link
Copy Markdown
Member

Hi, just ran the npm release process for this change and its now live in https://www.npmjs.com/package/@modelcontextprotocol/server-filesystem/v/2026.7.10

@bryan-anthropic

Copy link
Copy Markdown
Contributor Author

@olaservo thank you!

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.

2 participants