Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault

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.

RepoFlow helps a developer understand a public Python repo, find real bugs with evidence, and learn from them before contributing. Workflow: get_contribution_playbook -> analyze_repo -> run_tests / run_static_analysis / detect_flaky_tests -> record_finding (with evidence) -> explain_finding (teaching card) -> export_report. Rules: never claim a bug without evidence (a command that reproduces it). RepoFlow does not write to GitHub: the user opens issues and PRs by hand. Many maintainers reject low-effort AI PRs: prefer teaching over submitting.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
analyze_repoA

Map a public Python GitHub repo. CALL THIS FIRST for any new repo.

Clones the repo if needed (full history, so later blame/bisect work), then returns a RepoMap: lines per language, top-level packages, entry points (console scripts, main.py), test framework and the exact suggested test command, the 25 largest non-test modules with their intra-repo imports (parsed with ast), a README excerpt, and notes such as "no tests found" or "uses C extensions". Results are cached per HEAD commit; pass refresh=True to rebuild.

Args: repo: "owner/name" or a github.com URL. refresh: rebuild even if a map for this commit is cached.

find_hotspotsA

Rank files where bugs most likely hide: change frequency (churn) x code complexity.

Use after analyze_repo to decide where to look for bugs or what to read first. Churn = number of commits touching the file in the window (git log --numstat); complexity = approximate McCabe cyclomatic complexity per function via ast. Research basis: relative code churn predicts defect density (Nagappan & Ball, ICSE 2005), and churn combined with complexity pinpoints defect-prone "hotspots" (Tornhill, "Your Code as a Crime Scene", 2015). Test files are excluded.

Returns per file: rank, score (0..1), churn, lines_changed, complexity_total, complexity_max, the 3 most complex functions (name, line, complexity), and the git command used as evidence.

Args: repo: "owner/name" or a github.com URL. top: how many files to return (1-50). since: history window, e.g. "12 months", "6 weeks", or a date "2024-01-31".

get_architectureA

Summarize the repo's internal module dependency structure from static imports.

Use to explain how the code fits together, or to judge the blast radius of a change. Returns core modules (most imported by other internal modules), leaf modules (imported but import nothing internal), the most dependent modules (most internal imports), a count of isolated modules, and import cycles (groups of modules that import each other, often a design smell). Test modules are excluded; dynamic imports are not seen.

Args: repo: "owner/name" or a github.com URL.

setup_environmentA

Create the repo's isolated Python environment and install the repo plus its test deps.

Call this once per repo before run_tests, run_static_analysis or detect_flaky_tests. extras is a comma-separated list of pip extras (e.g. "test" or "test,dev"); "" installs none. Returns {ok, output (trimmed), next_steps}.

run_testsA

Run the repo's pytest suite (or one target: a file, dir or node id) in its environment.

Use this to find real, reproducible test failures. Returns counts, the exact command and commit (ready to use as Evidence), and up to max_failures failures. Each failure has the message, a trimmed traceback, and location: the deepest traceback frame inside the repo that is NOT a test file, i.e. where the bug most likely lives (null if only test code ran). Requires setup_environment first. Check failures with detect_flaky_tests before reporting.

run_static_analysisA

Run static analyzers (pyflakes, mypy --ignore-missing-imports) over the repo's code.

Use this to find likely bugs without running tests: undefined names, redefinitions, type errors. tools is comma-separated ("pyflakes", "mypy" or both). paths is comma-separated repo-relative paths (default: top-level source dirs). Noise such as unused imports/variables and mypy notes is dropped unless include_style=True. Missing analyzers are pip-installed into the repo env. Returns {issues: [{file, line, code, message, tool}], counts_by_code, commands, commit, truncated}. Static issues are candidates: confirm with a test before reporting.

detect_flaky_testsA

Re-run specific tests runs times to tell real bugs from flaky tests.

ALWAYS use this before reporting any test failure as a bug. Pass node ids from run_tests (e.g. "tests/test_x.py::test_y"); at most 10 ids, runs clamped to 2..20. Each test runs in its own pytest process (so one bad id cannot spoil the others) and is classified as consistently_failing, flaky, passing or not_run, with pass/fail counts per run.

record_findingA

Save a bug to the local evidence ledger (no GitHub calls). Use after you have reproduced a bug.

Never record without a reproducing command: pass evidence_command (the exact command you ran) and evidence_output (its output). If you could not reproduce it, confidence MUST be "low". source: test | static | fuzz | flaky | manual. severity: low | medium | high | critical. file is repo-relative and must be given with line (1-based). The evidence is stamped with the repo HEAD commit and UTC time. Returns the stored finding, including its id (e.g. "F-001").

update_findingA

Change a recorded finding; only the fields you pass are changed.

Use it to fill the teaching fields (why, fix_options, lesson), set status (candidate | confirmed | rejected | reported | fixed), add issue_url / pr_url, or append new evidence (evidence_command + evidence_output). fix_options replaces the list; each item is {"title", "description", "tradeoff", "recommended": bool} and at most one is recommended. Returns the updated finding.

list_findingsA

List recorded findings for a repo as compact rows (id, title, severity, confidence, status, location, evidence_count, needs_teaching). Filter with status. Use get_finding for full detail.

get_findingB

Return one finding in full, including every evidence entry.

explain_findingA

Render the teaching card for a finding as markdown: where (file:line, function, introducing commit), the code with the bad line marked >>, what, why, repro, fix options with trade-offs, lesson and evidence. level: "junior" (adds key concepts) or "senior" (terse). If why / fix_options / lesson are missing, the card ends with a "TODO for Claude" section: fill those via update_finding, then call this again. Show the card to the user as-is.

export_reportA

Write a markdown audit report (summary table + every teaching card) for all findings. Default location is the repo's RepoFlow artifact dir; a custom path must be inside the workspace and end in .md. Returns the file path and finding count.

sandbox_statusA

Report how RepoFlow runs code from target repos: the sandbox mode (docker / local / off), whether Docker is available, the Docker image, and safety warnings. Call this before running tests on an unfamiliar repo, or when a run fails with a sandbox error.

get_contribution_playbookA

START HERE before contributing to a repo (Layer 0). Returns the repo's contribution rules, read from the local clone at the default branch: CONTRIBUTING, code of conduct, SECURITY policy (security bugs are always reported privately, never as public issues/PRs), PR and issue templates (with required fields), governance/CODEOWNERS, CLA, DCO sign-off, commit message convention, changelog/news-fragment rules, dev setup and test commands, pre-commit hooks, CI workflows, whether an issue must come before a PR, the AI policy, and (with a GitHub token) maintainer activity stats. Each item names its source file and quotes it. Cached per default-branch commit; refresh=True rebuilds. Follow it; then call get_contribution_steps.

check_ai_policyA

Classify the repo's stance on AI-assisted contributions: banned | disclosure_required | allowed | unknown, with quotes and their source files (CONTRIBUTING, AI_POLICY*, .github/*, README, CODE_OF_CONDUCT). Conservative: ambiguous banning language counts as banned. If banned, do NOT prepare a PR: tell the user and stop. finding_id is optional and checks that the finding exists; Lite does not record the result.

get_contribution_stepsA

Ordered, repo-specific checklist for a contribution, derived from the playbook. kind: bugfix | docs | feature. Covers: private security reporting, AI policy, reading CONTRIBUTING, duplicate search, issue-first, CLA, branch, dev setup, failing test first, full test run, pre-commit, commit style, DCO sign-off, changelog fragment, PR template, check_pr_readiness, explaining the fix in your own words, then a draft PR you open yourself. Each step names its source and, where one fits, the RepoFlow tool to use (tool is null for manual steps). Walk the user through it in order.

check_pr_readinessA

Run the pre-PR checklist on the current branch of the local clone: not on the default branch, commits exist, tests added/changed, DCO sign-off on every branch commit (if required), changelog fragment (if required), PR template sections present in pr_body (required when the repo has a template), issue-first satisfied (finding.issue_url) when required, finding not a security bug (those go private), AI policy not banned. Re-run after any code change. Returns passed, checks[{name, ok, detail}] and next. Lite does not record the result.

Prompts

Interactive templates invoked by user choice

NameDescription
audit_repoFull end-to-end bug audit workflow for a Python repo.
explain_bugInvestigate a finding and teach it to a junior dev.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.9/5.0

Scored across 18 tools

Disambiguation4/5

The surface is split into clearly staged layers (analysis: analyze_repo/find_hotspots/get_architecture; execution: setup_environment/run_tests/run_static_analysis/detect_flaky_tests; ledger: record/update/get/explain/export; contribution: playbook/ai-policy/steps/pr-readiness), and descriptions spell out ordering and prerequisites. The only real overlaps are check_ai_policy being a subset of get_contribution_playbook and get_contribution_steps being derived from the playbook, but the descriptions explain the distinction (classification verdict vs. checklist) well enough.

Naming Consistency4/5

18 of 19 names follow a clean snake_case verb_noun pattern (list_findings, run_tests, record_finding, check_pr_readiness). The single deviation is sandbox_status, which is a noun phrase rather than verb_noun, plus a few multi-word verbs (get_contribution_playbook) that are long but predictable.

Tool Count4/5

18 tools is on the heavy side but each maps to a distinct stage of a genuinely multi-phase workflow (analysis, environment, test execution, triage, evidence ledger, contribution compliance), so nothing feels padded. A couple of consolidation candidates exist (analyze_repo vs find_hotspots vs get_architecture, playbook vs ai-policy), keeping it just below a clean scope.

Completeness4/5

Coverage runs the full loop: clone/map, environment setup, test and static analysis, flake triage, evidence-stamped findings with CRUD, teaching cards, export, and a whole contribution-readiness pipeline including AI policy and DCO/changelog checks. Minor gaps are no delete_finding and a status-only filter on list_findings, but agents can work around both via update_finding.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues