use rmcp::schemars::{self, JsonSchema};
use serde::Deserialize;
#[derive(Debug, Deserialize, JsonSchema)]
pub struct GetDiffRequest {
#[schemars(description = "File path to get diff for")]
pub file: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct AddCommentRequest {
#[schemars(description = "File path")]
pub file: String,
#[schemars(description = "Line number")]
pub line: u32,
#[schemars(description = "Side: 'old' or 'new'")]
pub side: String,
#[schemars(description = "Comment text")]
pub body: String,
#[schemars(description = "Comment type: note, suggestion, issue, praise, question")]
pub comment_type: Option<String>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct MarkReviewedRequest {
#[schemars(description = "File path to mark as reviewed")]
pub file: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct GetCommentsRequest {
#[schemars(description = "Optional file path to filter comments")]
pub file: Option<String>,
#[serde(default)]
#[schemars(
description = "Optional unix-ms cursor. Filters to comments created at/after this timestamp, or whose anchor flipped to Orphaned at/after it. When set, the response is wrapped with a server_time cursor."
)]
pub since: Option<i64>,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct SubmitReviewRequest {
#[schemars(description = "Review verdict: 'comment', 'approve', or 'request_changes'")]
pub verdict: String,
#[schemars(description = "Review body text")]
pub body: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct EmptyRequest {}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct SetAiSummaryRequest {
#[schemars(
description = "Markdown body that will replace the current AI summary. Capped at 64KB."
)]
pub markdown: String,
}
#[derive(Debug, Deserialize, JsonSchema)]
pub struct ListPrsRequest {
#[schemars(
description = "Repository owner/org. Optional; defaults to the remote PR's owner when one is loaded."
)]
pub owner: Option<String>,
#[schemars(
description = "Repository name. Optional; defaults to the remote PR's repo when one is loaded."
)]
pub repo: Option<String>,
#[schemars(description = "Filter by state: 'open', 'closed', or 'merged'. Default: open.")]
pub state: Option<String>,
#[schemars(description = "Filter by author login.")]
pub author: Option<String>,
#[schemars(description = "Max rows to return (capped at 100).")]
pub max: Option<u32>,
}