Skip to content

Conversation

@triepod-ai
Copy link

Summary

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

Changes

  • Added readOnlyHint: true to qdrant-find (read-only search tool)
  • Added destructiveHint: true to qdrant-store (data modification tool)
  • 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

Testing

  • All 24 tests pass
  • Ruff linter passes
  • Live verification: Created server instance and confirmed tools/list returns annotations:
    Tool Name            Title                ReadOnly   Destructive
    ------------------------------------------------------------
    qdrant-find          Find in Qdrant       True       N/A       
    qdrant-store         Store in Qdrant      N/A        True      
    

Before/After

Before:

self.tool(
    find_foo,
    name="qdrant-find",
    description=self.tool_settings.tool_find_description,
)

After:

self.tool(
    find_foo,
    name="qdrant-find",
    description=self.tool_settings.tool_find_description,
    annotations=ToolAnnotations(
        title="Find in Qdrant",
        readOnlyHint=True,
    ),
)

🤖 Generated with Claude Code

Add readOnlyHint and destructiveHint annotations to all tools
to help LLMs better understand tool behavior and make safer decisions.

Changes:
- Added readOnlyHint: true to qdrant-find (read-only search tool)
- Added destructiveHint: true to qdrant-store (data modification tool)
- Added title annotations for human-readable display

This improves tool safety metadata for MCP clients.

Co-Authored-By: Claude <[email protected]>
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