{% extends "docs/base.html" %} {% block docs_content %}

{{ title }}

{% if title == "get_pull_protection" %} Evaluate pull branch protection and merge-readiness from MCP. {% elif title == "get_pull_diff" %} Fetch the effective pull diff without manually ordering source and target refs. {% elif title == "get_pull_files" %} List changed files for a pull without returning full diff content. {% elif title == "get_my_pull_review" %} Fetch the authenticated user's existing review for a pull. {% elif title == "create_pull" %} Create a pull request from MCP. {% elif title == "update_pull" %} Update pull metadata, refs, or visibility from MCP. {% elif title == "close_pull" %} Close a pull request from MCP. {% elif title == "reopen_pull" %} Reopen a closed pull request from MCP. {% elif title == "merge_pull" %} Merge an open pull request after protections pass. {% else %} Work with pull requests from MCP. {% endif %}

Parameters

{% if title == "create_pull" %} {% else %} {% if title == "get_pull_diff" or title == "get_pull_files" %} {% elif title == "update_pull" %} {% elif title == "merge_pull" %} {% endif %} {% endif %}
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.
pull_number integer Yes Pull request number within the repo.
path string No Optional file or directory path filter.
offset integer No Number of changed files to skip. Defaults to 0.
limit integer No Maximum number of changed files to return.
source_ref string No Updated source branch name.
target_ref string No Updated target branch name.
title string No Updated pull title.
body string No Updated pull body markdown.
visibility string No public or private.
expected_target_oid string No Optional expected current target commit OID.
expected_source_oid string No Optional expected current source commit OID.
message string No Optional merge commit message when a merge commit is required.

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": "{{ title }}",
      "arguments": {
{% if title == "create_pull" %}        "repo": "teams/acme/webapp",
        "source_ref": "feature/auth",
        "target_ref": "main",
        "title": "Add auth flow"
{% elif title == "update_pull" %}        "repo": "teams/acme/webapp",
        "pull_number": 42,
        "title": "Add auth flow"
{% elif title == "get_pull_diff" or title == "get_pull_files" %}        "repo": "teams/acme/webapp",
        "pull_number": 42,
        "limit": 25
{% elif title == "merge_pull" %}        "repo": "teams/acme/webapp",
        "pull_number": 42,
        "expected_target_oid": "abc123"
{% else %}        "repo": "teams/acme/webapp",
        "pull_number": 42
{% endif %}      }
    }
  }'

Response

{% if title == "get_pull_diff" %} Returns pull metadata, changed file metadata, pagination fields, a diff stat, and unified diff content. {% elif title == "get_pull_files" %} Returns pull metadata, changed file metadata, pagination fields, and a diff stat without full diff content. {% elif title == "get_pull_protection" %} Returns pull protection status, merge blocking state, and per-rule checks. {% elif title == "get_my_pull_review" %} Returns the authenticated user's review object or null. {% elif title == "merge_pull" %} Returns the merged pull object and merge mode. {% else %} Returns the created or updated pull object inside the standard MCP tool result. {% endif %}

{% endblock %}