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
- src/pokemon_server.py:364-382 (handler)Main tool handler: extracts min_priority from arguments, calls loader to get moves, sorts by priority descending, limits to top 30, formats as markdown list with name, priority, type, power.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))]
- src/data_loader.py:167-174 (helper)Core helper function in data loader: loads move data if needed, returns list of all moves (with id added) where priority >= min_priority.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 ]
- src/pokemon_server.py:260-273 (registration)Tool registration in list_tools(): defines name, description, and input schema for the MCP server.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 } } } ),
- src/pokemon_server.py:263-272 (schema)Input schema: optional 'min_priority' as integer with default 1.inputSchema={ "type": "object", "properties": { "min_priority": { "type": "integer", "description": "Minimum priority value (default 1)", "default": 1 } } }