Skip to main content
Glama

create_pr_for_thread

Open or update a pull request to apply code fixes for a feedback thread. Commits accumulate on one branch per repo; a new branch starts if the PR is merged or closed.

Instructions

Open a pull request for a fix — or, more usually, add it to the one the repo already has. One working branch per repo accumulates every fix as its own commit, and the PR body keeps a table of them. If that PR was merged or closed, a fresh branch is started automatically. Use get_element_context first to find the file, then pass the full new contents of each file you changed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoYesOwner/name, e.g. "acme/web".
filesYesEvery file you changed. They land as one atomic commit.
thread_idYesThe thread this fix answers.
base_branchNoWhat to branch from. Defaults to "main".
branch_nameNoOverride the branch name. Rarely needed.
descriptionYesOne line for the PR table, e.g. "larger checkout button".
revision_ofNoSet to a thread id when this is a revision — it gets its own revision-* branch rather than joining the accumulating one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.1

TDQS

A4.1/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 one-branch-per-repo accumulation model, the PR-body table, atomic commit landing, and automatic fresh branching when a PR is merged or closed. It omits auth/permission requirements and failure modes, but the mutation semantics are unusually well 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?

Three dense sentences, front-loaded with the tool's action and the dominant case, then the branch lifecycle, then the prerequisite. No filler, though the branch-lifecycle detail could be tightened.

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

Completeness4/5

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

No output schema and no annotations, so the description must carry behavior, and it does for the write lifecycle. What it does not cover is what the call returns (PR identifier/URL) or permission requirements, leaving a modest gap for a 7-parameter mutation tool.

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 all 7 parameters are already documented in the schema, including the full-contents-not-a-diff rule that the description reiterates. The description adds no parameter-level syntax or constraints beyond what the schema states, so the baseline 3 applies.

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?

Names a specific verb+resource (open a PR for a fix) and immediately qualifies the common case (adding to the repo's existing PR). An agent can distinguish it from siblings like propose_change or mark_thread_addressed without opening the schema.

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?

Explicitly orders the workflow: 'Use `get_element_context` first to find the file,' then pass full file contents. It also explains the merged/closed fallback condition. It stops short of saying when to prefer a sibling such as propose_change over opening a PR.

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