Skip to content

[Bug]: modify_reviews add_comment can't post an inline comment on an added or deleted line #46

Open

Description

@dmnbrdblbr

Description

CommentContext.validate_context_semantics requires leftLine, rightLine and content together and both line fields have ge=1. In Code Review a comment on an added line has no left line and a comment on a deleted line has no right line, so neither can be posted through mcp.

Steps to Reproduce

call modify_reviews with action=add_comment, comment_file_path, comment_right_line=62, comment_content=[...] and comment_version=2, without comment_left_line. The call fails with:
Value error, leftLine, rightLine, and content must all be specified together

Expected Behavior

require at least one of leftLine and rightLine (plus content if that's still wanted) and allow the other to be omitted, so add_comment can target added and deleted lines the same way the Swarm UI does.

Actual Behavior

The call fails with:
Value error, leftLine, rightLine, and content must all be specified together

Activity

  1. github-actions commented on Oct 15, 2026

    @github-actions

    A Jira ticket has been created: P4MCP-280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions