@@ -28,20 +28,20 @@ var (
2828)
2929
3030type inlineComment struct {
31- File string `json:"file" jsonschema:"File path; /COMMIT_MSG or /PATCHSET_LEVEL for non-file comments"`
31+ File string `json:"file" jsonschema:"File path as list_change_files reports it ; /COMMIT_MSG or /PATCHSET_LEVEL for non-file comments"`
3232 Message string `json:"message" jsonschema:"Comment text"`
33- Line int `json:"line,omitempty" jsonschema:"1-based line, omit for a file-level comment"`
34- StartLine int `json:"start_line,omitempty" jsonschema:"Multi -line comment start , used with end_line"`
35- EndLine int `json:"end_line,omitempty" jsonschema:"Multi -line comment end , inclusive"`
33+ Line int `json:"line,omitempty" jsonschema:"1-based line in the new version of the file; omit for a file-level comment"`
34+ StartLine int `json:"start_line,omitempty" jsonschema:"First line of a multi -line comment (new version of the file) , used with end_line"`
35+ EndLine int `json:"end_line,omitempty" jsonschema:"Last line of a multi -line comment, inclusive"`
3636 ReplyTo string `json:"reply_to,omitempty" jsonschema:"Comment id to reply to, from get_change_comments"`
37- Resolved * bool `json:"resolved,omitempty" jsonschema:"Thread resolution intent ; replies inherit when omitted"`
37+ Resolved * bool `json:"resolved,omitempty" jsonschema:"true resolves the thread, false reopens it ; replies inherit the thread state when omitted"`
3838}
3939
4040type postCommentsInput struct {
41- Change string `json:"change" jsonschema:"Change identifier: numeric ID , project~number, or Change-Id"`
42- Message string `json:"message,omitempty" jsonschema:"Top-level review message"`
43- Comments []inlineComment `json:"comments,omitempty" jsonschema:"Inline and file comments to publish"`
44- Notify string `json:"notify,omitempty" jsonschema:"NONE, OWNER, OWNER_REVIEWERS, or ALL; default ALL"`
41+ Change string `json:"change" jsonschema:"Change identifier: change number (123) , project~number (myproject~123) , or Change-Id (I8473b95...) "`
42+ Message string `json:"message,omitempty" jsonschema:"Top-level review message, shown on the change rather than on a file "`
43+ Comments []inlineComment `json:"comments,omitempty" jsonschema:"Inline, range, file-level, and reply comments to publish"`
44+ Notify string `json:"notify,omitempty" jsonschema:"Who is notified by email: NONE, OWNER, OWNER_REVIEWERS, or ALL; default ALL"`
4545}
4646
4747func postComments (c * gerritclient.Client ) Tool {
@@ -50,12 +50,14 @@ func postComments(c *gerritclient.Client) Tool {
5050 Register : func (s * mcp.Server ) {
5151 mcp .AddTool (s , & mcp.Tool {
5252 Name : NamePostComments ,
53- Description : "Post a review to a Gerrit change in one call: optional top-level message " +
54- "plus inline, range, file-level, and reply comments. New comments must name a file " +
55- "of the current revision (or /COMMIT_MSG, /PATCHSET_LEVEL); replies anchor to " +
56- "comment ids from get_change_comments, and setting resolved on a reply toggles the " +
57- "thread state. Refused on changes not owned by the authenticated account unless " +
58- "the operator disabled the own-changes restriction." ,
53+ Description : "Post a review to a Gerrit change in one call, published immediately and " +
54+ "visible to everyone on the change: optional top-level message plus inline " +
55+ "(file and line), range, file-level, and reply comments. New comments must " +
56+ "name a file exactly as list_change_files reports it (or /COMMIT_MSG, " +
57+ "/PATCHSET_LEVEL); replies anchor to comment ids from get_change_comments, and " +
58+ "setting resolved on a reply toggles the thread state. Refused on changes not " +
59+ "owned by the authenticated account unless the operator disabled the " +
60+ "own-changes restriction." ,
5961 }, func (ctx context.Context , _ * mcp.CallToolRequest , in postCommentsInput ,
6062 ) (* mcp.CallToolResult , any , error ) {
6163 input , err := buildReviewInput (ctx , c , in )
0 commit comments