feat: Add tool annotations for improved LLM tool understanding#169
Merged
ksinder merged 1 commit intoDec 26, 2025
Merged
Conversation
ksinder
approved these changes
Dec 24, 2025
Contributor
|
^ thanks, this looks great! mind rebasing off the latest |
Add readOnlyHint and destructiveHint annotations to all 19 tools based on HTTP method to help LLMs better understand tool behavior and make safer decisions. Changes: - Added readOnlyHint: true to GET operations (9 tools) - Added destructiveHint: true to POST/PATCH/DELETE operations (10 tools) - Added title annotations derived from operationId for human-readable display - Annotations are dynamically determined from OpenAPI spec HTTP methods This improves tool safety metadata for MCP clients like Claude Code, enabling features like auto-approval for read-only operations. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
cd8f13c to
15ac6e7
Compare
Contributor
Author
|
Done! Rebased onto the latest |
markjamesbtutoring-coder
added a commit
to markjamesbtutoring-coder/notion-mcp-server
that referenced
this pull request
Jan 29, 2026
jyoansah
pushed a commit
to drapesinc/notion-mcp
that referenced
this pull request
Feb 2, 2026
jyoansah
added a commit
to drapesinc/notion-mcp
that referenced
this pull request
Feb 2, 2026
Merged 63 commits from upstream bringing: - feat: Add retrieve database endpoint to OpenAPI spec (makenotion#195) - feat: Add option to disable authentication (makenotion#105) - fix: preserve const values and allow any property in page schemas (makenotion#173) - fix: handle double-serialized JSON parameters from MCP clients (makenotion#180) - feat: Add tool annotations for improved LLM tool understanding (makenotion#169) - feat: add streamable HTTP transport and NOTION_TOKEN env var support (makenotion#75) Preserved our customizations: - Multi-workspace support with NOTION_TOKEN_* env vars - Custom unified tools (notion-page, notion-blocks, etc.) - get-due-tasks with assignee filtering and dual date property checking - Toolset configuration and filtering Merged deserializeParams fix into our multi-workspace flow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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,title) to all 19 tools to help LLMs better understand tool behavior and make safer decisions about tool execution.Changes
readOnlyHint: trueto GET operations (9 tools: get_user, get_users, get_self, retrieve_a_block, retrieve_a_page, retrieve_a_database, retrieve_a_page_property, retrieve_a_comment, get_block_children)destructiveHint: trueto POST/PATCH/DELETE operations (10 tools: post_database_query, post_search, patch_block_children, update_a_block, delete_a_block, patch_page, post_page, create_a_database, update_a_database, create_a_comment)titleannotations derived from operationId for human-readable displayWhy This Matters
Testing
npm run build)npx vitest run src/openapi-mcp-server/mcp/__tests__/)tools/listreturns annotations for all 19 toolsExample Output
🤖 Generated with Claude Code