22-tool architecture: log.query, user.ask, journal system deployed
New tools implemented and deployed to dev gateway: - log.query: focused event queries (chat/deaths/joins/actions), replaces 200-line dump - user.ask: risk-scaled clarifying questions, async with tellraw - journal.read/write: per-player files, cross-mode (God+Sudo share) All wired into langgraph_gateway.py _execute_tool and model-driven tool loop. Tool schemas updated (22 total). Deployed to CT 644 dev server. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -608,6 +608,88 @@ TOOL_SCHEMAS: List[Dict[str, Any]] = [
|
||||
}
|
||||
}
|
||||
},
|
||||
# ── Log query tool ────────────────────────────────────────────────
|
||||
{
|
||||
"name": "log.query",
|
||||
"description": (
|
||||
"Query recent server events. Use instead of reading raw logs. "
|
||||
"Types: chat (recent messages), deaths (who died and how), "
|
||||
"joins (who joined/left), actions (commands, advancements), all. "
|
||||
"Filter by player name. Returns newest first."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {
|
||||
"type": "string",
|
||||
"enum": ["chat", "deaths", "joins", "actions", "all"],
|
||||
"description": "Event type to query."
|
||||
},
|
||||
"player": {
|
||||
"type": "string",
|
||||
"description": "Filter by player name (optional)."
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"description": "Max results (default 5)."
|
||||
}
|
||||
},
|
||||
"required": ["type"],
|
||||
"additionalProperties": False
|
||||
},
|
||||
"returns": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {"type": "boolean"},
|
||||
"results": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"type": {"type": "string"},
|
||||
"player": {"type": "string"},
|
||||
"detail": {"type": "string"},
|
||||
"age": {"type": "string"}
|
||||
}
|
||||
}
|
||||
},
|
||||
"count": {"type": "integer"}
|
||||
}
|
||||
}
|
||||
},
|
||||
# ── User ask tool ─────────────────────────────────────────────────
|
||||
{
|
||||
"name": "user.ask",
|
||||
"description": (
|
||||
"Ask the player a clarifying question in-game via chat. "
|
||||
"Use ONLY when the request is ambiguous AND high-risk (affects other players, "
|
||||
"destructive, permanent). For low-risk ambiguity, just make a creative choice. "
|
||||
"BEFORE asking: try to resolve ambiguity using journal.read, world.server_state, "
|
||||
"log.query, and world.nearby_entities. Only ask if context doesn't resolve it."
|
||||
),
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"player": {
|
||||
"type": "string",
|
||||
"description": "Player to ask."
|
||||
},
|
||||
"question": {
|
||||
"type": "string",
|
||||
"description": "The clarifying question. Be specific about the options."
|
||||
}
|
||||
},
|
||||
"required": ["player", "question"],
|
||||
"additionalProperties": False
|
||||
},
|
||||
"returns": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"ok": {"type": "boolean"},
|
||||
"response": {"type": "string", "description": "The player's answer (filled by gateway)."}
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user