fix(TSL): Enable TSL by default in MCP tool

Changed is_tsl_enabled default from False to True in:
- Tool schema definition
- Payload construction (arguments.get default)

Fixes issue where MCP tool was overriding conductor API schema
default. Requires Claude Code restart to reload MCP tools.

Related: eToroGridbot commit 2d91848
This commit is contained in:
Christian Gick
2026-01-16 12:27:47 +02:00
parent 25839d0b19
commit f3c3ab5e2d
2 changed files with 2 additions and 2 deletions

View File

@@ -266,7 +266,7 @@ async def list_tools() -> list[Tool]:
"take_profit_pct": {"type": "number", "description": "Take profit percentage (e.g., 10 for 10%)"},
"stop_loss_pct": {"type": "number", "description": "Stop loss percentage (e.g., 5 for 5%)"},
"dry_run": {"type": "boolean", "default": False, "description": "Validate only, do not execute"},
"is_tsl_enabled": {"type": "boolean", "default": False, "description": "Enable trailing stop loss (eToro native feature)"},
"is_tsl_enabled": {"type": "boolean", "default": True, "description": "Enable trailing stop loss (eToro native feature)"},
},
"required": ["symbol", "action", "amount"],
},
@@ -535,7 +535,7 @@ async def call_tool(name: str, arguments: dict[str, Any]) -> list[TextContent]:
"take_profit_pct": arguments.get("take_profit_pct", 10),
"stop_loss_pct": arguments.get("stop_loss_pct", 5),
"dry_run": arguments.get("dry_run", False),
"is_tsl_enabled": arguments.get("is_tsl_enabled", False),
"is_tsl_enabled": arguments.get("is_tsl_enabled", True),
}
if arguments.get("limit_price"):
payload["limit_price"] = arguments["limit_price"]