Home / Servers / GitHub API / repos_get_custom_deployment_protection_rule
Get a custom deployment protection rule
An MCP tool from the GitHub API server, hosted on mcp.hjlabs.in.
Get a custom deployment protection rule Gets an enabled custom deployment protection rule for an environment. Anyone with read access to the repository can use this endpoint. For more information about environments, see "Using… [GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}]
Name on the gateway: github_api__repos_get_custom_deployment_protection_rule · read-only.
Parameters
| Name | Type | Description |
|---|---|---|
owner required | string | The account owner of the repository. The name is not case… |
repo required | string | The name of the repository without the .git extension. The… |
environment_name required | string | The name of the environment. The name must be URL encoded.… |
protection_rule_id required | integer | The unique identifier of the protection rule. |
How to call it
Through the Smart Gateway, any client can run it by name with call_tool, or let the gateway find it with search_tools:
{
"name": "github_api__repos_get_custom_deployment_protection_rule",
"arguments": {
"owner": "…",
"repo": "…",
"environment_name": "…",
"protection_rule_id": 0
}
}Or connect the GitHub API server directly, which lists 1,221 tools including this one:
claude mcp add --transport http hj-github-api https://mcp.hjlabs.in/mcp/github-api \
--header "Authorization: Bearer YOUR_API_KEY"Try asking
Use the get a custom deployment protection rule tool with owner set to ….