@chessceo/mcp 0.49.1 → 0.49.3

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/README.md CHANGED
@@ -6,7 +6,7 @@ Player/game lookups need no API key or auth. Cloud engines and prep-file tools n
6
6
 
7
7
  ## What it can do
8
8
 
9
- 49 tools as of v0.49.0, mirroring the `chess.ceo` API surface. A few of the most-used:
9
+ 51 tools as of v0.49.3, mirroring the `chess.ceo` API surface. A few of the most-used:
10
10
 
11
11
  | Tool | What it answers |
12
12
  |---|---|
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import { getNodeByPath, resolveFromNodeOrFen, storeEvalOnNode, } from "./analysi
29
29
  import { findPositionInCourses, readCourseAtPosition, runSfEval } from "./courses.js";
30
30
  import { applyBatchMutations, applyMutation, argNodeId, } from "./prep/mutations.js";
31
31
  import { listNodes, listTranspositions, readPrepFile, } from "./prep/read.js";
32
- import { createCollection, createPrepFile, findPositionInFiles, listCollections, listPrepFiles, searchPrepFiles, } from "./prep/library.js";
32
+ import { createCollection, createPrepFile, findPositionInFiles, listCollections, listPrepFiles, renameCollection, searchPrepFiles, setCollectionFolder, } from "./prep/library.js";
33
33
  import { convertAvailableMovesToSAN, normalizeSourceForBackend, stripPositionResponse, trimGamesMovetext, } from "./response_transforms.js";
34
34
  // Tools that require an MCP token — cloud engine + prep-file tools
35
35
  // operate on the caller's own account so we can't service them
@@ -43,6 +43,8 @@ const AUTHED_TOOLS = new Set([
43
43
  "cloud_analyse",
44
44
  "list_collections",
45
45
  "create_collection",
46
+ "rename_collection",
47
+ "set_collection_folder",
46
48
  "list_prep_files",
47
49
  "search_prep_files",
48
50
  "find_position_in_files",
@@ -440,6 +442,10 @@ async function callToolInner(name, args) {
440
442
  return listCollections(args);
441
443
  case "create_collection":
442
444
  return createCollection(args);
445
+ case "rename_collection":
446
+ return renameCollection(args);
447
+ case "set_collection_folder":
448
+ return setCollectionFolder(args);
443
449
  case "list_prep_files":
444
450
  return listPrepFiles(args);
445
451
  case "search_prep_files":
@@ -91,6 +91,29 @@ export async function createCollection(args) {
91
91
  folder_path: collection.folderPath,
92
92
  };
93
93
  }
94
+ export async function renameCollection(args) {
95
+ const id = typeof args.id === "string" ? args.id.trim() : "";
96
+ if (!id)
97
+ throw new Error("id is required");
98
+ const title = String(args.title || "").trim();
99
+ if (!title)
100
+ throw new Error("title is required");
101
+ const raw = await authedRequest("PUT", `${PGN_BASE}/${encodeURIComponent(id)}`, { title });
102
+ const collection = unwrap(raw);
103
+ return { ok: true, id: collection.id, title: collection.title };
104
+ }
105
+ export async function setCollectionFolder(args) {
106
+ const id = typeof args.id === "string" ? args.id.trim() : "";
107
+ if (!id)
108
+ throw new Error("id is required");
109
+ if (typeof args.folder_path !== "string") {
110
+ throw new Error("folder_path is required (pass an empty string to move the collection to root)");
111
+ }
112
+ const folderPath = args.folder_path.trim();
113
+ const raw = await authedRequest("PUT", `${PGN_BASE}/${encodeURIComponent(id)}`, { folderPath });
114
+ const collection = unwrap(raw);
115
+ return { ok: true, id: collection.id, folder_path: collection.folderPath };
116
+ }
94
117
  export async function createPrepFile(args) {
95
118
  const collectionId = typeof args.collection_id === "string" ? args.collection_id.trim() : "";
96
119
  if (!collectionId) {
package/dist/tools.js CHANGED
@@ -487,6 +487,30 @@ export const TOOLS = [
487
487
  required: ["title"],
488
488
  },
489
489
  },
490
+ {
491
+ name: "rename_collection",
492
+ description: "Rename a collection — changes only its title, not its contents or folder_path. Use when reorganizing: consolidating similarly-named collections, fixing a typo, or renaming a working title to something clearer once its scope is settled.",
493
+ inputSchema: {
494
+ type: "object",
495
+ properties: {
496
+ id: { type: "string", description: "Collection id, from list_collections." },
497
+ title: { type: "string", description: "New collection name." },
498
+ },
499
+ required: ["id", "title"],
500
+ },
501
+ },
502
+ {
503
+ name: "set_collection_folder",
504
+ description: "Move a collection to a different virtual folder — changes only folder_path, not title or contents. Pass an empty string to move it to root (no folder). folder_path is just a string field on each collection, not a real directory: this moves one collection at a time, it does not rename/merge a folder across every collection under it.",
505
+ inputSchema: {
506
+ type: "object",
507
+ properties: {
508
+ id: { type: "string", description: "Collection id, from list_collections." },
509
+ folder_path: { type: "string", description: "New virtual folder path, e.g. '/Openings/Sicilian'. Empty string moves the collection to root." },
510
+ },
511
+ required: ["id", "folder_path"],
512
+ },
513
+ },
490
514
  {
491
515
  name: "create_prep_file",
492
516
  description: "Create a new (empty) prep file in the specified collection. `name` becomes the Event PGN tag. You then extend it with mutation tools (add_move, set_comment, …).\n\n" +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chessceo/mcp",
3
- "version": "0.49.1",
3
+ "version": "0.49.3",
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": {