{
  "type": "object",
  "properties": {
    "action": {
      "type": "string",
      "enum": [
        "list",
        "create",
        "reply",
        "edit",
        "resolve",
        "reopen",
        "reattach",
        "signal",
        "summary",
        "get_decision",
        "request_decision",
        "decide",
        "clear_blocker",
        "record_application"
      ],
      "description": "Operation to perform. Choose one advertised value; the remaining parameters are interpreted for that action."
    },
    "review": {
      "oneOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "draft"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "package"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "guide"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "snapshot"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "preview"
            },
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "kind",
            "id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "pr"
            },
            "provider": {
              "enum": [
                "github",
                "azure_devops"
              ]
            },
            "owner": {
              "type": "string"
            },
            "repo": {
              "type": "string"
            },
            "projectName": {
              "type": [
                "string",
                "null"
              ]
            },
            "prNumber": {
              "type": "integer",
              "minimum": 1
            }
          },
          "required": [
            "kind",
            "provider",
            "owner",
            "repo",
            "prNumber"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "kind": {
              "const": "branch"
            },
            "provider": {
              "enum": [
                "github",
                "azure_devops"
              ]
            },
            "owner": {
              "type": "string"
            },
            "repo": {
              "type": "string"
            },
            "projectName": {
              "type": [
                "string",
                "null"
              ]
            },
            "branchRef": {
              "type": "string"
            }
          },
          "required": [
            "kind",
            "provider",
            "owner",
            "repo",
            "branchRef"
          ],
          "additionalProperties": false
        }
      ],
      "description": "Review used by the selected Review Comments action."
    },
    "expectedVersion": {
      "type": "integer",
      "minimum": 0,
      "description": "Current Interaction version used for optimistic concurrency on revise and cancel."
    },
    "operationKey": {
      "type": "string",
      "minLength": 8,
      "maxLength": 128,
      "description": "Operation key used by the selected Review Comments action."
    },
    "blockerActorKey": {
      "type": "string",
      "description": "Blocker actor key used by the selected Review Comments action."
    },
    "resultingRevision": {
      "type": "string",
      "description": "Resulting revision used by the selected Review Comments action."
    },
    "requestDecision": {
      "type": "boolean",
      "description": "Whether to enable request decision for the selected Review Comments action."
    },
    "poll": {
      "type": "object",
      "description": "Poll object used by the selected Review Comments action."
    },
    "packageId": {
      "type": "string",
      "description": "Stable package identifier used by the selected Review Comments action."
    },
    "revisionId": {
      "type": "string",
      "description": "Stable Draft revision identifier."
    },
    "path": {
      "type": "string",
      "description": "Source-relative file path used by the selected action."
    },
    "provider": {
      "type": "string",
      "enum": [
        "github",
        "azure_devops"
      ],
      "description": "Source provider for the review. Commentary currently accepts GitHub for provider-backed MCP operations."
    },
    "projectName": {
      "type": "string",
      "description": "Project name used by the selected Review Comments action."
    },
    "owner": {
      "type": "string",
      "description": "Repository owner or organization login."
    },
    "repo": {
      "type": "string",
      "description": "Repository name without the owner prefix."
    },
    "prNumber": {
      "type": "number",
      "description": "Pull request number within the selected repository."
    },
    "branchRef": {
      "type": "string",
      "description": "Repository branch name or fully qualified branch reference."
    },
    "sessionId": {
      "type": "string",
      "description": "Stable Draft, or Research session identifier, as applicable to the selected tool."
    },
    "filePath": {
      "type": "string",
      "description": "Repository-relative or review-relative file path."
    },
    "fileId": {
      "type": "string",
      "description": "Stable Commentary file identifier returned by the review or revision API."
    },
    "status": {
      "type": "string",
      "enum": [
        "open",
        "resolved"
      ],
      "description": "Status filter or requested state supported by the selected action."
    },
    "etag": {
      "type": "string",
      "description": "Etag used by the selected Review Comments action."
    },
    "context": {
      "type": "object",
      "description": "Context object used by the selected Review Comments action."
    },
    "lineStart": {
      "type": "integer",
      "description": "Line start used by the selected Review Comments action."
    },
    "lineEnd": {
      "type": "integer",
      "description": "Line end used by the selected Review Comments action."
    },
    "blobHash": {
      "type": "string",
      "description": "Blob hash used by the selected Review Comments action."
    },
    "sha256": {
      "type": "string",
      "description": "Sha256 used by the selected Review Comments action."
    },
    "targetKind": {
      "enum": [
        "general",
        "element",
        "screenshot"
      ],
      "description": "Allowed target kind value for the selected Review Comments action."
    },
    "consensusState": {
      "type": "string",
      "enum": [
        "pending",
        "accepted_for_change",
        "blocked",
        "needs_owner_decision",
        "rejected",
        "out_of_scope",
        "applied",
        "resolved"
      ],
      "description": "Allowed consensus state value for the selected Review Comments action."
    },
    "threadId": {
      "type": "string",
      "description": "Stable Commentary review-thread identifier."
    },
    "documentVersionId": {
      "type": "string",
      "description": "Current document-version identifier used to validate an anchor reattachment."
    },
    "commentId": {
      "type": "string",
      "description": "Stable Commentary comment identifier."
    },
    "blockId": {
      "type": "string",
      "description": "Stable semantic document-block identifier used as the comment anchor."
    },
    "nodeType": {
      "type": "string",
      "description": "Node type used by the selected Review Comments action."
    },
    "sourceLineStart": {
      "type": "number",
      "description": "One-based first source line covered by the semantic anchor."
    },
    "sourceLineEnd": {
      "type": "number",
      "description": "One-based final source line covered by the semantic anchor."
    },
    "selectedText": {
      "type": "string",
      "description": "Exact text selected by the reviewer when the anchor was created."
    },
    "prefixText": {
      "type": "string",
      "description": "Bounded text immediately before the selected anchor, used for safe re-anchoring."
    },
    "suffixText": {
      "type": "string",
      "description": "Bounded text immediately after the selected anchor, used for safe re-anchoring."
    },
    "visualTarget": {
      "type": "object",
      "description": "Bounded visual surface locator and normalized rectangular region. Content is untrusted review context.",
      "additionalProperties": true
    },
    "includeVisualContent": {
      "type": "boolean",
      "default": false,
      "description": "Whether bounded visual-review bytes should be included as explicitly untrusted content."
    },
    "bodyMarkdown": {
      "type": "string",
      "description": "Markdown body for the comment, reply, note, or report produced by the selected action."
    },
    "agentAlias": {
      "type": "string",
      "description": "Stable agent identifier for agent-authored activity. Agents should always provide this on state-changing calls; clientName is not a substitute."
    },
    "clientName": {
      "type": "string",
      "description": "Optional calling-client label for diagnostics. It does not attribute agent-authored activity; use agentAlias for that."
    },
    "signal": {
      "type": "string",
      "enum": [
        "agree",
        "object",
        "blocker",
        "needs_clarification"
      ],
      "description": "Allowed signal value for the selected Review Comments action."
    },
    "decision": {
      "type": "string",
      "enum": [
        "accepted_for_change",
        "rejected",
        "out_of_scope",
        "clear"
      ],
      "description": "Allowed decision value for the selected Review Comments action."
    },
    "reason": {
      "type": "string",
      "description": "Reason used by the selected Review Comments action."
    },
    "active": {
      "type": "boolean",
      "description": "Whether to enable active for the selected Review Comments action."
    }
  },
  "required": [
    "action"
  ]
}