@chessceo/mcp 0.49.0 → 0.49.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.
@@ -53,8 +53,11 @@ export async function searchPrepFiles(args) {
53
53
  if (!q)
54
54
  throw new Error("query required");
55
55
  const raw = await authedRequest("GET", `${PGN_BASE}/games/search?q=${encodeURIComponent(q)}&limit=100`);
56
- const data = unwrap(raw);
57
- const games = data?.games ?? [];
56
+ // Unlike list_prep_files' {games:[...]} envelope, the cross-collection
57
+ // search handler (RespondPaginated) puts the array straight into `data` —
58
+ // `data?.games` was always undefined here, so this silently returned []
59
+ // for every query/position regardless of real matches (found 2026-09-11).
60
+ const games = unwrap(raw) ?? [];
58
61
  return { query: q, prep_files: games.map(projectGameRow) };
59
62
  }
60
63
  export async function findPositionInFiles(args) {
@@ -63,8 +66,8 @@ export async function findPositionInFiles(args) {
63
66
  const resolved = await resolveFromNodeOrFen(args);
64
67
  const fen = resolved.fen;
65
68
  const raw = await authedRequest("GET", `${PGN_BASE}/games/search?position=${encodeURIComponent(fen)}&limit=100`);
66
- const data = unwrap(raw);
67
- const games = data?.games ?? [];
69
+ // See searchPrepFiles above — RespondPaginated's `data` is the array itself.
70
+ const games = unwrap(raw) ?? [];
68
71
  return {
69
72
  fen,
70
73
  match_count: games.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chessceo/mcp",
3
- "version": "0.49.0",
3
+ "version": "0.49.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": {