Skip to main content
Glama

gate_pr_script

Read-onlyIdempotent

Generates a bash script that safely rebases, runs pre-commit and sim Docker tests, squashes commits, and force-pushes pull request branches.

Instructions

Generate a bash script for the safe rebase->pre-commit->sim-Docker-tests->squash->push gate workflow.

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": {
      "repo": "<repo>"
    },
    "name": "gate_pr_script"
  }
}

Input Schema

NameRequiredDescriptionDefault
repoYesRepository name, e.g. "pypto"
skip_testsNoSkip sim Docker tests
test_pathsNoList of pytest test files/dirs (repo-relative), e.g. ["tests/st/distributed/collectives/test_allreduce.py"]. If empty, derived from the branch diff: changed test files plus the pytest targets of the verify_ladder tasks
base_branchNoBranch to rebase ontomain
push_remoteNoRemote to force-push toorigin
extra_test_argsNoExtra pytest arguments appended after test paths, e.g. '-k allreduce -v'
skip_pre_commitNoSkip pre-commit checks

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • changedInput schema / properties / test_paths / description
      Previous value: -"List of pytest test files/dirs (repo-relative), e.g. [\"tests/st/distributed/collectives/test_allreduce.py\"]"New value: +"List of pytest test files/dirs (repo-relative), e.g. [\"tests/st/distributed/collectives/test_allreduce.py\"]. If empty, derived from the branch diff: changed test files plus the pytest targets of the verify_ladder tasks"
  2. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

Annotations declare readOnlyHint=true and destructiveHint=false, and the description is consistent with that by saying it *generates* a script rather than performing the workflow. However, the generated script itself squashes and force-pushes (the push_remote param even says 'force-push'), and the description never clarifies that the tool only emits text while the script is destructive when run – a nuance an agent needs, since it could otherwise assume the work is already done.

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 dense sentence that front-loads the verb and the ordered workflow steps with zero filler. Nothing could be removed without losing information.

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

Completeness3/5

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

With an output schema present and full parameter documentation, the core contract is covered, but for a tool whose output is an executable script with a force-push step, the description should say the script is returned (not executed) and how it is meant to be consumed. That omission leaves a meaningful gap for an agent deciding how to act on the result.

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 every one of the seven parameters (repo, skip_tests, test_paths, base_branch, push_remote, extra_test_args, skip_pre_commit) is already documented in the schema. The description adds no meaning beyond that, making the baseline 3 correct.

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 (generate) and a concrete resource (bash script) and enumerates the exact pipeline it encodes: rebase -> pre-commit -> sim Docker tests -> squash -> push. That is unambiguous and clearly distinct from siblings like run_command or pr_watch, though it never names an alternative to reinforce the distinction.

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 only implied by the phrase 'safe ... gate workflow' – an agent can infer this belongs to the pre-push PR path, but there is no explicit statement of when to call it versus running the steps directly via run_command, nor any prerequisite or exclusion.

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