xonecas.io
60255
Zn

Zoea-Nova / commit 1a5c363

fix: return no accounts message as JSON

Before: 'No accounts available. Use the game's register tool...'
After: '{"status":"no_accounts","action_required":"register"}'

Consistent JSON format for all tool responses.

xonecas2026-02-07 1a5c3635008232fff09a9ed6150f7fcda01e5681 parent a7d2a78

1 file changed

internal/mcp/tools.go+5−1
@@ -357,8 +357,12 @@ func RegisterOrchestratorTools(proxy *Proxy, orchestrator Orchestrator) {
357357 if err != nil {
358358 // Check if no accounts available
359359 if err.Error() == "no accounts available" {
360+ data, _ := json.Marshal(map[string]string{
361+ "status": "no_accounts",
362+ "action_required": "register",
363+ })
360364 return &ToolResult{
361- Content: []ContentBlock{{Type: "text", Text: "No accounts available. Use the game's register tool to create a new account with a Crustacean-themed username."}},
365+ Content: []ContentBlock{{Type: "text", Text: string(data)}},
362366 }, nil
363367 }
364368 return &ToolResult{