Skip to main content
Glama

Set review policy

set-review-policy-tool
DestructiveIdempotent

Choose how much review this team's pull requests need. Once a policy is on, Coderbuds decides a tier for every pull request it sees opened or pushed to — no review, an AI review, one review, or a careful review — and says which, and why, on its pull request comment, and posts a Review policy check on the pull request.

policy is one of:

  • skip_trivial — docs-only and tests-only changes skip review; every other change gets one.

  • risk_based — trivial changes skip review, small code changes need only an AI review, and changes to sensitive_paths or over the team's size standard need a person's approval — two people's when careful_approvals is 2.

  • ai_review_all — trivial changes skip review, and every other change needs only an AI review: for a team whose coding agents fix and merge their own pull requests. What review by risk would have given a person is still named on each pull request. Changes to CI, CODEOWNERS or agent instructions still need a person: they decide how the change is reviewed.

  • off — no policy; Coderbuds says nothing about review.

Under every policy but ai_review_all, a person always reads changes to CI, CODEOWNERS, dependency manifests and lockfiles, built bundles and agent instructions, database migrations, sign-in and permissions code, billing code, a newcomer's first change, and an agent's change nobody has read. The comment then names the files to read first.

holds_merges makes that check fail until the review it asks for is in, instead of showing neutral. Where the check is required in branch protection, that blocks the merge; elsewhere it is a failing check and nothing more. Omit it to keep the current setting. Coderbuds then approves each change the policy lets through without a person, so a branch rule requiring one approval follows the policy with nothing more to set up. Under risk_based or ai_review_all it can only be turned on while Coderbuds triage runs for the team, or once the team's own AI review has reported from one of its repositories. While some repositories still have none, the response carries a warning.

merges_when_ready has the coding agent that opened a pull request merge it once it has the review the policy asks for and every check on its latest commit passed: Coderbuds approves it, or posts "Ready to merge" after a person's approval, and get-pull-request-review-tool answers action: merge. It only acts while holds_merges is on, and only on pull requests an agent reported writing. Off unless someone asks for it; a team that merges by hand leaves it off. Omit it to keep the current setting.

director_approves has Coderbuds approve a pull request on GitHub once the person who directed the coding agent that wrote it has reviewed its latest commit — with /reviewed, a Comment review, or record-pull-request-review-tool — so a ruleset requiring one approval lets it merge. GitHub will not let them approve it themselves. Never for a careful review, changes to CI, CODEOWNERS or agent instructions, or changes that cannot be undone: those still need someone else. It only acts while holds_merges is on. Off unless the team owner asks for it. Omit it to keep the current setting.

careful_approvals is how many people must approve a change in sensitive_paths or over the size standard: 1 (the default) or 2. Omit it to keep the current setting. Only set 2 when a person on the team asked for two approvers.

sensitive_paths are folders (app/Billing/) or patterns where * reaches into subfolders (database/migrations/*). Omit them to keep the team's current list; pass an empty list to clear it.

When the policy relies on an AI review and none has reported from repository yet, the response carries setup: the workflow file to commit and the steps around it. Follow them. Read the current settings and what each policy does with get-review-policy-tool.

Only call this when a person on the team has asked for it, and set what they said. Only the team owner can change it.

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": {
      "policy": "<policy>"
    },
    "name": "set-review-policy-tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
policyYesThe policy the team asked for, or off.
repositoryNoOptional "owner/name" repository slug, used only to bind the session to the owning team.
holds_mergesNoMake the Review policy check fail until the review it asks for is in. Omit to keep the current setting.
sensitive_pathsNoPaths that need a person under risk_based, whatever their size. Omit to keep the current list; an empty list clears it.
careful_approvalsNoHow many people must approve a change in sensitive_paths or over the size standard: 1 or 2. Omit to keep the current setting.
director_approvesNoHave Coderbuds approve on GitHub once whoever directed the coding agent has reviewed its pull request, except where someone else must review. Needs holds_merges. Omit to keep the current setting.
merges_when_readyNoHave the coding agent that opened a pull request merge it once it has its review and every check passed. Needs holds_merges. Omit to keep the current setting.

Output Schema

NameRequiredDescriptionDefault
teamYesTeam name.
setupNoWhen the policy relies on an AI review and none has reported from the repository: workflow_path, workflow (the file to commit) and steps. Null otherwise.
policyNoThe policy now in force, or null when it is off.
messageYesHuman-readable confirmation.
warningNoWhen merges are held under a policy that relies on an AI review and some active repositories have none: what that does to their pull requests. Null otherwise.
holds_mergesYesWhether the Review policy check fails until the review is in.
previous_policyNoThe policy before this call, or null when there was none.
sensitive_pathsYesThe sensitive paths now in force.
careful_approvalsYesHow many people must approve a change in sensitive_paths or over the size standard: 1 or 2.
director_approvesYesWhether Coderbuds approves on GitHub once whoever directed the coding agent has reviewed its pull request.
merges_when_readyYesWhether the coding agent that opened a pull request merges it once it is ready.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / director_approves
      Added value: +{
      +  "description": "Have Coderbuds approve on GitHub once whoever directed the coding agent has reviewed its pull request, except where someone else must review. Needs holds_merges. Omit to keep the current setting.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / director_approves
      Added value: +{
      +  "description": "Whether Coderbuds approves on GitHub once whoever directed the coding agent has reviewed its pull request.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "team",
      -  "sensitive_paths",
      -  "careful_approvals",
      -  "holds_merges",
      -  "merges_when_ready",
      -  "message"
      -]New value: +[
      +  "team",
      +  "sensitive_paths",
      +  "careful_approvals",
      +  "holds_merges",
      +  "merges_when_ready",
      +  "director_approves",
      +  "message"
      +]
  2. Changed4 schema fields changed
    • addedInput schema / properties / careful_approvals
      Added value: +{
      +  "description": "How many people must approve a change in sensitive_paths or over the size standard: 1 or 2. Omit to keep the current setting.",
      +  "enum": [
      +    1,
      +    2
      +  ],
      +  "type": "integer"
      +}
    • changedInput schema / properties / sensitive_paths / description
      Previous value: -"Paths that need a careful review under risk_based. Omit to keep the current list; an empty list clears it."New value: +"Paths that need a person under risk_based, whatever their size. Omit to keep the current list; an empty list clears it."
    • addedOutput schema / properties / careful_approvals
      Added value: +{
      +  "description": "How many people must approve a change in sensitive_paths or over the size standard: 1 or 2.",
      +  "type": "integer"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "team",
      -  "sensitive_paths",
      -  "holds_merges",
      -  "merges_when_ready",
      -  "message"
      -]New value: +[
      +  "team",
      +  "sensitive_paths",
      +  "careful_approvals",
      +  "holds_merges",
      +  "merges_when_ready",
      +  "message"
      +]
  3. Changed1 schema field changed
    • addedOutput schema / properties / warning
      Added value: +{
      +  "description": "When merges are held under a policy that relies on an AI review and some active repositories have none: what that does to their pull requests. Null otherwise.",
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  4. Changed3 schema fields changed
    • changedOutput schema / properties / policy / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / previous_policy / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / setup / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  5. Changed3 schema fields changed
    • addedInput schema / properties / merges_when_ready
      Added value: +{
      +  "description": "Have the coding agent that opened a pull request merge it once it has its review and every check passed. Needs holds_merges. Omit to keep the current setting.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / merges_when_ready
      Added value: +{
      +  "description": "Whether the coding agent that opened a pull request merges it once it is ready.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "team",
      -  "sensitive_paths",
      -  "holds_merges",
      -  "message"
      -]New value: +[
      +  "team",
      +  "sensitive_paths",
      +  "holds_merges",
      +  "merges_when_ready",
      +  "message"
      +]
  6. Changed2 schema fields changed
    • changedInput schema / properties / policy / enum
      Previous value: -[
      -  "off",
      -  "skip_trivial",
      -  "risk_based"
      -]New value: +[
      +  "off",
      +  "skip_trivial",
      +  "risk_based",
      +  "ai_review_all"
      +]
    • addedOutput schema / properties / setup
      Added value: +{
      +  "description": "When the policy relies on an AI review and none has reported from the repository: workflow_path, workflow (the file to commit) and steps. Null otherwise.",
      +  "type": "object"
      +}
  7. Changed2 schema fields changed
    • changedInput schema / properties / holds_merges / description
      Previous value: -"Keep the Review policy check pending until the review it asks for is in. Omit to keep the current setting."New value: +"Make the Review policy check fail until the review it asks for is in. Omit to keep the current setting."
    • changedOutput schema / properties / holds_merges / description
      Previous value: -"Whether the Review policy check stays pending until the review is in."New value: +"Whether the Review policy check fails until the review is in."
  8. Changed2 schema fields changed
    • changedInput schema / properties / holds_merges / description
      Previous value: -"Make the Review policy check fail until the review it asks for is in. Omit to keep the current setting."New value: +"Keep the Review policy check pending until the review it asks for is in. Omit to keep the current setting."
    • changedOutput schema / properties / holds_merges / description
      Previous value: -"Whether the Review policy check fails until the review is in."New value: +"Whether the Review policy check stays pending until the review is in."
  9. Changed3 schema fields changed
    • addedInput schema / properties / holds_merges
      Added value: +{
      +  "description": "Make the Review policy check fail until the review it asks for is in. Omit to keep the current setting.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / holds_merges
      Added value: +{
      +  "description": "Whether the Review policy check fails until the review is in.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "team",
      -  "sensitive_paths",
      -  "message"
      -]New value: +[
      +  "team",
      +  "sensitive_paths",
      +  "holds_merges",
      +  "message"
      +]
  10. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only supply idempotentHint and destructiveHint, so the description carries the real burden and does: it explains what holds_merges does downstream (failing check, branch-protection blocking), the enabling preconditions for risk_based/ai_review_all, that a `warning` appears while some repos have none, that `setup` is returned when no AI review has reported, and that director_approves never applies to careful reviews, CI/CODEOWNERS, or irreversible changes. These are consequences an agent cannot infer from the schema.

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 front-loaded with purpose and the policy enum, which is good, but it runs several hundred words and repeats the same carve-out ('changes to CI, CODEOWNERS and agent instructions') in three separate paragraphs. The information is dense and useful, yet a config tool's definition could be tightened without losing call-correctness.

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

Completeness5/5

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

Given a 7-parameter, high-stakes settings mutation with an output schema present, the description covers everything an agent needs: preconditions, defaults, omit-vs-clear semantics, permission requirements, and the warning/setup response fields. Return-value detail is rightly left light because an output schema exists.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning beyond it: it spells out what each policy enum value actually does, gives the sensitive_paths pattern syntax (`*` reaches into subfolders) and the empty-list-clears behavior, and documents cross-parameter dependencies (merges_when_ready and director_approves only act while holds_merges is on). The only weak spot is `repository`, which is explained mostly in passing.

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

Purpose5/5

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

The opening sentence states a specific verb and resource — choose how much review this team's pull requests need — and immediately names the sibling get-review-policy-tool for reading rather than writing. It is unmistakably the write counterpart to the read tool.

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

Usage Guidelines5/5

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

Explicit gating is given: 'Only call this when a person on the team has asked for it, and set what they said. Only the team owner can change it,' plus 'Only set 2 when a person on the team asked for two approvers.' Alternatives and preconditions are routed (read current state via get-review-policy-tool; check triage/AI-review status before enabling holds_merges).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources