Generate Sync PR
generate_sync_prCreates 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
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | If true, return a preview of the PR without actually creating it | |
| pr_body | No | Optional custom PR body. If not provided, a structured body is auto-generated. | |
| pr_title | No | PR title | chore(tokens): sync design tokens from Figma |
| base_branch | No | Base branch to create PR against (default: repo's default branch) | |
| github_repo | Yes | GitHub repository in 'owner/repo' format | |
| token_updates | Yes | Array of file updates to include in the PR. Each has 'path' and 'content'. |