Add: Config for tool enable/disable, BETA warnings

Config system:
- 10 env vars to enable/disable each tool
- Disabled by default: get_deals_by_radius, get_street_deals, get_market_activity_metrics
- Enabled by default: all other tools

BETA warnings:
- analyze_market_trends: added BETA notice
- compare_addresses: added BETA notice

Tests:
- 17 tests skipped when tools disabled
- All 311 tests pass

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Nitzan Pomerantz
2025-12-06 22:37:55 +02:00
parent 5daaf70021
commit 88ae481e52
6 changed files with 106 additions and 0 deletions
+7
View File
@@ -11,6 +11,7 @@ import json
import pytest
from nadlan_mcp.config import get_config
from nadlan_mcp.fastmcp_server import (
autocomplete_address,
find_recent_deals_for_address,
@@ -40,6 +41,9 @@ class TestMCPToolsSmokeTests:
def test_get_street_deals_works(self):
"""Smoke test: Can fetch street deals."""
if not get_config().tool_get_street_deals_enabled:
pytest.skip("test_get_street_deals tool is disabled")
# Use small limit for speed
result = get_street_deals(self.TEST_POLYGON_ID, limit=5, deal_type=2)
data = json.loads(result)
@@ -50,6 +54,9 @@ class TestMCPToolsSmokeTests:
def test_get_deals_by_radius_works(self):
"""Smoke test: Can fetch polygon metadata by radius."""
if not get_config().tool_get_deals_by_radius_enabled:
pytest.skip("test_get_deals_by_radius tool is disabled")
# Use small radius for speed
result = get_deals_by_radius(self.TEST_LAT, self.TEST_LON, radius_meters=100)
data = json.loads(result)