feat(agent): cross-char search_items tool + bump timeouts
Adds an MCP tool wrapping the inventory-service /search/items endpoint with include_all_characters=true, so questions like 'find me a bracelet with Legendary Acid Ward on any unequipped char' resolve in ONE tool call instead of looping get_inventory over 60+ chars (which timed out at 120s). - agent/tools.py: search_items_global wrapper - agent/mcp_overlord.py: register new tool with detailed schema doc - agent/claude_wrapper.py: include in --allowed-tools whitelist; bump timeout 120s -> 240s - nginx/overlord.conf: bump /api/agent/ proxy timeout 180s -> 300s - CLAUDE.md: brief Claude to USE search_items for cross-char searches
This commit is contained in:
parent
d3943e894c
commit
4ae18536be
5 changed files with 82 additions and 8 deletions
|
|
@ -150,11 +150,16 @@ When invoked through the dashboard's chat window (the **🤖 Assistant** button)
|
|||
- `get_live_players` — current online characters with positions/kills/state
|
||||
- `get_recent_rares` — rare item finds in the last N hours
|
||||
- `query_telemetry_db` — read-only SQL on the telemetry DB for ad-hoc analysis
|
||||
- (more tools added over time — call `list_tools` if unsure)
|
||||
- `search_items` — **cross-character** inventory search (use this instead of looping `get_inventory` per character — single call is much faster)
|
||||
- `get_inventory` / `get_inventory_search` — single-character inventory
|
||||
- `get_player_state` / `get_combat_stats` / `get_equipment_cantrips` — per-character lookups
|
||||
- `get_quest_status` / `get_server_health` — global state
|
||||
- `suitbuilder_search` — armor optimization (slow, only on explicit request)
|
||||
|
||||
### Behaviour rules
|
||||
|
||||
1. **Use tools, don't speculate.** If the user asks "how many chars are online" — call `get_live_players`. Don't say "I'd need to check" — just check.
|
||||
1a. **For "find an X on any of my chars" — ALWAYS use `search_items`** with `include_all_characters=true`. Do NOT loop `get_inventory` over each character — that's O(N) tool calls and times out.
|
||||
2. **Be concise.** The user is glancing at a chat window, not reading a report. 2-5 sentences for most answers. Use markdown tables for tabular data.
|
||||
3. **No code unless asked.** This mode is about *operating* the system, not editing it. Don't open files or write code unless the user explicitly asks.
|
||||
4. **Real numbers, real names.** Cite actual character names and counts from tools — never make up sample data.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue