Skip to main content
Glama

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

NameRequiredDescriptionDefault
pageNoThe 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)."
repoYesrepo
ownerYesowner
targetsNoA 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_pageNoThe 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_parentsNoInclude rulesets configured at higher levels that apply to this repository

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.4
  2. Removed
  3. Addedv1.0.2

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It does not disclose behavior such as pagination, filtering by targets, or the effect of 'includes_parents'. The phrase 'Get all repository rulesets' is ambiguous about whether parent rulesets are included by default. Minimal behavioral details are given.

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

Conciseness3/5

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

The description is very concise (14 words) and front-loaded, but it lacks informative content. It is minimally viable but does not earn its place by adding value beyond the tool name. A bit more context would improve effectiveness without sacrificing brevity.

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

Completeness2/5

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

Given the tool has 6 parameters, no output schema, and many sibling tools, the description is insufficiently complete. It does not explain pagination, filtering by targets or parent inclusion, nor does it differentiate from related tools. An agent would lack context for correct invocation and interpretation of results.

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%, so the schema already documents all parameters. The description adds no additional parameter information, so it does not enhance understanding beyond the schema. Baseline score of 3 is appropriate since the schema covers semantic needs, but the description misses an opportunity to highlight key parameters like 'includes_parents'.

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?

The description clearly states the verb 'Get' and the resource 'repository rulesets', indicating a list retrieval operation. However, it does not differentiate from sibling tools like 'github_repos_get_org_rulesets' or 'github_repos_get_repo_ruleset' (singular), which could cause confusion for an AI agent.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives (e.g., org-level rulesets, single ruleset, branch rules). The description does not specify that this tool gets repository-level rulesets and can optionally include parent rulesets. This omission forces the agent to infer context from the parameter schema alone.

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

Deploy Server

Other Tools