fix(circles): protect primary circle from rename in update_circle (v0.7.5)
Adds isFirstFamily check to update_circle — mirrors the same guard already present in delete_circle. Attempting to rename the primary circle now returns a clear error instead of silently renaming it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ und wird in Claude Desktop eingebunden.
|
|||||||
|
|
||||||
## Aktueller Stand
|
## Aktueller Stand
|
||||||
|
|
||||||
### Implementierte Tools (v0.7.4)
|
### Implementierte Tools (v0.7.5)
|
||||||
|
|
||||||
| Kategorie | Tools |
|
| Kategorie | Tools |
|
||||||
|---|---|
|
|---|---|
|
||||||
@@ -49,8 +49,9 @@ und wird in Claude Desktop eingebunden.
|
|||||||
- v0.7.1: get_lists scope fix + create_list circle_id + delete_list scope ✓
|
- v0.7.1: get_lists scope fix + create_list circle_id + delete_list scope ✓
|
||||||
- v0.7.2: delete_circle ✓
|
- v0.7.2: delete_circle ✓
|
||||||
- v0.7.3: update_list (Umbenennen, emoji/color ändern) ✓
|
- v0.7.3: update_list (Umbenennen, emoji/color ändern) ✓
|
||||||
- v0.7.4: update_circle (Kreis umbenennen) ✓ ← aktuell
|
- v0.7.4: update_circle (Kreis umbenennen) ✓
|
||||||
- v0.7.5: mpadditemtolist (Zutaten → Einkaufsliste)
|
- v0.7.5: Primärkreis-Schutz in update_circle (isFirstFamily-Check) ✓ ← aktuell
|
||||||
|
- v0.7.6: mpadditemtolist (Zutaten → Einkaufsliste)
|
||||||
- v0.8.x: Erinnerungen + Wiederholungen (Premium-Account erforderlich)
|
- v0.8.x: Erinnerungen + Wiederholungen (Premium-Account erforderlich)
|
||||||
- v2.0: Schreibzugriff auf Wall-Posts (Erstellen, Kommentieren)
|
- v2.0: Schreibzugriff auf Wall-Posts (Erstellen, Kommentieren)
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
MCP server for [Family Wall](https://www.familywall.com) -- read and manage your family's circles, lists, tasks, and recipes directly from Claude.
|
MCP server for [Family Wall](https://www.familywall.com) -- read and manage your family's circles, lists, tasks, and recipes directly from Claude.
|
||||||
|
|
||||||
## Features (v0.7.4)
|
## Features (v0.7.5)
|
||||||
|
|
||||||
### Read
|
### Read
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ MCP server for [Family Wall](https://www.familywall.com) -- read and manage your
|
|||||||
- `update_recipe` -- update any field of an existing recipe (partial update — omitted fields unchanged)
|
- `update_recipe` -- update any field of an existing recipe (partial update — omitted fields unchanged)
|
||||||
- `delete_recipe` -- permanently delete a recipe (only own recipes)
|
- `delete_recipe` -- permanently delete a recipe (only own recipes)
|
||||||
- `create_circle` -- create a new Family Wall circle (group)
|
- `create_circle` -- create a new Family Wall circle (group)
|
||||||
- `update_circle` -- rename a circle (server capitalises first letter; only name is changeable via API)
|
- `update_circle` -- rename a circle (server capitalises first letter; only name is changeable via API; primary circle is protected)
|
||||||
- `delete_circle` -- permanently delete a circle and all its content (primary circle is protected)
|
- `delete_circle` -- permanently delete a circle and all its content (primary circle is protected)
|
||||||
- `add_member_to_circle` -- invite a person to a circle by e-mail (for new Family Wall users only; existing accounts require in-app invitation)
|
- `add_member_to_circle` -- invite a person to a circle by e-mail (for new Family Wall users only; existing accounts require in-app invitation)
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "mcp-familywall"
|
name = "mcp-familywall"
|
||||||
version = "0.7.4"
|
version = "0.7.5"
|
||||||
description = "MCP server for Family Wall — read your family's lists and tasks via Claude"
|
description = "MCP server for Family Wall — read your family's lists and tasks via Claude"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.12"
|
requires-python = ">=3.12"
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "0.7.4"
|
__version__ = "0.7.5"
|
||||||
|
|||||||
@@ -1399,6 +1399,22 @@ def update_circle(circle_id: str, name: str) -> str:
|
|||||||
indent=2,
|
indent=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if target.get("isFirstFamily") == "true":
|
||||||
|
client.logout()
|
||||||
|
return json.dumps(
|
||||||
|
{
|
||||||
|
"error": "Cannot rename the primary circle.",
|
||||||
|
"id": circle_id,
|
||||||
|
"name": target.get("name"),
|
||||||
|
"hint": (
|
||||||
|
"The primary (first) circle cannot be renamed via the API. "
|
||||||
|
"Use the Family Wall app settings to manage it."
|
||||||
|
),
|
||||||
|
},
|
||||||
|
ensure_ascii=False,
|
||||||
|
indent=2,
|
||||||
|
)
|
||||||
|
|
||||||
# Rename the circle.
|
# Rename the circle.
|
||||||
# Verified: accupdatefamily with scope=<circle_metaId> targets any circle,
|
# Verified: accupdatefamily with scope=<circle_metaId> targets any circle,
|
||||||
# both primary and secondary. The server capitalises the first letter.
|
# both primary and secondary. The server capitalises the first letter.
|
||||||
|
|||||||
Reference in New Issue
Block a user