feat: Add tool annotations for improved LLM tool understanding#101
Open
bryankthompson wants to merge 1 commit intoMarkusPfundstein:mainfrom
Open
feat: Add tool annotations for improved LLM tool understanding#101bryankthompson wants to merge 1 commit intoMarkusPfundstein:mainfrom
bryankthompson wants to merge 1 commit intoMarkusPfundstein:mainfrom
Conversation
Add readOnlyHint and destructiveHint annotations to all 13 tools to help LLMs better understand tool behavior and make safer decisions. Changes: - Bump MCP SDK from >=1.1.0 to >=1.8.0 for annotation support - Added readOnlyHint: true to 9 read-only tools: - obsidian_list_files_in_vault - obsidian_list_files_in_dir - obsidian_get_file_contents - obsidian_simple_search - obsidian_complex_search - obsidian_batch_get_file_contents - obsidian_get_periodic_note - obsidian_get_recent_periodic_notes - obsidian_get_recent_changes - Added destructiveHint: true to 4 write/destructive tools: - obsidian_append_content - obsidian_patch_content - obsidian_put_content - obsidian_delete_file - Added human-readable title annotations to all tools This improves tool safety metadata for MCP clients. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
ernestkoe
added a commit
to ernestkoe/mcp-obsidian-ek
that referenced
this pull request
Dec 29, 2025
Added ToolAnnotations with readOnlyHint/destructiveHint to key tools: - ListFilesInVault, ListFilesInDir, GetFileContents (readOnly) - AppendContent, DeleteFile (destructive) Establishes the pattern; remaining tools can be annotated incrementally. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
larsboes
added a commit
to larsboes/mcp-obsidian
that referenced
this pull request
Jan 8, 2026
- Implement Tool Annotations (readOnlyHint, destructiveHint) for safer LLM usage (matches PR MarkusPfundstein#101) - Fix: list_files_in_dir returns empty list on 404 (handling empty dirs) - Feat: Enhance Smart Context tool to include backlinks - Upgrade mcp dependency to >=1.8.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds MCP tool annotations (
readOnlyHint,destructiveHint) to all 13 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.Changes
>=1.1.0to>=1.8.0for annotation supportreadOnlyHint: trueto 9 read-only tools (queries, fetches)destructiveHint: trueto 4 tools that create/update/delete datatitleannotations for human-readable displayTool Classification
Read-Only Tools (9):
obsidian_list_files_in_vaultobsidian_list_files_in_dirobsidian_get_file_contentsobsidian_simple_searchobsidian_complex_searchobsidian_batch_get_file_contentsobsidian_get_periodic_noteobsidian_get_recent_periodic_notesobsidian_get_recent_changesDestructive Tools (4):
obsidian_append_contentobsidian_patch_contentobsidian_put_contentobsidian_delete_fileWhy This Matters
Testing
uv synccompletes successfullyreadOnlyHintordestructiveHintvaluesBefore/After
Before:
After:
🤖 Generated with Claude Code