github_repos_get_repo_rulesets
Retrieves repository rulesets with pagination and optional target or parent-level filtering, so you can inspect branch, tag, and push governance rules.
Instructions
Get all repository rulesets
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>"
},
"name": "github_repos_get_repo_rulesets"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." | |
| repo | Yes | repo | |
| owner | Yes | owner | |
| targets | No | A comma-separated list of rule targets to filter by. If provided, only rulesets that apply to the specified targets will be returned. For example, `branch,tag,push`. | |
| per_page | No | The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api)." | |
| includes_parents | No | Include rulesets configured at higher levels that apply to this repository |