Skip to content

feat: add MCP tool annotations to all 20 tools#512

Merged
czlonkowski merged 3 commits into
czlonkowski:mainfrom
bryankthompson:add-tool-annotations
Jan 2, 2026
Merged

feat: add MCP tool annotations to all 20 tools#512
czlonkowski merged 3 commits into
czlonkowski:mainfrom
bryankthompson:add-tool-annotations

Conversation

@bryankthompson

Copy link
Copy Markdown
Contributor

Summary

  • Add MCP tool annotations to all 20 tools per MCP specification
  • Annotations help AI assistants understand tool behavior and capabilities
  • Added ToolAnnotations interface to types for proper typing

Changes

Documentation Tools (7 tools)

All local database queries, marked readOnlyHint: true:

  • tools_documentation - Get documentation for tools
  • search_nodes - Search n8n nodes by keyword
  • get_node - Get detailed node information
  • validate_node - Validate node configuration
  • get_template - Get template by ID
  • search_templates - Search workflow templates
  • validate_workflow - Validate complete workflow

Management Tools (13 tools)

All interact with n8n API, marked openWorldHint: true:

Tool readOnlyHint destructiveHint
n8n_create_workflow false false
n8n_get_workflow true -
n8n_update_full_workflow false false
n8n_update_partial_workflow false false
n8n_delete_workflow false true
n8n_list_workflows true -
n8n_validate_workflow true -
n8n_autofix_workflow false false
n8n_test_workflow false false
n8n_executions false true
n8n_health_check true -
n8n_workflow_versions false true
n8n_deploy_template false false

Test plan

  • TypeScript builds without errors
  • Annotations follow MCP spec naming conventions
  • Destructive operations (delete, truncate) properly marked

🤖 Generated with Claude Code

@czlonkowski czlonkowski self-assigned this Jan 2, 2026
@codecov

codecov Bot commented Jan 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

web-flow and others added 3 commits January 2, 2026 12:30
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>
@czlonkowski czlonkowski force-pushed the add-tool-annotations branch from 7b77709 to fb3d68a Compare January 2, 2026 11:46

@czlonkowski czlonkowski left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 tools
  • src/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.

@czlonkowski czlonkowski merged commit 2713db6 into czlonkowski:main Jan 2, 2026
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>
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.

3 participants