What a piece attacks
chess_attacksReturns the exact list of squares attacked by the piece standing on a given square in a chess position, together with that piece's type and colour. Returns an empty list when the square is unoccupied. Accepts a FEN, a PGN, or a list of SAN moves from the starting position.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fen | No | FEN of the position. | |
| pgn | No | PGN; the position after the final move is used. | |
| moves | No | SAN moves from the start, e.g. ["e4","e5"]. | |
| square | Yes | The square, e.g. "d5". |