pr-genius
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| analyze_prA | Detailed PR analysis with signals and checklist. Use analyze_pr for deep analysis, coach_pr for quick pass/fail. Returns: tier (low_risk/medium_risk/high_risk), signals (positive/negative/neutral), checklist (P0/P1/P2 items), and recommended_action. Use this before submitting a PR to a large open-source repo to check if your contribution strategy is sound. Combines repo profile data, anti-pattern matching, and success pattern analysis. Args: title: PR title (e.g. "feat: add new search endpoint") repo: Target repo in org/name format (e.g. "encode/httpx") body: PR body/description text description: Extended description (optional) author: PR author username author_association: Author's association with repo (NONE/CONTRIBUTOR/COLLABORATOR/MEMBER/OWNER) labels: PR labels (e.g. ["bug", "documentation"]) star_count: Repository star count (>= 0; 0 = unknown) repo_merge_rate: Repository's external PR merge rate 0.0-1.0 (0 = unknown) mergeable: Mergeable state (MERGEABLE/CONFLICTING/UNKNOWN) diff_stat: git diff --stat output — populates impact/review and is the authoritative PR-size signal (null when omitted) Returns: dict with keys: tier, signals, checklist, recommended_action, repo, title, impact, review (impact/review null without diff_stat) Example: analyze_pr("fix: timeout in connection pool", "encode/httpx", "Fixes #123") → {"tier": "medium_risk", "signals": {...}, "checklist": [...], "recommended_action": "..."} |
| coach_prA | Agent PR Dojo: quick pass/fail gate. Use coach_pr for go/no-go decision, analyze_pr for detailed analysis. Use this as a final gate before opening a PR. Returns pass=true if safe to submit, pass=false if there are blocking issues to fix first. Combines repo profile analysis, anti-pattern matching, and maintainer policy checks into a single go/no-go decision. Args: title: PR title repo: Target repo (org/name) body: PR body/description description: Extended description author: PR author username author_association: Author's association (NONE/CONTRIBUTOR/etc.) labels: PR labels star_count: Repo star count (>= 0) repo_merge_rate: External PR merge rate (0.0-1.0) mergeable: Mergeable state (MERGEABLE/CONFLICTING/UNKNOWN) diff_stat: git diff --stat output (populates impact/review) Returns: dict with pass (bool), tier, signals, checklist, recommended_action |
| triage_prA | Policy-aware PR screening. Reads docs/policies/-.md and checks the PR against hard/soft rules. 返回: verdict: pass / needs_preflight / warn / reject policy_loaded: bool violations: list of {rule, severity, evidence} generic_checks: list (only when needs_preflight) recommended_action: str (always) Example: triage_pr("docs: typo", "Ikalus1988/MisakaNet", "fix typo", "docs/faq.md | 3 ++-") → {verdict: "pass", policy_loaded: true, ...} |
| get_repo_profileA | Get repository profile with maintainer guidelines, AI policy, and merge rate. Returns 17 agent_guidelines fields including ai_policy, maintainer_vibe, external_merge_rate, close_keywords, and more. Use this to understand a repo's contribution culture before submitting a PR. Args: repo: Repository in org/name format (e.g. "encode/httpx") Returns: dict with repo metadata and agent_guidelines, or error if not found |
| list_open_prsA | List open PR case-study records in the local knowledge base (issue #74). NOTE: these are local case-study folders with final_status=open —
NOT live GitHub PRs. For live GitHub PR health use Args: repo: filter by target repo (org/name, e.g. "encode/httpx"); "" = all author: filter by PR author username; "" = all Returns: list of {repo, pr_number, pr_url, author, folder} for each matching open case study |
| get_case_studyA | Get a specific PR case study with full details and rounds. Returns the complete case study including frontmatter, body text, and round-by-round interaction history. Useful for learning from past PR experiences. Args: repo: Repository in org/name format pr_number: PR number (integer) Returns: dict with frontmatter, body, path, or error if not found |
| search_patternsA | Search anti-patterns and success-patterns by keyword. Use this to find relevant patterns before submitting a PR. Anti-patterns show what NOT to do, success-patterns show what works. Args: query: Search keyword (e.g. "duplicate PR", "missing tests", "out of scope", "breaking change") pattern_type: Filter type — "all" (default), "anti-pattern", or "success-pattern" limit: Max results to return (default 10) Returns: list of dicts with keys: key, title, symptom, fix_action, source_pr, type, file Example: search_patterns("duplicate PR") → finds anti-patterns about duplicate submissions search_patterns("timeout", "anti-pattern") → finds timeout-related failure patterns |
| schema_infoA | 返回支持的 schema 版本和枚举值。 |
| status_prsA | Check health of in-flight PRs (outbound PR heartbeat). Classifies open PRs into 9 statuses: NEEDS_REBASE, CI_FAILING, STALE_REVIEW, CHANGES_REQUESTED, STALE_NO_REVIEW, BLOCKED, CLEAN, UNKNOWN, WAITING. Suggests actions for each. Args: author: GitHub username to check PRs for repo: Repository to check (org/name) stale_days: Days without update to consider stale (default: profile or 14) save_snapshot: If True, persist the result to data/status-snapshots/ for transition detection across runs. Default False because MCP callers (Cursor, Claude Code) may poll frequently and would otherwise flood the snapshot directory. Returns: dict with prs, ignored, summary, actions, transitions |
| profile_writeback_suggestionsA | Get profile writeback suggestions based on PR status analysis. Analyzes PR health data and suggests profile updates (e.g., stale_days_threshold, response_time). Returns suggestions with evidence, source, and confidence score. Args: author: GitHub username mode: 'suggest' (all suggestions) or 'auto' (confidence >= 0.8 only) Returns: list of {field, value, repo, evidence, source, confidence, private} |
| maintainer_viewA | Maintainer-facing action decision for a single PR (v1.5.1). Output answers: 'What should I do with this PR right now?' Maps analyze_pr signals to 5 actions: READY_FOR_REVIEW, WAIT_FOR_AUTHOR, CLOSE_DUPLICATE, CLOSE_STALE_OR_RISKY, HOLD_MAINTAINER_DECISION. Phase 5.1: Adds impact (files/lines/breaking/security), review (complexity/estimated_minutes), and author_info fields. Args: title: PR title repo: Target repo (org/name) body: PR body description: Extended description author: PR author username author_association: Author's association (NONE/CONTRIBUTOR/etc.) labels: PR labels star_count: Repo star count repo_merge_rate: External PR merge rate 0.0-1.0 diff_stat: Diff stat string (e.g. "3 files changed, 10 insertions(+), 5 deletions(-)") Returns: dict with keys: persona, repo, title, author, action, reason, blocking_signals, next_step, review_ready, impact, review, author_info, context. |
| contributor_viewA | Contributor-facing action decision for a single PR (v1.6.0). Output answers: 'Is my PR ready to submit? What should I fix?' Maps analyze_pr signals to 5 actions: READY_TO_SUBMIT, FIX_BEFORE_SUBMIT, NEEDS_DISCUSSION, IMPROVE_CHANCE, ASK_MAINTAINER. Args: title: PR title repo: Target repo (org/name) body: PR body description: Extended description author: PR author username author_association: Author's association (NONE/CONTRIBUTOR/etc.) labels: PR labels star_count: Repo star count repo_merge_rate: External PR merge rate 0.0-1.0 diff_stat: Diff stat string Returns: dict with keys: persona, repo, title, author, action, action_label, action_icon, reason, next_step, checklist, confidence, merge_probability, impact, review, author_info, context. |
| review_queueA | Build maintainer review queue digest from a list of PRs (v1.5.0). Groups PRs by maintainer action (5 classes) and produces a digest suitable for Actions summary or git-trackable markdown file. Args: prs: List of {repo, number, title, body, author, labels, star_count, repo_merge_rate} prs_file: Alternative — path to JSON file containing the PR list Returns: dict with keys: generated_at, total, summary (action -> count), results (per-PR maintainer_view), digest_markdown |
| prgenius_doctorA | Self-test the pr-genius install (issue #70). Run this before trusting analyze_pr output. Reports Python/package versions, knowledge-base readability and coverage (anti-patterns, success-patterns, profiles, case studies, policies), gh CLI availability, MCP tool registration, a sample analyze against a known profile, and data-coverage warnings. Returns: dict with keys: ok, prgenius_version, python_version, platform, knowledge_base, gh, mcp, sample, warnings |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 14 tools
Five tools (analyze_pr, coach_pr, triage_pr, maintainer_view, contributor_view) all analyze a single PR with overlapping decision outputs; descriptions clarify perspective and depth, but an agent could still confuse coach_pr with contributor_view or triage_pr. The remaining tools are distinct, so overlap is notable but manageable.
All tool names use lowercase snake_case with descriptive domain terms, but the pattern mixes verb_noun (analyze_pr, get_repo_profile) and noun_noun (maintainer_view, review_queue). The mix is still predictable and readable, with only minor deviations.
14 tools fit the PR assistant domain well and stay within the 3-15 sweet spot. The only concern is that several analysis tools overlap, but the count itself is appropriate.
The surface covers pre-submission analysis, policy checks, repo profiles, pattern search, case studies, in-flight status, maintainer/contributor views, review queues, and self-diagnostics. Minor gap: no tool to fetch a live PR's full content by number, but core decision-support workflows are covered.