# Release v1.8.2: Intent Metadata Storage Fix
**Release Date:** 2025-12-16
## 🐛 Bug Fixes
### Fixed Intent Metadata Storage for n8n API Compatibility
**Problem:**
Intent metadata was stored at node root level (`node["_intent"]`), which violated n8n API schema validation:
```
Error: request/body/nodes/0 must NOT have additional properties
```
**Solution:**
Changed storage location to `node["parameters"]["_intent"]` to comply with n8n API requirements.
### Fixed Missing json Import in Error Logging
**Problem:**
`json.dumps()` was used in `client.py` error logging without importing json module:
```
Error: name 'json' is not defined
```
**Solution:**
Added `import json` to `client.py:6`
### Fixed Intent Coverage Analysis
**Problem:**
`analyze_intent_coverage` reported 0% coverage even when nodes had intent metadata, because it checked the old storage location.
**Solution:**
Updated coverage analysis to use `IntentManager.get_node_intent()` method which correctly checks `node["parameters"]["_intent"]`.
## 📝 Technical Details
### Storage Location Change
**Before:**
```python
node["_intent"] = {
"reason": "...",
"assumption": "..."
}
```
**After:**
```python
node["parameters"]["_intent"] = {
"reason": "...",
"assumption": "..."
}
```
### Why This Works
The n8n API schema:
- ❌ Rejects additional properties at node root level
- ✅ Accepts custom fields in `parameters` object
- ✅ Preserves `parameters._intent` across workflow updates
- ✅ Does not interpret or validate custom parameter fields
### Methods Updated
All IntentManager methods now use the new storage location:
- `add_intent_to_node()` - Stores in `parameters._intent`
- `get_node_intent()` - Retrieves from `parameters._intent`
- `update_node_intent()` - Updates in `parameters._intent`
- `remove_intent_from_node()` - Removes from `parameters._intent`
- `analyze_intent_coverage()` - Checks `parameters._intent`
## ✅ What's Fixed
1. **add_node_intent** - Now successfully stores intent metadata
2. **get_workflow_intents** - Correctly retrieves all intents
3. **analyze_intent_coverage** - Shows accurate coverage percentage
4. **update_node_intent** - Updates work correctly
5. **remove_node_intent** - Removal works as expected
6. **Error logging** - json import available for debugging
## 🔍 Files Changed
- `src/n8n_workflow_builder/client.py` - Added json import
- `src/n8n_workflow_builder/intent.py` - Changed storage location in all methods
- `src/n8n_workflow_builder/server.py` - Updated intent existence check
## 🎯 Verified Working
All 6 intent management tools now function correctly:
- ✅ add_node_intent
- ✅ get_workflow_intents
- ✅ analyze_intent_coverage
- ✅ suggest_node_intent
- ✅ update_node_intent
- ✅ remove_node_intent
## 📦 Upgrade Notes
If you added intent metadata with v1.8.0 or v1.8.1 (which would have failed), you need to:
1. Update to v1.8.2
2. Re-add your intent metadata to nodes
The new storage location in `parameters` ensures compatibility with n8n's API validation.
---
**Full Changelog**: v1.8.1...v1.8.2