fix(ratings): lower minimum cyclist rating to 50 - #41
Merged
Conversation
The `pcm_update_cyclist_ratings` tool rejected ratings below 55, but the actual game minimum is 50. Update the Zod bound and the docs accordingly. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Aligns pcm_update_cyclist_ratings with the game’s actual minimum rating by lowering the input validation floor and updating user-facing documentation accordingly.
Changes:
- Lowered the Zod validation minimum for rating inputs from 55 to 50 in
pcm_update_cyclist_ratings. - Updated the tool’s schema description and documentation tables to reflect the 50–85 range.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/tools/update-cyclist-ratings.ts | Lowers the validated minimum rating to 50 and updates the tool input description accordingly. |
| README.md | Updates the documented rating range for pcm_update_cyclist_ratings to 50–85. |
| AGENTS.md | Updates the internal tool table entry to reflect the 50–85 rating range. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add boundary coverage for the rating range: 50 is accepted end-to-end and 49 is rejected by the input schema with a `too_small` issue on `minimum: 50`. Arguments now go through the registered input schema, since `callTool` invokes the tool callback directly and would otherwise skip validation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated no new comments.
Suppressed comments (1)
test/tools/update-cyclist-ratings.test.ts:51
inputSchema()uses optional chaining (?.) and then immediately passes the result intoz.object(...). If the tool registration ever regresses, this will throw an unhelpful error from inside Zod rather than clearly stating the tool wasn't registered. Make the failure explicit by fetching the tool and throwing with a clear message before constructing the schema.
const inputSchema = () =>
z.object(mcp.getTool("pcm_update_cyclist_ratings")?.config.inputSchema);
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
pcm_update_cyclist_ratingsrejected any rating below 55, but the actual game minimum is 50. This lowers the validation bound and aligns the documentation.Changes
src/tools/update-cyclist-ratings.ts: Zod boundmin(55)→min(50), and the schema description now reads50–85AGENTS.md/README.md: tool tables updated to50–85