Przeglądaj źródła

Fix: _byId variants missing boolean flags

calculate_natal_chart_by_id was missing include_overview, include_patterns,
include_karmic, top_n_aspects params -- they were accepted by the MCP signature
but silently dropped when forwarding to calculate_natal_chart.

calculate_synastry_chart_by_id was missing top_n_aspects, karmic_filter,
significator_filter, include_davison_full.

Both _byId variants now forward all params correctly.
Lukas Goldschmidt 1 miesiąc temu
rodzic
commit
30f0617c7f
1 zmienionych plików z 43 dodań i 19 usunięć
  1. 43 19
      src/astro_mcp/tools.py

+ 43 - 19
src/astro_mcp/tools.py

@@ -1580,21 +1580,29 @@ async def calculate_natal_chart_by_id(
     person_id: str,
     house_system: str = "placidus",
     orb_limits: dict[str, float] | None = None,
+    include_overview: bool = False,
+    include_patterns: bool = False,
+    include_karmic: bool = False,
+    top_n_aspects: int | None = None,
 ) -> dict[str, Any]:
     """Calculate natal chart for a person from the database.
 
-Same as calculate_natal_chart but fetches birth data from the persons database
-by ID or nickname. See calculate_natal_chart for full documentation.
+    Same as calculate_natal_chart but fetches birth data from the persons database
+    by ID or nickname. See calculate_natal_chart for full documentation.
 
-For interpretation guidance, fetch resource: astro://guides/natal-astrology
+    For interpretation guidance, fetch resource: astro://guides/natal-astrology
 
-Args:
-    person_id: ID or nickname of a person in the persons database.
-    house_system: House system (default: Placidus).
-    orb_limits: Optional orb configuration.
+    Args:
+        person_id: ID or nickname of a person in the persons database.
+        house_system: House system (default: Placidus).
+        orb_limits: Optional orb configuration.
+        include_overview: Add element/modality/hemisphere balance, stelliums, etc.
+        include_patterns: Add aspect pattern detection and chart shape.
+        include_karmic: Add nodal axis, Saturn, Pluto polarity point, etc.
+        top_n_aspects: Limit aspects to the N tightest by orb.
 
-Returns:
-    Complete natal chart structure (see calculate_natal_chart)."""
+    Returns:
+        Complete natal chart structure (see calculate_natal_chart)."""
     birth = await _get_person_birth_data(person_id)
     if "error" in birth:
         return birth
@@ -1605,6 +1613,10 @@ Returns:
         elevation=birth.get("elevation", 0.0),
         house_system=house_system,
         orb_limits=orb_limits,
+        include_overview=include_overview,
+        include_patterns=include_patterns,
+        include_karmic=include_karmic,
+        top_n_aspects=top_n_aspects,
     )
 
 
@@ -1655,22 +1667,30 @@ async def calculate_synastry_chart_by_id(
     person2_id: str,
     house_system: str = "placidus",
     orb_limits: dict[str, float] | None = None,
+    top_n_aspects: int | None = None,
+    karmic_filter: bool = False,
+    significator_filter: bool = False,
+    include_davison_full: bool = False,
 ) -> dict[str, Any]:
     """Calculate synastry chart for two persons from the database.
 
-Same as calculate_synastry_chart but fetches birth data from the persons database
-by ID or nickname. See calculate_synastry_chart for full documentation.
+    Same as calculate_synastry_chart but fetches birth data from the persons database
+    by ID or nickname. See calculate_synastry_chart for full documentation.
 
-For interpretation guidance, fetch resource: astro://guides/relationship-astrology
+    For interpretation guidance, fetch resource: astro://guides/relationship-astrology
 
-Args:
-    person1_id: ID of person 1 in the persons database.
-    person2_id: ID of person 2 in the persons database.
-    house_system: House system (default: Placidus).
-    orb_limits: Optional orb configuration.
+    Args:
+        person1_id: ID of person 1 in the persons database.
+        person2_id: ID of person 2 in the persons database.
+        house_system: House system (default: Placidus).
+        orb_limits: Optional orb configuration.
+        top_n_aspects: Limit interaspects to top N by orb.
+        karmic_filter: Only return Saturn/Pluto/Node interaspects.
+        significator_filter: Only return Venus-Mars, Moon-Venus, Sun-Moon, Sun-Saturn.
+        include_davison_full: Compute full Davison chart.
 
-Returns:
-    Synastry chart structure (see calculate_synastry_chart)."""
+    Returns:
+        Synastry chart structure (see calculate_synastry_chart)."""
     p1 = await _get_person_birth_data(person1_id)
     if "error" in p1:
         return p1
@@ -1687,6 +1707,10 @@ Returns:
         elevation=p1.get("elevation", 0.0),
         house_system=house_system,
         orb_limits=orb_limits,
+        top_n_aspects=top_n_aspects,
+        karmic_filter=karmic_filter,
+        significator_filter=significator_filter,
+        include_davison_full=include_davison_full,
     )