Buddy MCP server: 15 tools for system observability, feedback loop control, OANDA state, and knowledge management. Use when querying system health, investigating trades, or triggering diagnostics/self-heal.
Buddy MCP server: 15 tools for system observability, feedback loop control, OANDA state, and knowledge management. Use when querying system health, investigating trades, or triggering diagnostics/self-heal.
user-invocable
false
Buddy MCP Tools
15 tools via Model Context Protocol (stdio transport) for orchestrator observability, feedback loop control, OANDA queries, and knowledge management.
10. trigger_rl_update -- Feedback loop for one trade
Params: trade_id: str (required). Use: Manually process a specific trade through shaped-reward logging, diagnostics, self-heal. Does NOT update agent weights.
Params: None. Use: When direction accuracy is degraded. Respects 60-minute cooldown. Returns {"error": "online_retrainer not available"} if module missing.
12. write_learning -- Append to learnings.md
Params: content: str (required, max 5000 chars). Use: Record a pattern or insight from trade analysis.
Params: filename: str (must match [a-z0-9_]+.md), content: str (required). Use: Promote a 3x-observed learning to a rule. Cannot overwrite trading.md or improvement.md.
health_check --> review status --> if issues: get_learnings to check for recurring patterns.
Post-Loss Investigation
get_trade_feedback_log(5) --> trigger_diagnostics --> get_agent_weights --> decide: trigger_self_heal or escalate to human.
Gate Tune
get_gate_health --> trigger_self_heal if issues --> get_system_decisions to verify actions applied.
Full Reset
trigger_diagnostics --> trigger_self_heal --> trigger_gate_retrain --> health_check to confirm HEALTHY.
OANDA Tools Caveat
Tools 14 and 15 require OANDA_API_TOKEN + OANDA_ACCOUNT_ID env vars. If missing, they return {"error": "credentials_missing"}. All other tools work without credentials.
Error Handling
Every tool returns structured JSON even on failure. Check for the "error" key in every response before acting on data. No tool raises an unhandled exception to the MCP client.
Key Source File
src/mcp/buddy_server.py -- All 15 tool definitions, Pydantic return models, FastMCP server setup