@chessceo/mcp 0.35.0 → 0.35.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +22 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -214,7 +214,7 @@ const TOOLS = [
214
214
  "- `chesscom` — needs `username`. Filters: `color`, `startMonth`/`endMonth` (**required** for chesscom/lichess), `timeControl`.\n" +
215
215
  "- `lichess` — needs `username`. Same filters as chesscom; `timeControl` also accepts `bullet` on Lichess.\n\n" +
216
216
  "Multi-source example: one player with both a FIDE ID and a Lichess account → two sources in one call, all their games combined into one session.\n\n" +
217
- "GROUNDING: every claim about the opponent's repertoire must trace back to a `get_prep_position` call on this session. Don't assert 'they play sharply' or 'they hate isolated queen pawn' without pointing at actual game counts / win rates in the response. Prep is a two-player game — see `read_prep_strategy_guide` before recommending an opening plan.",
217
+ "GROUNDING: every claim about the opponent's repertoire must trace back to a `get_prep_position` call on this session. Don't assert 'they play sharply' or 'they hate isolated queen pawn' without pointing at actual game counts / win rates in the response. Prep is a two-player game — see `read_opening_prep_guide` before recommending an opening plan.",
218
218
  inputSchema: {
219
219
  type: "object",
220
220
  properties: {
@@ -252,7 +252,7 @@ const TOOLS = [
252
252
  "• Prep is symmetric information — both sides see the same history. Assume the opponent knows the weakness you spotted.\n" +
253
253
  "• Recency > career. The last 12-24 months dominate — filter your session with `start_month` if the player's repertoire shifted.\n" +
254
254
  "• Opponent will deviate early. Prep is a tree — cover the 2 most likely replies at each real branching point, not one 20-move line.\n\n" +
255
- "For the full guide call `read_prep_strategy_guide`.",
255
+ "For the full guide call `read_opening_prep_guide`.",
256
256
  inputSchema: {
257
257
  type: "object",
258
258
  properties: {
@@ -877,13 +877,16 @@ const TOOLS = [
877
877
  inputSchema: { type: "object", properties: {} },
878
878
  },
879
879
  {
880
- name: "read_prep_strategy_guide",
881
- description: "Returns the full chess.ceo prep-strategy guide: why win% is one weight not a verdict, why prep is a two-player game with symmetric information (opponent sees your history too), how sample size and recency change the reading, when 'revealed weaknesses' are actionable vs already patched, how to use move-order tricks with the `trs` field, and how to calibrate surprise (rare secondary lines inside the existing repertoire, not big first-move switches). Call this ONCE per session before recommending an opening plan, especially when the user is preparing for a specific real opponent.",
880
+ name: "read_opening_prep_guide",
881
+ description: "**CALL WHEN**: the user asks about OPENING PREPARATION 'prep me against X', 'what should I play vs the Najdorf', 'help me build a repertoire against 1.e4', 'walk this opponent's Sveshnikov'. This guide is chess-and-analysis philosophy, not storage semantics.\n\n" +
882
+ "Covers: why win% is one weight not a verdict, why prep is a two-player game with symmetric information (opponent sees your history too), how sample size and recency change the reading, when 'revealed weaknesses' are actionable vs already patched, how to choose between the GM-classical DB and the main DB, when to combine chesscom/lichess sources with FIDE, the three chess.com profile shapes (consistent / eclectic / split-personality), the reversed-colours scarcity trick, how to calibrate surprise (rare secondary lines inside the existing repertoire, not big first-move switches).\n\n" +
883
+ "Different tool: `read_prep_files_guide` covers the FILE STORAGE feature (how to list/create/save prep files) — call that only when about to manipulate files, not for opening questions.",
882
884
  inputSchema: { type: "object", properties: {} },
883
885
  },
884
886
  {
885
887
  name: "read_prep_files_guide",
886
- description: "Returns the guide to the prep-files FEATURE — how the storage works, when to list vs search vs create, optimistic locking with `version`, and naming conventions for the [Event] tag. Call this ONCE per session before your first create_prep_file. For how to actually WRITE PGN (mainline, variations, NAGs, arrows, comments) call read_pgn_authoring_guide instead — separate concern.",
888
+ description: "**CALL WHEN**: you're about to CREATE, LIST, SAVE, or DELETE a prep file the persistent file storage feature. Not for opening prep philosophy (that's `read_opening_prep_guide`) and not for how to write PGN (that's `read_pgn_authoring_guide`).\n\n" +
889
+ "Covers: the AI Prep folder, when to list vs search vs create (avoid duplicate 'Prep vs Firouzja' files), optimistic locking with `version`, naming conventions for the [Event] tag, node-id addressing basics.",
887
890
  inputSchema: { type: "object", properties: {} },
888
891
  },
889
892
  {
@@ -1546,17 +1549,26 @@ function analysisToStoredEval(analysis, fen) {
1546
1549
  if (!analysis || typeof analysis !== "object")
1547
1550
  return null;
1548
1551
  const r = analysis;
1549
- const whiteToMove = / w /.test(fen);
1550
- const flip = (n) => (whiteToMove ? n : -n);
1552
+ // NOTE: the backend already returns White-POV cp/mate (engine-ws flips
1553
+ // in ParseInfo based on side-to-move, then cloud_snapshot passes the
1554
+ // number through). Previously this function ALSO flipped on
1555
+ // black-to-move — a double flip that silently inverted every
1556
+ // Black-to-move position's stored eval, so half of every prep tree
1557
+ // had wrong-sign ceoEval and the auto-attached .eval on those
1558
+ // positions reported White as better when Black was. Any ceoEval
1559
+ // written on a Black-to-move node prior to 2026-07-26 is inverted;
1560
+ // re-run auto_evaluate on affected files to overwrite.
1561
+ // Unused `fen` kept as an arg for signature stability with callers.
1562
+ void fen;
1551
1563
  const engineEval = (block) => {
1552
1564
  const line = block?.lines?.[0];
1553
1565
  if (!line)
1554
1566
  return undefined;
1555
1567
  const depth = line.depth ?? block?.depth;
1556
1568
  if (typeof line.mate === "number")
1557
- return { mate: flip(line.mate), depth };
1569
+ return { mate: line.mate, depth };
1558
1570
  if (typeof line.scoreCp === "number")
1559
- return { cp: flip(line.scoreCp), depth };
1571
+ return { cp: line.scoreCp, depth };
1560
1572
  return undefined;
1561
1573
  };
1562
1574
  const sf = engineEval(r.stockfish);
@@ -2155,7 +2167,7 @@ async function callToolInner(name, args) {
2155
2167
  }
2156
2168
  case "read_engine_usage_guide":
2157
2169
  return { guide: ENGINE_USAGE_DOC };
2158
- case "read_prep_strategy_guide":
2170
+ case "read_opening_prep_guide":
2159
2171
  return { guide: PREP_STRATEGY_DOC };
2160
2172
  case "read_prep_files_guide":
2161
2173
  return { guide: PREP_FILES_DOC };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chessceo/mcp",
3
- "version": "0.35.0",
3
+ "version": "0.35.1",
4
4
  "description": "Model Context Protocol server for chess.ceo — 11.7M+ games, ~1.5M FIDE player profiles, opening preparation, live broadcasts.",
5
5
  "type": "module",
6
6
  "bin": {