lichess_user_games
Return a Lichess user's games by username as JSON records with players, ratings, status and moves, newest first; max is 1 through 100 (default 20). Filter by since/until epoch milliseconds, vs opponent, rated, comma-separated perfType, color or analysed, and opt into pgnInJson, clocks, evals, accuracy, opening or ongoing games. Use lichess_game for one known game ID or lichess_user_current_game for the game in progress.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"username": "<username>"
},
"name": "lichess_user_games"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vs | No | Optional filter: only games played against this opponent username. | |
| max | No | Optional number of games, 1 through 100; default 20. Games are newest first unless sort=dateAsc. | |
| sort | No | Optional sort order: dateAsc or dateDesc (source default). | |
| tags | No | Optional; include the PGN tags in the pgn field (source default true). | |
| color | No | Optional filter: only games the user played as this color. | |
| evals | No | Optional; include analysis evaluations in an analysis field when available (source default false). | |
| moves | No | Optional; include the moves (source default true). | |
| rated | No | Optional filter: true for rated games only, false for casual games only. | |
| since | No | Optional earliest game time as epoch milliseconds (at least 1356998400070). | |
| until | No | Optional latest game time as epoch milliseconds (at least 1356998400070). | |
| clocks | No | Optional; include clock times in a clocks field (source default false). | |
| lastFen | No | Optional; include the X-FEN of the last position (source default false). | |
| ongoing | No | Optional; include ongoing games, delayed by 3 to 60 seconds (source default false). | |
| opening | No | Optional; include the opening name (source default false). | |
| accuracy | No | Optional; include each player's accuracy percent when available (source default false). | |
| analysed | No | Optional filter: only games with (true) or without (false) a computer analysis. | |
| division | No | Optional; include the plies that mark the start of the middlegame and endgame (source default false). | |
| finished | No | Optional; include finished games; false returns ongoing games only (source default true). | |
| literate | No | Optional; insert textual annotations into the pgn field (source default false). | |
| perfType | No | Optional filter: one or more comma-separated speeds or variants from /lichess/enums user_perf_types, for example blitz,rapid. | |
| username | Yes | Required Lichess username whose games are exported. | |
| pgnInJson | No | Optional; include the full PGN in a pgn field of each game (source default false). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The tool result payload (shape varies per tool; see each tool's docs resource). |