Skip to main content
Glama

fix_branch

Return the fix-it prompt the web UI's 'Generate prompt for everything wrong' button produces for a branch — the common-case one-shot for "fix everything broken here". Resolves the repo + branch, finds the latest analysis, generates (or fetches a cached) bulk prompt, and waits up to wait_seconds for completion.

repository is required — pass the GitHub 'owner/repo' for the project the user is working in. You (the MCP client) almost always know this from the working directory's git remote, the open workspace, or the conversation; pass it explicitly rather than calling list_repositories first. A repo UUID is also accepted for callers that already have one.

branch defaults to the repository's default branch.

scope selects what to aggregate (default "everything"):

  • untested — all functions with no tests yet

  • partial — all functions only partially covered

  • failing — all failing tests

  • everything — failing tests + all untested + partial functions

  • frontend — TypeScript components grouped with the handlers and render branches inside them that nothing exercises yet; Playwright/React-Testing-Library oriented rather than a flat function list

Returns the same shape as get_bulk_prompt — on cache hit / completed generation, {status: "completed", prompt_text, ...}; on timeout, {status: "pending", generation_id} so you can resume via wait_for_prompt.

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": {
      "repository": "<repository>"
    },
    "name": "fix_branch"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
scopeNoeverything
branchNo
repositoryYes
wait_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the internal flow (resolve repo+branch, find latest analysis, generate or fetch cached prompt), the blocking behavior bounded by wait_seconds, and both return shapes with status values. It does not state whether the call is read-only/side-effect free or whether generation is expensive/rate-limited, and 'force' behavior is never explained.

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

Conciseness4/5

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

Purpose and default-case framing are front-loaded, followed by parameter notes and an indented scope list that is long but earns its space since the schema has no enum. Minor redundancy in the opening clause ('the common-case one-shot for "fix everything broken here"') restates the first sentence, but overall there is little waste.

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?

There is no output schema, and the description compensates by specifying the completed and pending return shapes plus the generation_id resume path. For a five-parameter orchestration tool with no annotations, the only material gap is the undocumented force flag, which is minor against the rest of the coverage.

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 0%, so the description must compensate, and it does for four of five parameters: repository (owner/repo or UUID, and where to find it), branch (defaults to repo default), wait_seconds (blocks up to this long), and scope (all five values enumerated with meanings that the schema omits entirely). The 'force' parameter is left completely undefined despite appearing in the schema.

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 description opens with a concrete verb and resource ('Return the fix-it prompt ... for a branch') and grounds it in the exact user-facing action ('Generate prompt for everything wrong' button). It also signals the relationship to get_bulk_prompt ('Returns the same shape'), so an agent can place it precisely among siblings.

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?

It positions the tool as 'the common-case one-shot for fix everything broken here', which tells the agent when this is the default choice. It also gives an explicit negative instruction ('pass it explicitly rather than calling list_repositories first') and names the resume path via wait_for_prompt on timeout.

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