From 6d5c92076ba3f5240a002d916ca6f91c5fa05529 Mon Sep 17 00:00:00 2001 From: Steve Date: Fri, 8 Aug 2025 10:36:20 -0500 Subject: [PATCH] non negative line validation for comment server (#429) * enforce non-negative validation for line in GH comment server * include .nonnegative() for startLine too --- src/mcp/github-inline-comment-server.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mcp/github-inline-comment-server.ts b/src/mcp/github-inline-comment-server.ts index 28a8658..a432466 100644 --- a/src/mcp/github-inline-comment-server.ts +++ b/src/mcp/github-inline-comment-server.ts @@ -41,12 +41,14 @@ server.tool( ), line: z .number() + .nonnegative() .optional() .describe( "Line number for single-line comments (required if startLine is not provided)", ), startLine: z .number() + .nonnegative() .optional() .describe( "Start line for multi-line comments (use with line parameter for the end line)",