refactor: name a .cdb a database, and keep "save" for the player's saves - #23
Open
mpicciolli wants to merge 12 commits into
Open
refactor: name a .cdb a database, and keep "save" for the player's saves#23mpicciolli wants to merge 12 commits into
mpicciolli wants to merge 12 commits into
Conversation
Aligns terminology across the README with the actual PCM save concept, since the tools operate on saves in general, not just career mode. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates README terminology to consistently refer to PCM .cdb files as “saves” (instead of “career saves”), aligning the documentation with how the server and tools operate.
Changes:
- Updates the README intro copy to say “saves”.
- Rewords the “IMPORTANT” section to describe
.cdbfiles as saves. - Updates feature, prerequisites, platform support, and tool table wording to use “save”.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…te-readme-save-terminology
…te-readme-save-terminology
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 39 out of 39 changed files in this pull request and generated no new comments.
Suppressed comments (3)
README.md:121
- The PR metadata says this is a docs-only terminology tweak, but the changes here document (and the PR implements) a breaking public API rename (tool names +
savePath→databasePath). Please update the PR title/description (or split into separate PRs) so reviewers and release notes accurately reflect the scope.
## Renamed tools
Several tools and the parameter they all take were renamed, so that "save" now means only what the game itself saved and everything else says "database". MCP clients read the tool list at connect time, so **no configuration change is needed** — restart your client and it picks up the new names. Only hand-written prompts, scripts or skills that name a tool or `savePath` explicitly need updating:
package.json:4
- This PR renames multiple public MCP tools/parameters (breaking change). The package version is unchanged (still 0.3.0), which makes it hard for users to discover the breaking API change and for downstream clients to pin compatible versions. Consider bumping the package/manifest version as part of this change.
"name": "pcm-mcp",
"version": "0.3.0",
"description": "MCP server for querying Pro Cycling Manager databases",
src/index.ts:16
- The MCP server description now says it only supports reading/validating, but this server also registers write tools (e.g.
pcm_update_database,pcm_update_cyclist_ratings). This metadata can be surfaced by clients, so it should reflect the full capability set.
const server = new McpServer({
name: "pcm-mcp",
version,
description:
"Pro Cycling Manager MCP server for reading and validating .cdb database files",
});
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 40 changed files in this pull request and generated no new comments.
Suppressed comments (2)
src/index.ts:16
- The server description says it is for "reading and validating"
.cdbfiles, but this server also exposes write tools (e.g.pcm_update_database,pcm_update_cyclist_ratings). This string is likely user-facing in MCP clients, so it should reflect editing capabilities too.
const server = new McpServer({
name: "pcm-mcp",
version,
description:
"Pro Cycling Manager MCP server for reading and validating .cdb database files",
});
manifest.json:6
long_descriptioncontains a sentence fragment: "PCM stores its data as binary .cdb database files. Your career saves, but also the official releases and community updates." This reads ungrammatically in marketplace/client UIs; rephrase to a complete sentence.
"long_description": "MCP server for querying and editing Pro Cycling Manager game databases. PCM stores its data as binary .cdb database files. Your career saves, but also the official releases and community updates. This server discovers your saves, and inspects and queries any .cdb via the MCP protocol, so AI assistants can explore it in a structured way. Write tools never modify the source: edits are always serialized to a new .cdb file, and existing files are never overwritten.",
…ion between saves and databases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A
.cdbfile is a database — Cyanide's own binary format. It may be a career save, but equally an official release or a community update, and the tools never cared which. Calling every.cdba "save" was therefore wrong for most inputs: every test fixture in this repo is anOfficialRelease-*.cdb, not a save.This PR splits the two concepts and names them separately:
.cdbfile. What every tool but one actually operates on..cdbthe game itself wrote as the player played a career, found under a PCM edition'sCloud/folder. Confined tosrc/saves.tsandpcm_list_saves.The word "save" also doubled as a verb (
writeSaveDb,pcm_update_save— "update the save" or "save the update"?), which this removes.Breaking changes
Tool and parameter renames. MCP clients read the tool list at connect time, so no client configuration change is needed — only hand-written prompts, scripts or skills that name a tool or
savePathexplicitly.savePath(11 tools)databasePathpcm_validate_savepcm_validate_databasepcm_get_save_schemapcm_list_tablespcm_query_savepcm_query_databasepcm_update_savepcm_update_databasepcm_list_saveskeeps its name — it is the one tool genuinely about the player's saves. The seven other tools are unchanged apart from theirdatabasePathparameter.pcm_get_save_schemabecomespcm_list_tablesrather thanpcm_get_database_schema: it returns the table list, and the old name was asymmetric withpcm_get_table_schema(which returns columns).No version bump — the release number is left to a separate decision.
Internal changes
src/save-db.ts→src/cdb.ts, now owning everything that touches a.cdb:CdbFile,validateCdb,CdbDatabase,withCdb,writeCdb,getGameDate,getTableColumnNames.src/saves.tsis reduced to what its name claims: locating the player's career saves across installed PCM editions.validateSavelived here while validating arbitrary.cdbpaths — the root of the ambiguity — and moved tocdb.tsasvalidateCdb, with its tests.get-save-schema.ts→list-tables.ts, etc.).test/fixtures/save.fixture.ts→database.fixture.ts, since those fixtures are official releases.cyclisteverywhere in tool descriptions (riderkept only forrider type/STA_type_rider), andNot a .cdb filereplaces the misleadingNot a .cdb save fileerror.Documentation
README.md— a "Saves and databases" section stating the distinction, plus a rename table for anyone with hand-written prompts.AGENTS.md— a Terminology section so the distinction holds for future changes..claude/skills/pcm-startlist/SKILL.mdupdated to the new tool names.