Skip to main content
Glama

Generate Sync PR

generate_sync_pr

Creates a GitHub pull request that commits design token file updates from Figma into code. Use dry_run to preview the branch, title, body, and files before opening the PR.

Instructions

Create a GitHub pull request to sync design token changes from Figma to code.

Takes an array of file updates (typically from sync_tokens_to_code output) and creates a branch, commits the files, and opens a PR. Supports dry_run mode to preview without creating.

Args:

  • github_repo (string): GitHub repo in 'owner/repo' format

  • base_branch (string, optional): Base branch (default: repo's default branch)

  • token_updates (array): Files to update, each with 'path' and 'content'

  • pr_title (string, optional): PR title

  • pr_body (string, optional): Custom PR body

  • dry_run (boolean, optional): Preview without creating (default: false)

Returns: For dry_run: PR preview with branch name, title, body, and files. For real: Created PR URL, number, branch, and commit SHA.

Examples:

  • "Create a PR with the token updates" → generate_sync_pr with token_updates from sync_tokens_to_code

  • "Preview what the PR would look like" → generate_sync_pr with dry_run: true

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": {
      "github_repo": "<github_repo>",
      "token_updates": "<token_updates>"
    },
    "name": "generate_sync_pr"
  }
}

Input Schema

NameRequiredDescriptionDefault
dry_runNoIf true, return a preview of the PR without actually creating it
pr_bodyNoOptional custom PR body. If not provided, a structured body is auto-generated.
pr_titleNoPR titlechore(tokens): sync design tokens from Figma
base_branchNoBase branch to create PR against (default: repo's default branch)
github_repoYesGitHub repository in 'owner/repo' format
token_updatesYesArray of file updates to include in the PR. Each has 'path' and 'content'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

A4.1/5.0
Behavior4/5

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

The description goes beyond the annotations by spelling out the side-effect chain (creates a branch, commits files, opens a PR) and the dry_run preview semantics, which the annotations alone (readOnlyHint=false, openWorldHint=true) would not convey. It does not address that repeated invocations are non-idempotent (idempotentHint=false), e.g. that re-running creates another branch/PR, nor does it mention GitHub auth or failure modes such as an existing branch.

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?

The opening sentence front-loads the action, and the summary of branch/commit/PR flow immediately follows. The Args block duplicates a fully documented schema and could be trimmed, but the Returns and Examples sections carry real value given there is no output schema, so the overall length is defensible.

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 mutation tool with no output schema, the description supplies return-value expectations for both dry_run and real execution, which is the key missing piece. It stops short of covering authorization requirements for an open-world GitHub operation and error cases like existing branches or conflicting commits.

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 the schema already documents every parameter, including defaults for pr_title and dry_run; the description's Args list largely restates it. It adds a small amount of format guidance ('owner/repo'), but it omits the nested 'platform' field on token_updates items that the schema defines, so it does not exceed 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 specific verb and resource ("Create a GitHub pull request") and states the domain scope (sync design token changes from Figma to code). It explicitly ties itself to the sibling sync_tokens_to_code as its typical input source, so an agent can tell which tool produces the token_updates this one consumes.

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?

The Examples section gives two concrete when-to-use triggers (create a real PR, preview with dry_run), and the summary line names sync_tokens_to_code output as the normal input. It does not say when NOT to use it or contrast it with siblings like implement_design or generate_coded_components, so context is clear but exclusions are absent.

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