Skip to main content
Glama

pr_create

Idempotent

Open a GitHub pull request from the current chatgpt/* branch into main, returning an existing pull request URL when present. Use after pushing the branch; it does not merge.

Instructions

Open a GitHub pull request (via gh) from the current chatgpt/* branch into main; if one already exists, return its URL instead. Call after commit_push has pushed the branch. Refused on other branches. Does not merge; use pr_merge for that.

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": {
      "title": "<title>"
    },
    "name": "pr_create"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoPull request description (Markdown). Optional; defaults to empty.
titleYesPull request title.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true, idempotentHint=true and destructiveHint=false, and the description adds real context on top: the gh backend, the fixed branch pairing, the already-exists short-circuit that returns the URL, and the branch precondition that causes refusal. It stops short of covering auth or failure modes such as conflicts, which keeps it from a 5.

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?

Three short clauses front-load the action, then prerequisites, then the boundary against pr_merge. Every sentence carries distinct information and nothing is repeated from the name or schema.

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?

For a two-parameter, non-destructive write with no output schema, the description covers branch scope, prerequisite ordering, idempotent return of a URL, and the no-merge boundary. The only gap is behavior on failure conditions other than being on the wrong branch.

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 the two parameters (title, body) are already documented there, so the baseline is 3. The description adds no extra meaning about parameter content, but it does not need to.

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 gives a specific verb and resource ('Open a GitHub pull request (via gh)') and pins the exact scope ('from the current chatgpt/* branch into main'). It explicitly separates itself from pr_merge and states the idempotent fallback behavior, so an agent can identify it 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 Guidelines5/5

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

It names the prerequisite ('Call after commit_push has pushed the branch'), the exclusion ('Refused on other branches'), and the alternative ('Does not merge; use pr_merge for that'). When-to-use and when-not-to-use are both explicit rather than implied.

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