Skip to content
This repository was archived by the owner on Jan 1, 2026. It is now read-only.

Conversation

@triepod-ai
Copy link

Summary

Adds MCP tool annotations (readOnlyHint, destructiveHint, openWorldHint) to all 7 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.

Changes

Tool Annotations Reason
contacts readOnlyHint: true, openWorldHint: true Only reads from Contacts app
notes destructiveHint: true, openWorldHint: true Can create notes
messages destructiveHint: true, openWorldHint: true Can send messages
mail destructiveHint: true, openWorldHint: true Can send emails
reminders destructiveHint: true, openWorldHint: true Can create reminders
calendar destructiveHint: true, openWorldHint: true Can create events
maps destructiveHint: true, openWorldHint: true Can save favorites/create guides
  • Bump MCP SDK from ^1.5.0 to ^1.7.0 for annotation support
  • Added title annotations for human-readable display

Why This Matters

  • Annotations provide semantic metadata that helps LLMs understand tool behavior
  • LLMs can make better decisions about when to use tools and in what order
  • Enables safer tool execution by distinguishing read-only from destructive operations
  • openWorldHint indicates tools interact with external Apple system apps

Testing

  • TypeScript type check passes (npx tsc --noEmit)
  • Build succeeds (npm run build)
  • Annotation values match actual tool behavior

Before/After

Before:

const CONTACTS_TOOL: Tool = {
  name: "contacts",
  description: "Search and retrieve contacts from Apple Contacts app",
  inputSchema: { ... }
};

After:

const CONTACTS_TOOL: Tool = {
  name: "contacts",
  description: "Search and retrieve contacts from Apple Contacts app",
  inputSchema: { ... },
  annotations: {
    title: "Search Contacts",
    readOnlyHint: true,
    openWorldHint: true
  }
};

🤖 Generated with Claude Code

web-flow and others added 2 commits December 29, 2025 10:42
Add readOnlyHint, destructiveHint, and openWorldHint annotations to all 7 tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to contacts tool (read-only search)
- Added destructiveHint: true to tools that can create/modify data:
  - notes (can create notes)
  - messages (can send messages)
  - mail (can send emails)
  - reminders (can create reminders)
  - calendar (can create events)
  - maps (can save favorites, create guides)
- Added openWorldHint: true to all tools (interact with Apple system apps)
- Added title annotations for human-readable display
- Bump MCP SDK from ^1.5.0 to ^1.7.0 for annotation support

This improves tool safety metadata for MCP clients.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Changed all 6 tools to destructiveHint=false:
- Manage Notes (search, list, create only)
- Manage Messages (send, read, schedule, unread only)
- Manage Mail (search, send, list only)
- Manage Reminders (list, search, create only)
- Manage Calendar (search, list, create only)
- Manage Maps (search, save, directions only)

None of these tools support DELETE operations, so they are
not destructive per MCP spec.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@triepod-ai
Copy link
Author

Fix: Corrected destructiveHint Semantics

Updated all 6 tools to destructiveHint: false because none of them support DELETE operations.

Operations Supported Per Tool

Tool Operations Delete?
Notes search, list, create
Messages send, read, schedule, unread
Mail search, send, list, mailboxes
Reminders list, search, create
Calendar search, list, create
Maps search, save, directions, pin

Per MCP spec: destructiveHint should only be true for operations that DELETE or DESTROY data. Since none of these tools support delete, all should be false.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants