Skip to main content
Glama
mcp-github-enterprise

mcp-github-enterprise

Get branch protection

get_branch_protection
Read-onlyIdempotent

Fetch branch protection settings—required reviews, status checks, signatures, and force-push rules—to verify repository safeguards before making changes.

Instructions

Fetch the protection settings for a branch (required reviews, status checks, signatures, force-push rules).

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": {
      "org": "<org>",
      "repo": "<repo>",
      "branch": "<branch>"
    },
    "name": "get_branch_protection"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgYesOrganization login (must be within GHE_ORG_ALLOWLIST when that is set)
repoYesRepository name (without the org/ prefix)
branchYesBranch name, e.g. main

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered without the description. The description adds value by enumerating which protection categories are returned, but says nothing about behavior when no protection exists (likely an error/empty response) or the org allowlist constraint that the schema hints at.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with the verb and resource front-loaded, then a compact parenthetical enumerating return fields. No filler, no restatement of the title, and every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description carries the burden of explaining return content, and it does so by naming the four protection categories. For a three-parameter, fully documented, read-only tool with complete annotations, this is nearly sufficient; only the empty/unprotected-branch behavior is left unaddressed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and all three parameters carry their own descriptions, including the GHE_ORG_ALLOWLIST constraint on org. The description adds no parameter-level meaning; its parenthetical actually describes return fields rather than inputs, so the baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and a specific resource ('Fetch the protection settings for a branch') and enumerates the content returned (required reviews, status checks, signatures, force-push rules). It does not explicitly distinguish itself from the related org-level sibling list_org_rulesets, so an agent must infer that this is branch-scoped rather than ruleset-scoped.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than stated: the verb 'Fetch' plus the required org/repo/branch trio makes it clear this is a read-only lookup for a single branch. There is no explicit when-to-use guidance, no mention of what to do when a branch has no protection configured, and no pointer to a sibling tool for org-wide ruleset evaluation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.