feat: add version info to health check and fix healthz endpoint

- Fixed health check to use correct /healthz endpoint instead of /health
- Added MCP version (mcpVersion) and supported n8n version (supportedN8nVersion) to health check response
- Added versionNote field with instructions for AI agents about manual version verification
- n8n API limitation: instance version cannot be determined automatically
- Updated axios usage for healthz endpoint access with proper error handling
This commit is contained in:
czlonkowski
2025-07-18 14:01:11 +02:00
parent 92d1b7b273
commit a1992f9964
5 changed files with 42 additions and 638 deletions

View File

@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `get_property_dependencies`, `search_nodes`, `get_node_documentation`
- Maintains backward compatibility - existing short prefixes continue to work
- Created centralized `normalizeNodeType` utility for consistent handling across all tools
- **Health check endpoint** - Fixed incorrect `/health` endpoint usage
- Now correctly uses `/healthz` endpoint which is available on all n8n instances
- Improved error handling with proper fallback to workflow list endpoint
- Fixed axios import for healthz endpoint access
### Added
- **Node type utilities** in `src/utils/node-utils.ts`
@@ -29,6 +33,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Example: `nodeType: "nodes-base.webhook"`, `workflowNodeType: "n8n-nodes-base.webhook"`
- Prevents confusion where AI agents would search nodes and use wrong format in workflows
- Added to: `search_nodes`, `get_node_info`, `get_node_essentials`, `get_node_as_tool_info`, `validate_node_operation`
- **Version information in health check**
- `n8n_health_check` now returns MCP version and supported n8n version
- Added `mcpVersion`, `supportedN8nVersion`, and `versionNote` fields
- Includes instructions for AI agents to inform users about version compatibility
- Note: n8n API currently doesn't expose instance version, so manual verification is required
## [2.7.17] - 2025-07-17