create_pull
Create a pull request from MCP.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
repo |
string | Yes | Repository path. Format: teams/team_slug/repo_slug or username/repo_slug. |
source_repo |
string | No | Source repository path. Defaults to repo. |
source_ref |
string | Yes | Source branch name. |
target_ref |
string | No | Target branch name. Defaults to the target repo's default branch. |
title |
string | Yes | Pull title. |
body |
string | No | Pull body markdown. |
status |
string | No | open or draft. Defaults to open. |
visibility |
string | No | public or private. Private repos always create private pulls. |
Example
curl -X POST https://pearing.example/api/v1/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_pull",
"arguments": {
"repo": "teams/acme/webapp",
"source_ref": "feature/auth",
"target_ref": "main",
"title": "Add auth flow"
}
}
}'
Response
Returns the created or updated pull object inside the standard MCP tool result.