@chessceo/mcp 0.17.0 → 0.19.0
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.
- package/dist/index.js +64 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -65,6 +65,7 @@ const AUTHED_TOOLS = new Set([
|
|
|
65
65
|
"create_prep_file",
|
|
66
66
|
"save_prep_file",
|
|
67
67
|
"delete_prep_file",
|
|
68
|
+
"predict_human_move",
|
|
68
69
|
]);
|
|
69
70
|
function isAuthedToolCall(body) {
|
|
70
71
|
if (!body || typeof body !== "object")
|
|
@@ -269,6 +270,51 @@ const TOOLS = [
|
|
|
269
270
|
},
|
|
270
271
|
},
|
|
271
272
|
},
|
|
273
|
+
{
|
|
274
|
+
name: "predict_human_move",
|
|
275
|
+
description: "Predicts what a HUMAN of the given rating will most likely play from a position. Rating-conditioned neural net (ResNet-20x256) — you get the top-N most likely moves with their probabilities and a WDL value head (White POV).\n\n" +
|
|
276
|
+
"This is a completely different question from the engine tools (analyse / cloud_analyse):\n" +
|
|
277
|
+
"• Engines answer: 'what is objectively best?'\n" +
|
|
278
|
+
"• predict_human_move answers: 'what will my 2200-rated opponent actually play here?'\n\n" +
|
|
279
|
+
"Prime use cases in prep:\n" +
|
|
280
|
+
"• After you've found what the opponent SHOULD do (with the engine), check what they'll ACTUALLY do at their rating. If the top human move is a mistake, you have a real practical advantage.\n" +
|
|
281
|
+
"• The WDL head is rating-aware — a 400-point gap will show up as a big win probability even in equal positions (the model has learned that human errors compound).\n" +
|
|
282
|
+
"• Pass `prev_fen` (most recent first) when analysing mid-trade positions — without history the model treats the position as quiet.\n\n" +
|
|
283
|
+
"Position input is flexible — pass `fen`, or `moves` from startpos, or `fen + moves`. Default rating 2400 both sides. ~1-2s per call. **Premium (or admin/moderator) only** — anonymous calls get 402.",
|
|
284
|
+
inputSchema: {
|
|
285
|
+
type: "object",
|
|
286
|
+
properties: {
|
|
287
|
+
fen: { type: "string", description: "Starting position as FEN." },
|
|
288
|
+
moves: {
|
|
289
|
+
type: "string",
|
|
290
|
+
description: "Optional SAN moves to apply on top of `fen` (or startpos).",
|
|
291
|
+
},
|
|
292
|
+
white_elo: {
|
|
293
|
+
type: "integer",
|
|
294
|
+
minimum: 100,
|
|
295
|
+
maximum: 3400,
|
|
296
|
+
description: "White's rating (default 2400).",
|
|
297
|
+
},
|
|
298
|
+
black_elo: {
|
|
299
|
+
type: "integer",
|
|
300
|
+
minimum: 100,
|
|
301
|
+
maximum: 3400,
|
|
302
|
+
description: "Black's rating (default 2400).",
|
|
303
|
+
},
|
|
304
|
+
top: {
|
|
305
|
+
type: "integer",
|
|
306
|
+
minimum: 1,
|
|
307
|
+
maximum: 20,
|
|
308
|
+
description: "Number of top predicted moves to return (default 5).",
|
|
309
|
+
},
|
|
310
|
+
prev_fens: {
|
|
311
|
+
type: "array",
|
|
312
|
+
items: { type: "string" },
|
|
313
|
+
description: "Previous FEN(s), most recent first. Optional — omit for quiet-position analysis. Useful mid-trade so the model doesn't assume the position is stable.",
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
},
|
|
272
318
|
{
|
|
273
319
|
name: "get_head_to_head",
|
|
274
320
|
description: "Complete head-to-head record between two players. Includes overall and per-colour W/D/L (from player A's perspective), splits by time control, most-played openings between them, first / last meeting, average game length, and the game list.",
|
|
@@ -743,6 +789,24 @@ async function callToolInner(name, args) {
|
|
|
743
789
|
const raw = await get("/api/chess/database/analyse", params);
|
|
744
790
|
return convertAnalyseResponse(raw, fen);
|
|
745
791
|
}
|
|
792
|
+
case "predict_human_move": {
|
|
793
|
+
const fen = resolveFenFromArgs(args);
|
|
794
|
+
const qs = new URLSearchParams();
|
|
795
|
+
qs.set("fen", fen);
|
|
796
|
+
if (typeof args.white_elo === "number")
|
|
797
|
+
qs.set("white_elo", String(args.white_elo));
|
|
798
|
+
if (typeof args.black_elo === "number")
|
|
799
|
+
qs.set("black_elo", String(args.black_elo));
|
|
800
|
+
if (typeof args.top === "number")
|
|
801
|
+
qs.set("top", String(args.top));
|
|
802
|
+
if (Array.isArray(args.prev_fens)) {
|
|
803
|
+
for (const p of args.prev_fens) {
|
|
804
|
+
if (typeof p === "string" && p.length > 0)
|
|
805
|
+
qs.append("prev_fen", p);
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
return authedRequest("GET", `/api/agent/predict-move?${qs.toString()}`);
|
|
809
|
+
}
|
|
746
810
|
case "get_head_to_head":
|
|
747
811
|
return get("/api/chess/players/h2h", {
|
|
748
812
|
a: Number(args.fide_id_a),
|
package/package.json
CHANGED