validate_pr_comment_target
Ensure a PR comment target (path, line, side) is valid for the diff; if invalid, get the reason and nearest valid line.
Instructions
Validate if a comment target (path, line, side) is valid for the PR diff. Returns validation status, reason for invalidity, and nearest valid line suggestion if applicable.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"owner": "<owner>",
"repo": "<repo>",
"prNumber": "<prNumber>",
"path": "<path>",
"line": "<line>"
},
"name": "validate_pr_comment_target"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | Line number to validate | |
| path | Yes | File path in the PR | |
| repo | Yes | Repository name | |
| side | No | Side of the diff (LEFT for old, RIGHT for new) | |
| owner | Yes | Repository owner/organization | |
| prNumber | Yes | Pull request number |