From 480504f8b5845a29d5a57d79acbc83f82829b824 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 14 Apr 2026 23:04:18 +0000 Subject: [PATCH] raise ValueError for bool inputs instead of returning as-is Agent-Logs-Url: https://github.com/dylanlangston/nextcloud-mcp-server/sessions/0360ab28-8913-450e-8c61-697e71ba9742 Co-authored-by: dylanlangston <16236219+dylanlangston@users.noreply.github.com> --- nextcloud_mcp_server/models/cookbook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextcloud_mcp_server/models/cookbook.py b/nextcloud_mcp_server/models/cookbook.py index 5452ca5f..a53f79ba 100644 --- a/nextcloud_mcp_server/models/cookbook.py +++ b/nextcloud_mcp_server/models/cookbook.py @@ -64,7 +64,8 @@ class Nutrition(BaseModel): stores whatever the source provided. """ if isinstance(v, bool): - return v + msg = "boolean values are not valid for nutrition fields" + raise ValueError(msg) if isinstance(v, (int, float)): return str(v) return v