search_priority_moves
Find priority moves in Pokemon Showdown to identify options that act before normal moves, helping you outspeed opponents in competitive battles.
Instructions
Find all moves with priority (moves that go before normal moves). Useful for finding options when you need to outspeed an opponent.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| min_priority | No | Minimum priority value (default 1) |
Implementation Reference
- MCP tool handler for search_priority_moves: extracts parameters, calls data loader to fetch moves, sorts them by priority descending, formats a markdown list (top 30), and returns as TextContent.elif name == "search_priority_moves": min_priority = arguments.get("min_priority", 1) moves = loader.search_moves_by_priority(min_priority) if not moves: return [TextContent(type="text", text="No priority moves found.")] # Sort by priority descending moves.sort(key=lambda m: m.get("priority", 0), reverse=True) lines = [f"## Priority Moves (priority >= {min_priority})\n"] for move in moves[:30]: # Limit to 30 priority = move.get("priority", 0) power = move.get("basePower", 0) move_type = move.get("type", "") name = move.get("name", move.get("id", "")) lines.append(f"- **{name}** (+{priority}): {move_type}, {power} power") return [TextContent(type="text", text="\n".join(lines))]
- mcpkmn_showdown/pokemon_server.py:260-273 (registration)Registers the search_priority_moves tool in list_tools() with name, description, and input schema for optional min_priority parameter.Tool( name="search_priority_moves", description="Find all moves with priority (moves that go before normal moves). Useful for finding options when you need to outspeed an opponent.", inputSchema={ "type": "object", "properties": { "min_priority": { "type": "integer", "description": "Minimum priority value (default 1)", "default": 1 } } } ),
- Input schema defining the optional min_priority integer parameter (default 1).inputSchema={ "type": "object", "properties": { "min_priority": { "type": "integer", "description": "Minimum priority value (default 1)", "default": 1 } } }
- Core helper method in PokemonDataLoader that filters loaded moves data for those with priority >= min_priority and returns enriched dicts with id.def search_moves_by_priority(self, min_priority: int = 1) -> list[dict]: """Find all priority moves.""" self.load_all() return [ {"id": k, **v} for k, v in self.moves.items() if v.get("priority", 0) >= min_priority ]