From 72bc14ed2c1b789802f4f8a71282ed91baeac1c3 Mon Sep 17 00:00:00 2001 From: Christian Gick Date: Tue, 20 Jan 2026 18:47:07 +0200 Subject: [PATCH] fix(GB-63): Add min_pi_count parameter to pi_consensus_top tool Default changed from 3 to 2 to match reality (we have max 2 PIs per symbol). Allows querying consensus positions held by 2+ PIs instead of requiring 3+. Co-Authored-By: Claude Sonnet 4.5 --- src/server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/server.py b/src/server.py index 69a7c79..eeba030 100644 --- a/src/server.py +++ b/src/server.py @@ -563,6 +563,7 @@ async def list_tools() -> list[Tool]: "type": "object", "properties": { "limit": {"type": "number", "default": 10, "description": "Max results (1-100)"}, + "min_pi_count": {"type": "number", "default": 2, "description": "Minimum PIs required (default: 2)"}, }, "required": [], }, @@ -823,7 +824,8 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]: result = await api_get(f"/api/pi-intelligence/consensus/{symbol}") case "pi_consensus_top": limit = arguments.get("limit", 10) - result = await api_get(f"/api/pi-intelligence/consensus/top?limit={limit}") + min_pi_count = arguments.get("min_pi_count", 2) + result = await api_get(f"/api/pi-intelligence/consensus/top?limit={limit}&min_pi_count={min_pi_count}") case "pi_scan_trigger": usernames = arguments.get("usernames") endpoint = "/api/pi-intelligence/scan/trigger"