naftiko: 1.0.0-alpha2 info: label: Lichess API — Bot description: 'Lichess API — Bot. 12 operations. Lead operation: Get online bots. Self-contained Naftiko capability covering one Lichess business surface.' tags: - Lichess - Bot created: '2026-05-25' modified: '2026-05-25' binds: - namespace: env keys: LICHESS_API_TOKEN: LICHESS_API_TOKEN capability: consumes: - type: http namespace: bot baseUri: https://lichess.org description: Lichess Bot business capability. Self-contained, no shared references. resources: - name: bot-online path: /api/bot/online operations: - name: apibotonline method: GET description: 'Get online bots' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: nb in: query type: string required: false - name: bot-account-upgrade path: /api/bot/account/upgrade operations: - name: botaccountupgrade method: POST description: 'Upgrade to Bot account' outputRawFormat: json outputParameters: - name: result type: object value: $. - name: bot-game-stream-gameid path: /api/bot/game/stream/{gameId} operations: - name: botgamestream method: GET description: 'Stream Bot game state' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: bot-game-gameid-move-move path: /api/bot/game/{gameId}/move/{move} operations: - name: botgamemove method: POST description: 'Make a Bot move' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: move in: path type: string required: true - name: offeringDraw in: query type: string required: false - name: bot-game-gameid-chat path: /api/bot/game/{gameId}/chat operations: - name: botgamechat method: POST description: 'Write in the chat' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: body in: body type: object required: false - name: botgamechatget method: GET description: 'Fetch the game chat' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: bot-game-gameid-abort path: /api/bot/game/{gameId}/abort operations: - name: botgameabort method: POST description: 'Abort a game' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: bot-game-gameid-resign path: /api/bot/game/{gameId}/resign operations: - name: botgameresign method: POST description: 'Resign a game' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: bot-game-gameid-draw-accept path: /api/bot/game/{gameId}/draw/{accept} operations: - name: botgamedraw method: POST description: 'Handle draw offers' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: accept in: path type: string required: true - name: bot-game-gameid-takeback-accept path: /api/bot/game/{gameId}/takeback/{accept} operations: - name: botgametakeback method: POST description: 'Handle takeback offers' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: accept in: path type: string required: true - name: bot-game-gameid-claim-victory path: /api/bot/game/{gameId}/claim-victory operations: - name: botgameclaimvictory method: POST description: 'Claim victory of a game' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true - name: bot-game-gameid-claim-draw path: /api/bot/game/{gameId}/claim-draw operations: - name: botgameclaimdraw method: POST description: 'Claim draw of a game' outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: gameId in: path type: string required: true authentication: type: bearer value: '{{env.LICHESS_API_TOKEN}}' placement: header exposes: - type: rest namespace: bot-rest port: 8080 description: REST adapter for Lichess Bot. One Spectral-compliant resource per consumed operation. resources: - path: /v1/api/bot/online name: bot-online description: REST surface for bot-online. operations: - method: GET name: apibotonline description: 'Get online bots' call: bot.apibotonline with: nb: rest.query.nb outputParameters: - type: object mapping: $. - path: /v1/api/bot/account/upgrade name: bot-account-upgrade description: REST surface for bot-account-upgrade. operations: - method: POST name: botaccountupgrade description: 'Upgrade to Bot account' call: bot.botaccountupgrade with: outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/stream/{gameId} name: bot-game-stream-gameid description: REST surface for bot-game-stream-gameid. operations: - method: GET name: botgamestream description: 'Stream Bot game state' call: bot.botgamestream with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/move/{move} name: bot-game-gameid-move-move description: REST surface for bot-game-gameid-move-move. operations: - method: POST name: botgamemove description: 'Make a Bot move' call: bot.botgamemove with: gameId: rest.path.gameId move: rest.path.move offeringDraw: rest.query.offeringDraw outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/chat name: bot-game-gameid-chat description: REST surface for bot-game-gameid-chat. operations: - method: POST name: botgamechat description: 'Write in the chat' call: bot.botgamechat with: gameId: rest.path.gameId body: rest.body outputParameters: - type: object mapping: $. - method: GET name: botgamechatget description: 'Fetch the game chat' call: bot.botgamechatget with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/abort name: bot-game-gameid-abort description: REST surface for bot-game-gameid-abort. operations: - method: POST name: botgameabort description: 'Abort a game' call: bot.botgameabort with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/resign name: bot-game-gameid-resign description: REST surface for bot-game-gameid-resign. operations: - method: POST name: botgameresign description: 'Resign a game' call: bot.botgameresign with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/draw/{accept} name: bot-game-gameid-draw-accept description: REST surface for bot-game-gameid-draw-accept. operations: - method: POST name: botgamedraw description: 'Handle draw offers' call: bot.botgamedraw with: gameId: rest.path.gameId accept: rest.path.accept outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/takeback/{accept} name: bot-game-gameid-takeback-accept description: REST surface for bot-game-gameid-takeback-accept. operations: - method: POST name: botgametakeback description: 'Handle takeback offers' call: bot.botgametakeback with: gameId: rest.path.gameId accept: rest.path.accept outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/claim-victory name: bot-game-gameid-claim-victory description: REST surface for bot-game-gameid-claim-victory. operations: - method: POST name: botgameclaimvictory description: 'Claim victory of a game' call: bot.botgameclaimvictory with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - path: /v1/api/bot/game/{gameId}/claim-draw name: bot-game-gameid-claim-draw description: REST surface for bot-game-gameid-claim-draw. operations: - method: POST name: botgameclaimdraw description: 'Claim draw of a game' call: bot.botgameclaimdraw with: gameId: rest.path.gameId outputParameters: - type: object mapping: $. - type: mcp namespace: bot-mcp port: 9090 transport: http description: MCP adapter for Lichess Bot. One tool per consumed operation. tools: - name: lichess-apibotonline description: 'Get online bots' hints: readOnly: true destructive: false idempotent: false call: bot.apibotonline with: nb: tools.nb outputParameters: - type: object mapping: $. - name: lichess-botaccountupgrade description: 'Upgrade to Bot account' hints: readOnly: false destructive: false idempotent: false call: bot.botaccountupgrade with: outputParameters: - type: object mapping: $. - name: lichess-botgamestream description: 'Stream Bot game state' hints: readOnly: true destructive: false idempotent: false call: bot.botgamestream with: gameId: tools.gameId outputParameters: - type: object mapping: $. - name: lichess-botgamemove description: 'Make a Bot move' hints: readOnly: false destructive: false idempotent: false call: bot.botgamemove with: gameId: tools.gameId move: tools.move offeringDraw: tools.offeringDraw outputParameters: - type: object mapping: $. - name: lichess-botgamechat description: 'Write in the chat' hints: readOnly: false destructive: false idempotent: false call: bot.botgamechat with: gameId: tools.gameId body: tools.body outputParameters: - type: object mapping: $. - name: lichess-botgamechatget description: 'Fetch the game chat' hints: readOnly: true destructive: false idempotent: false call: bot.botgamechatget with: gameId: tools.gameId outputParameters: - type: object mapping: $. - name: lichess-botgameabort description: 'Abort a game' hints: readOnly: false destructive: false idempotent: false call: bot.botgameabort with: gameId: tools.gameId outputParameters: - type: object mapping: $. - name: lichess-botgameresign description: 'Resign a game' hints: readOnly: false destructive: false idempotent: false call: bot.botgameresign with: gameId: tools.gameId outputParameters: - type: object mapping: $. - name: lichess-botgamedraw description: 'Handle draw offers' hints: readOnly: false destructive: false idempotent: false call: bot.botgamedraw with: gameId: tools.gameId accept: tools.accept outputParameters: - type: object mapping: $. - name: lichess-botgametakeback description: 'Handle takeback offers' hints: readOnly: false destructive: false idempotent: false call: bot.botgametakeback with: gameId: tools.gameId accept: tools.accept outputParameters: - type: object mapping: $. - name: lichess-botgameclaimvictory description: 'Claim victory of a game' hints: readOnly: false destructive: false idempotent: false call: bot.botgameclaimvictory with: gameId: tools.gameId outputParameters: - type: object mapping: $. - name: lichess-botgameclaimdraw description: 'Claim draw of a game' hints: readOnly: false destructive: false idempotent: false call: bot.botgameclaimdraw with: gameId: tools.gameId outputParameters: - type: object mapping: $.