e791d3c1ed
Implement changes from MCP_NORMALIZATION_FIX.md to provide consistent
response structure across all MCP tools. This fixes the bot integration
issue where different tools returned data in different structures.
Changes:
- get_valuation_comparables:
- Rename "comparables" → "deals"
- Move "total_comparables" → "market_statistics.deal_breakdown.total_deals"
- Add "search_parameters" section with "filters_applied"
- Move "statistics" → "market_statistics"
- find_recent_deals_for_address:
- Rename "price_stats.average_price" → "price_statistics.mean"
- Rename "price_stats.median_price" → "price_statistics.median"
- Rename "area_stats" → "area_statistics"
- Rename "price_per_sqm_stats" → "price_per_sqm_statistics"
- get_deal_statistics:
- Add "search_parameters" section
- Move "statistics" → "market_statistics"
- Add "market_statistics.deal_breakdown.total_deals"
- analyze_market_trends:
- Add "market_statistics.deal_breakdown.total_deals"
- Keep existing tool-specific fields (yearly_trends, etc.)
- get_market_activity_metrics:
- Add "market_statistics.deal_breakdown.total_deals"
- Keep existing tool-specific metrics
All tools now follow standard structure:
{
"search_parameters" or "analysis_parameters": {...},
"market_statistics": {
"deal_breakdown": {"total_deals": N},
"price_statistics": {"mean": ..., "median": ...},
"area_statistics": {...},
"price_per_sqm_statistics": {...}
},
"deals": [...]
}
Updated tests to match new normalized structure.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>