feat: add MCP tool annotations to all 20 tools#512
Merged
czlonkowski merged 3 commits intoJan 2, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Add MCP tool annotations per specification to help AI assistants understand tool behavior and capabilities. Documentation tools (7): - tools_documentation, search_nodes, get_node, validate_node, get_template, search_templates, validate_workflow - All marked readOnlyHint=true (local database queries) Management tools (13): - n8n_create_workflow, n8n_get_workflow, n8n_update_full_workflow, n8n_update_partial_workflow, n8n_delete_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_autofix_workflow, n8n_test_workflow, n8n_executions, n8n_health_check, n8n_workflow_versions, n8n_deploy_template - All marked openWorldHint=true (n8n API access) - Destructive operations (delete_workflow, executions delete, workflow_versions delete/truncate) marked destructiveHint=true Annotations follow MCP spec: https://spec.modelcontextprotocol.io/specification/2025-03-26/server/tools/#annotations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds idempotentHint: true annotation to all read-only tools that produce the same output when called multiple times: - 7 documentation tools (tools.ts) - 4 management tools (tools-n8n-manager.ts): n8n_get_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_health_check Also adds trailing newline to tools-n8n-manager.ts. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds idempotentHint: true to update operations that produce the same result when called repeatedly with the same arguments: - n8n_update_full_workflow - n8n_update_partial_workflow - n8n_autofix_workflow Also bumps version to 2.31.5 and updates CHANGELOG.md with complete documentation of all MCP tool annotations added in this PR. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7b77709 to
fb3d68a
Compare
czlonkowski
approved these changes
Jan 2, 2026
czlonkowski
left a comment
Owner
There was a problem hiding this comment.
Code Review: Approved ✅
This PR correctly implements MCP tool annotations following the MCP specification.
Summary of Changes
20 tools annotated across 2 files:
src/mcp/tools.ts- 7 documentation toolssrc/mcp/tools-n8n-manager.ts- 13 management tools
Annotation Coverage
| Annotation | Count | Applied To |
|---|---|---|
title |
20 | All tools |
readOnlyHint: true |
11 | Read-only tools |
destructiveHint: true |
3 | Delete operations |
idempotentHint: true |
14 | Read-only + update tools |
openWorldHint: true |
13 | n8n API tools |
Verification
- ✅ Build compiles successfully
- ✅ TypeScript types match MCP SDK
- ✅ Annotations semantically correct
- ✅ Version bumped to 2.31.5
- ✅ CHANGELOG updated with detailed documentation
- ✅ No conflicts with main branch
Notes
The n8n_executions and n8n_workflow_versions tools are marked destructiveHint: true because they CAN perform destructive operations (delete action/mode), even though they also support read-only operations. This is a conservative but correct approach per MCP spec.
LGTM! Ready to merge.
daleiii
pushed a commit
to daleiii/n8n-mcp
that referenced
this pull request
Feb 4, 2026
* feat: add MCP tool annotations to all 20 tools Add MCP tool annotations per specification to help AI assistants understand tool behavior and capabilities. Documentation tools (7): - tools_documentation, search_nodes, get_node, validate_node, get_template, search_templates, validate_workflow - All marked readOnlyHint=true (local database queries) Management tools (13): - n8n_create_workflow, n8n_get_workflow, n8n_update_full_workflow, n8n_update_partial_workflow, n8n_delete_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_autofix_workflow, n8n_test_workflow, n8n_executions, n8n_health_check, n8n_workflow_versions, n8n_deploy_template - All marked openWorldHint=true (n8n API access) - Destructive operations (delete_workflow, executions delete, workflow_versions delete/truncate) marked destructiveHint=true Annotations follow MCP spec: https://spec.modelcontextprotocol.io/specification/2025-03-26/server/tools/#annotations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add idempotentHint to all read-only tools Adds idempotentHint: true annotation to all read-only tools that produce the same output when called multiple times: - 7 documentation tools (tools.ts) - 4 management tools (tools-n8n-manager.ts): n8n_get_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_health_check Also adds trailing newline to tools-n8n-manager.ts. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add idempotentHint to update operations, bump to 2.31.5 Adds idempotentHint: true to update operations that produce the same result when called repeatedly with the same arguments: - n8n_update_full_workflow - n8n_update_partial_workflow - n8n_autofix_workflow Also bumps version to 2.31.5 and updates CHANGELOG.md with complete documentation of all MCP tool annotations added in this PR. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: triepod-ai <noreply@github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Romuald Członkowski <romualdczlonkowski@MacBook-Pro-Romuald.local>
RenatoAscencio
pushed a commit
to serversmx/n8n-mcp
that referenced
this pull request
May 6, 2026
* feat: add MCP tool annotations to all 20 tools Add MCP tool annotations per specification to help AI assistants understand tool behavior and capabilities. Documentation tools (7): - tools_documentation, search_nodes, get_node, validate_node, get_template, search_templates, validate_workflow - All marked readOnlyHint=true (local database queries) Management tools (13): - n8n_create_workflow, n8n_get_workflow, n8n_update_full_workflow, n8n_update_partial_workflow, n8n_delete_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_autofix_workflow, n8n_test_workflow, n8n_executions, n8n_health_check, n8n_workflow_versions, n8n_deploy_template - All marked openWorldHint=true (n8n API access) - Destructive operations (delete_workflow, executions delete, workflow_versions delete/truncate) marked destructiveHint=true Annotations follow MCP spec: https://spec.modelcontextprotocol.io/specification/2025-03-26/server/tools/#annotations 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add idempotentHint to all read-only tools Adds idempotentHint: true annotation to all read-only tools that produce the same output when called multiple times: - 7 documentation tools (tools.ts) - 4 management tools (tools-n8n-manager.ts): n8n_get_workflow, n8n_list_workflows, n8n_validate_workflow, n8n_health_check Also adds trailing newline to tools-n8n-manager.ts. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: add idempotentHint to update operations, bump to 2.31.5 Adds idempotentHint: true to update operations that produce the same result when called repeatedly with the same arguments: - n8n_update_full_workflow - n8n_update_partial_workflow - n8n_autofix_workflow Also bumps version to 2.31.5 and updates CHANGELOG.md with complete documentation of all MCP tool annotations added in this PR. Conceived by Romuald Członkowski - www.aiadvisors.pl/en 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: triepod-ai <noreply@github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Romuald Członkowski <romualdczlonkowski@MacBook-Pro-Romuald.local>
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
ToolAnnotationsinterface to types for proper typingChanges
Documentation Tools (7 tools)
All local database queries, marked
readOnlyHint: true:tools_documentation- Get documentation for toolssearch_nodes- Search n8n nodes by keywordget_node- Get detailed node informationvalidate_node- Validate node configurationget_template- Get template by IDsearch_templates- Search workflow templatesvalidate_workflow- Validate complete workflowManagement Tools (13 tools)
All interact with n8n API, marked
openWorldHint: true:n8n_create_workflown8n_get_workflown8n_update_full_workflown8n_update_partial_workflown8n_delete_workflown8n_list_workflowsn8n_validate_workflown8n_autofix_workflown8n_test_workflown8n_executionsn8n_health_checkn8n_workflow_versionsn8n_deploy_templateTest plan
🤖 Generated with Claude Code