Skip to main content
Glama

Open CI cost fixes for every app (one draft PR per repo)

apply_ci_cost_fix_rollout

Open one draft PR per repo for ready CI cost fixes so each repo runs CI once for all fixes; review and merge to apply the changes.

Instructions

Open the CI cost fixes from preview_ci_cost_fix_rollout as ONE draft pull request per repo (ADR 0047 amendment), so each repo runs CI once for all its fixes instead of once per fix. repos: [{ projectId, repo, items: [{ workflowPath, kind }] }], at most 10 repos and 20 items each (pass the preview's ready items). Mushi rebuilds the advice itself and opens only items it still advises (evidence and saving come from the server), skips an edit whose PR is still open or that is being opened, and counts each repo once against its project's 10 CI fix PRs an hour. In each repo it reads every workflow once, applies the kinds in turn with the same refusals as open_ci_cost_fix, and opens one draft PR with a ci: title whose body lists each change and each refusal; a refused item is never dropped, and when every item is refused no PR is opened. Nothing changes until a person reviews, readies and merges the PR. Needs the GitHub App's Workflows: Read and write permission (or a token with the workflow scope). Confirm with the user first. Returns { queued, results [{ projectId, repo, status (queued | skipped | error), bundleId, jobs, skipped [{ workflowPath, kind, code (NOT_ADVISED | PR_ALREADY_OPEN | COST_FIX_IN_PROGRESS), message, prUrl }], error { code (NOT_FOUND | FORBIDDEN | REPO_NOT_IN_PROJECT | RATE_LIMITED | COST_FIX_IN_PROGRESS | MIGRATION_PENDING), message } }] }. Follow each bundle with get_ci_cost_fix_bundle. Write.

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": {
      "repos": "<repos>"
    },
    "name": "apply_ci_cost_fix_rollout"
  }
}

Input Schema

NameRequiredDescriptionDefault
reposYesOne entry per repo: the ready items from preview_ci_cost_fix_rollout

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.19

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say non-readonly, open-world, non-idempotent, non-destructive; the description goes far beyond by disclosing server-side revalidation of advice, skip conditions (PR_ALREADY_OPEN, COST_FIX_IN_PROGRESS), a per-project rate limit of 10 CI fix PRs/hour, workflow permission requirements, refusal preservation, and the no-PR-on-all-refused rule. It also reassures that nothing ships until a human merges, which the annotations cannot convey.

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 scope are front-loaded in the first sentence, followed by limits, behavior, permissions, and return shape in a logical order. It is dense — the inline return-shape JSON is long and partially duplicative of the schema — but nearly every clause carries actionable information.

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?

No output schema exists, yet the description documents the return object in full (queued, per-repo status, skipped codes, error codes) plus the required follow-up call. For a write tool with rate limits and permissions, that is complete enough to call correctly.

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% and there is a single nested parameter, so the schema already documents projectId, repo, items, and limits. The description restates the shape and adds the useful instruction to pass the preview's ready items, but adds no format or semantics beyond the schema baseline.

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 ('Open the CI cost fixes ... as ONE draft pull request per repo') and explicitly names its upstream sibling preview_ci_cost_fix_rollout as the source of the items. The batch semantics (one PR per repo rather than one per fix) distinguish it cleanly from open_ci_cost_fix.

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

Usage Guidelines4/5

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

Clearly gates usage on a prior preview call ('pass the preview's ready items'), requires user confirmation ('Confirm with the user first'), and routes follow-up to get_ci_cost_fix_bundle. It borrows open_ci_cost_fix's refusal behavior but never explicitly says when to prefer that single-fix tool over this batch tool.

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