Skip to main content
Glama

Submit a patch

submit_patch
Destructive

Submits your commits for a claimed issue or a follow-up, as git format-patch --stdout, with your report and a brief for the contributor. Our checks run at once. On a pass it answers reviewUrl: the contributor reviews and approves the pull request on gitranks.com (a Learn claim answers lesson_needed). On a fail it answers the failing checks and submissionsLeft: fix the patch and submit again; the fifth failed submission ends the claim. Submit a patch that passes the checks within 48 hours of the claim (or the follow-up's start), of a send-back or of your last passing submission, or it lapses. On a follow-up, replies answer review threads, prBody replaces the pull request's description, and an empty patch with no replies and no new description ends it as nothing to fix. Rule: a pull request for an issue from GitRanks is opened only by GitRanks. Never push a branch, fork the repository or open the pull request yourself, for example with gh pr create.

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": {
      "attemptId": "<attemptId>",
      "patch": "<patch>",
      "verdict": "<verdict>",
      "summary": "<summary>",
      "tests": "<tests>",
      "risk": "<risk>",
      "agent": "<agent>"
    },
    "name": "submit_patch"
  }
}

Input Schema

NameRequiredDescriptionDefault
riskYesHow likely the change breaks something else
agentYesThe agent doing the work
briefNoRequired: for the contributor, 3 to 8 sentences: what you checked, what you found, what you changed or why nothing
patchYes`git format-patch --stdout <base>..HEAD`, at most 1 MB; empty for a follow-up that only replies
testsYesThe tests and checks you ran, at most 20; empty when none could run
checksNoA follow-up only: your verdict on each failing check the brief listed, by its name exactly as that list gives it: whose is pr (this pull request's change makes it fail), not_pr (it fails for a reason outside the change: on the base branch too, flaky, a secret or an approval a fork does not get), contributor (only the contributor can clear it: why says what to do) or base (it fails only on the merge with the base branch); leave out a check you did not look into
prBodyNoThe pull request description in Markdown, following the repository's template when it has one. On a follow-up: the whole new description, set on the pull request once the contributor approves (before any reply is posted), with or without commits or replies; leave it out to keep the description as it is
prTitleNoThe pull request title in the repository's style; the issue's title by default. A first attempt's only: a follow-up keeps its pull request's title
repliesNoA follow-up's reply drafts: a threadId from the brief's [thread <id>] answers that thread
summaryYesWhat the patch changes and why, for the reviewer. It may be shown on the pull request's public timeline: write about the issue and the code, never quote the contributor's own notes to you
verdictYesdone: the issue is fixed; partial: only part of it, said in summary (a Learn claim takes done only)
attemptIdYesThe attemptId of your claim or follow-up (24 hex characters), as its start or the contributions list answered it
riskNotesNoWhat could break, for a medium or high risk

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / summary / description
      Previous value: -"What the patch changes and why, for the reviewer"New value: +"What the patch changes and why, for the reviewer. It may be shown on the pull request's public timeline: write about the issue and the code, never quote the contributor's own notes to you"
  2. Changed1 schema field changed
    • changedInput schema / properties / prBody / description
      Previous value: -"The pull request description in Markdown, following the repository's template when it has one. On a follow-up: the whole new description, set on the pull request once the contributor approves (before any reply is posted), with its commits or replies (a follow-up with neither ends as nothing to fix); leave it out to keep the description as it is"New value: +"The pull request description in Markdown, following the repository's template when it has one. On a follow-up: the whole new description, set on the pull request once the contributor approves (before any reply is posted), with or without commits or replies; leave it out to keep the description as it is"
  3. Changed2 schema fields changed
    • changedInput schema / properties / prBody / description
      Previous value: -"The pull request description in Markdown, following the repository's template when it has one"New value: +"The pull request description in Markdown, following the repository's template when it has one. On a follow-up: the whole new description, set on the pull request once the contributor approves (before any reply is posted), with its commits or replies (a follow-up with neither ends as nothing to fix); leave it out to keep the description as it is"
    • changedInput schema / properties / prTitle / description
      Previous value: -"The pull request title in the repository's style; the issue's title by default"New value: +"The pull request title in the repository's style; the issue's title by default. A first attempt's only: a follow-up keeps its pull request's title"
  4. Changed1 schema field changed
    • addedInput schema / properties / checks
      Added value: +{
      +  "description": "A follow-up only: your verdict on each failing check the brief listed, by its name exactly as that list gives it: whose is pr (this pull request's change makes it fail), not_pr (it fails for a reason outside the change: on the base branch too, flaky, a secret or an approval a fork does not get), contributor (only the contributor can clear it: why says what to do) or base (it fails only on the merge with the base branch); leave out a check you did not look into",
      +  "items": {
      +    "properties": {
      +      "name": {
      +        "description": "The check's name, exactly as the brief's list of failing checks gives it",
      +        "maxLength": 1000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "whose": {
      +        "description": "pr, not_pr, contributor or base",
      +        "enum": [
      +          "pr",
      +          "not_pr",
      +          "contributor",
      +          "base"
      +        ],
      +        "type": "string"
      +      },
      +      "why": {
      +        "anyOf": [
      +          {
      +            "maxLength": 1000,
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "One sentence: why; for contributor and base, what the contributor does, in the imperative; an entry without it is not kept"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "whose"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 200,
      +  "type": "array"
      +}
  5. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare this as a non-idempotent, destructive, open-world write, but the description adds substantial behavior beyond them: checks run synchronously at submit time, a pass returns reviewUrl, a fail returns failing checks plus submissionsLeft, and 'the fifth failed submission ends the claim'. It also flags that summary 'may be shown on the pull request's public timeline' and that prBody is applied only once the contributor approves. Return format detail is only partial (no full response shape), so it is not a flawless 5.

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 action is front-loaded, but the body is one dense, semicolon-chained paragraph that forces the agent to parse the 48-hour rule, the fifth-failure rule and the follow-up semantics out of the middle of a run-on sentence. Nearly every clause carries real information, so the problem is structure rather than padding.

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?

With 13 parameters, nested objects and no output schema, the description does the work of explaining outcomes (reviewUrl, lesson_needed, failing checks, submissionsLeft) and the state machine around attempts, send-backs and follow-ups. Given the schema documents every field, nothing essential to calling this correctly appears to be missing.

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 baseline is 3, and the description earns above it with cross-field semantics the schema cannot express: patch may be empty only for a reply-only follow-up, verdict 'partial' is disallowed on a Learn claim, checks names must match the brief's failing-check list exactly, and prBody replaces the whole description on approval. Params like agent and risk/riskNotes are left entirely to the schema, so it is not exhaustive.

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?

States a specific verb and resource ('Submits your commits ... as `git format-patch --stdout`') scoped to 'a claimed issue or a follow-up', and separates itself from the sibling submit_lesson path by noting 'a Learn claim answers lesson_needed'. An agent can distinguish it from submit_lesson/submit_proof without opening any schema.

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?

Gives explicit timing conditions ('within 48 hours of the claim ... of a send-back or of your last passing submission, or it lapses') and an explicit prohibition that routes the agent away from a wrong action ('Never push a branch, fork the repository or open the pull request yourself, for example with `gh pr create`'). It also states the follow-up case and the degenerate case ('an empty patch with no replies and no new description ends it as nothing to fix').

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.