feat(meal-planner): add get_meal_plan read-only tool (v0.10.0)

- Implement get_meal_plan() tool for accessing Family Wall meal planner
- Parameters: date_from, date_to (ISO 8601 format)
- Returns raw JSON for initial verification via FW_DEBUG=1
- Response structure to be verified in first deployment
- Add Meal Planner API section to SPEC.md documenting mplistinterval and other endpoints
- Update version to 0.10.0 in __init__.py and pyproject.toml
- Update README.md and CLAUDE.md with tool info and roadmap

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-04-17 11:03:48 +02:00
parent 935a159331
commit 500ad278a4
6 changed files with 75 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
__version__ = "0.9.1"
__version__ = "0.10.0"
+25
View File
@@ -2210,6 +2210,31 @@ def update_recipe(
return json.dumps(result, ensure_ascii=False, indent=2)
# ---------------------------------------------------------------------------
# Tool: get_meal_plan
# ---------------------------------------------------------------------------
@mcp.tool()
def get_meal_plan(date_from: str, date_to: str) -> str:
"""Return meal plan entries for a date range.
Args:
date_from: Start date in ISO format (e.g. ``"2026-04-13"``).
date_to: End date in ISO format (e.g. ``"2026-04-19"``).
Returns:
Raw JSON response from the API for initial verification.
"""
try:
data = _authenticated_call("mplistinterval", {"from": date_from, "to": date_to})
except RuntimeError as exc:
return f"Error: {exc}"
# Return raw JSON for verification — response structure not yet known
return json.dumps(data, ensure_ascii=False, indent=2)
# ---------------------------------------------------------------------------
# Factory
# ---------------------------------------------------------------------------