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
|
|
@ -27,7 +27,7 @@ CLAUDE_CWD = os.getenv("CLAUDE_CWD", "/home/erik/MosswartOverlord")
|
|||
# Hard cap on how long a single agent turn may take. Claude Code can spin a
|
||||
# while when chaining many tool calls; we don't want to leave a zombie
|
||||
# subprocess if something gets stuck.
|
||||
CLAUDE_TIMEOUT_S = int(os.getenv("CLAUDE_TIMEOUT_S", "120"))
|
||||
CLAUDE_TIMEOUT_S = int(os.getenv("CLAUDE_TIMEOUT_S", "240"))
|
||||
|
||||
|
||||
@dataclass
|
||||
|
|
@ -82,6 +82,7 @@ async def ask_claude(message: str, session_id: str) -> ClaudeResult:
|
|||
"mcp__overlord__get_player_state",
|
||||
"mcp__overlord__get_inventory",
|
||||
"mcp__overlord__get_inventory_search",
|
||||
"mcp__overlord__search_items",
|
||||
"mcp__overlord__get_combat_stats",
|
||||
"mcp__overlord__get_equipment_cantrips",
|
||||
"mcp__overlord__get_quest_status",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue