non negative line validation for comment server (#429)

* enforce non-negative validation for line in GH comment server

* include  .nonnegative() for startLine too
This commit is contained in:
Steve
2025-08-08 10:36:20 -05:00
committed by GitHub
parent fec554fc7c
commit 6d5c92076b

View File

@@ -41,12 +41,14 @@ server.tool(
), ),
line: z line: z
.number() .number()
.nonnegative()
.optional() .optional()
.describe( .describe(
"Line number for single-line comments (required if startLine is not provided)", "Line number for single-line comments (required if startLine is not provided)",
), ),
startLine: z startLine: z
.number() .number()
.nonnegative()
.optional() .optional()
.describe( .describe(
"Start line for multi-line comments (use with line parameter for the end line)", "Start line for multi-line comments (use with line parameter for the end line)",