fix: correct misleading Code node documentation based on real-world testing

Critical fixes based on Claude Desktop feedback:

1. Fixed crypto documentation: require('crypto') IS available despite editor warnings
   - Added clear examples of crypto usage
   - Updated validation to guide correct require() usage

2. Clarified $helpers vs standalone functions
   - $getWorkflowStaticData() is standalone, NOT $helpers.getWorkflowStaticData()
   - Added validation to catch incorrect usage (prevents '$helpers is not defined' errors)
   - Enhanced examples showing proper $helpers availability checks

3. Fixed JMESPath numeric literal documentation
   - n8n requires backticks around numbers in filters: [?age >= `18`]
   - Added multiple examples and validation to detect missing backticks
   - Prevents 'JMESPath syntax error' that Claude Desktop encountered

4. Fixed webhook data access gotcha
   - Webhook payload is at items[0].json.body, NOT items[0].json
   - Added dedicated 'Webhook Data Access' section with clear examples
   - Created process_webhook_data task template
   - Added validation to detect incorrect webhook data access patterns

All fixes based on production workflows TaNqYoZNNeHC4Hne and JZ9urD7PNClDZ1bm

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
czlonkowski
2025-07-10 09:22:34 +02:00
parent 20f018f8dc
commit 99e74cf22a
14 changed files with 3072 additions and 73 deletions

View File

@@ -580,48 +580,7 @@ Current database coverage (n8n v1.100.1):
## 🔄 Recent Updates
### v2.7.10 - Enhanced Authentication Logging
-**ENHANCED**: Authentication logging for better debugging of client authentication issues
-**ADDED**: Specific error reasons: `no_auth_header`, `invalid_auth_format`, `invalid_token`
-**FIXED**: Issue #22 - Improved authentication failure diagnostics
-**FIXED**: Issue #16 - AUTH_TOKEN_FILE validation for Docker production stacks
-**SECURITY**: Removed token length from logs, trimmed tokens for whitespace edge cases
### v2.7.8 - npx Support & npm Publishing
-**NEW**: npx support - Run `npx n8n-mcp` without installation!
-**OPTIMIZED**: npm package with runtime-only dependencies (8 deps vs 50+ dev deps)
-**REDUCED**: Package size from 1GB+ to ~50MB by excluding dev dependencies
-**FIXED**: Issue #15 - Added npx execution support as requested
-**ENHANCED**: Database path resolution for npx, global, and local installations
### v2.7.5 - AUTH_TOKEN_FILE Support
-**NEW**: AUTH_TOKEN_FILE support for Docker secrets compatibility
-**ADDED**: Known Issues section documenting Claude Desktop container duplication
-**ENHANCED**: Authentication flexibility with both AUTH_TOKEN and AUTH_TOKEN_FILE
-**FIXED**: Issue #16 - AUTH_TOKEN_FILE now properly implemented as documented
-**BACKWARD COMPATIBLE**: AUTH_TOKEN continues to work as before
### v2.7.4 - Self-Documenting MCP Tools
-**RENAMED**: `start_here_workflow_guide``tools_documentation` for clarity
-**NEW**: Depth parameter - Control documentation detail with "essentials" or "full"
-**NEW**: Per-tool documentation - Get help for any specific MCP tool by name
-**CONCISE**: Essential info by default, comprehensive docs on demand
-**LLM-FRIENDLY**: Plain text format instead of JSON for better readability
-**QUICK HELP**: Call without parameters for immediate quick reference
-**8 TOOLS DOCUMENTED**: Complete documentation for most commonly used tools
### v2.7.0 - Diff-Based Workflow Editing with Transactional Updates
-**NEW**: `n8n_update_partial_workflow` tool - Update workflows using diff operations
-**RENAMED**: `n8n_update_workflow``n8n_update_full_workflow` for clarity
-**80-90% TOKEN SAVINGS**: Only send changes, not entire workflow JSON
-**13 OPERATIONS**: addNode, removeNode, updateNode, moveNode, enable/disable, connections, settings, tags
-**TRANSACTIONAL**: Two-pass processing allows adding nodes and connections in any order
-**5 OPERATION LIMIT**: Ensures reliability and atomic updates
-**VALIDATION MODE**: Test changes with `validateOnly: true` before applying
-**IMPROVED DOCS**: Comprehensive parameter documentation and examples
See [CHANGELOG.md](./docs/CHANGELOG.md) for full version history.
See [CHANGELOG.md](./docs/CHANGELOG.md) for full version history and recent changes.
## ⚠️ Known Issues