docs: add n8n version compatibility notice in tools documentation

This commit is contained in:
czlonkowski
2025-07-18 15:20:38 +02:00
parent 159110d5c4
commit a7bcd8cd1b

View File

@@ -66,9 +66,17 @@ ${full.relatedTools.map(t => `- ${t}`).join('\n')}`;
}
export function getToolsOverview(depth: 'essentials' | 'full' = 'essentials'): string {
// Get version info from package.json
const packageJson = require('../../package.json');
const supportedN8nVersion = packageJson.dependencies?.n8n?.replace(/[^0-9.]/g, '') || 'latest';
if (depth === 'essentials') {
return `# n8n MCP Tools Reference
## Important: Compatibility Notice
⚠️ This MCP server is tested with n8n version ${supportedN8nVersion}.
Inform the user to check their n8n version matches or is compatible with the supported version listed above.
## Code Node Configuration
When working with Code nodes, always start by calling the relevant guide:
- tools_documentation({topic: "javascript_code_node_guide"}) for JavaScript Code nodes
@@ -134,6 +142,10 @@ tools_documentation({topic: "tool_name", depth: "full"})`;
const categories = getAllCategories();
return `# n8n MCP Tools - Complete Reference
## Important: Compatibility Notice
⚠️ This MCP server is tested with n8n version ${supportedN8nVersion}.
Run n8n_health_check() to verify your n8n instance compatibility and API connectivity.
## Code Node Guides
For Code node configuration, use these comprehensive guides:
- tools_documentation({topic: "javascript_code_node_guide", depth: "full"}) - JavaScript patterns, n8n variables, error handling