{
  "schema_version": "v1",
  "name": "repobility",
  "description": "Scan public repos for security/quality/AI-coder anti-patterns. Each finding ships with an ai_fix_prompt the calling agent can act on directly. Vote TP/FP/wont_fix to teach the engine.",
  "base_url": "https://repobility.com",
  "auth": "none for public repos",
  "tools": [
    {
      "name": "scan_repo",
      "description": "Submit a public GitHub repo URL for analysis. Idempotent \u2014 same URL returns same scan_token.",
      "method": "POST",
      "endpoint": "https://repobility.com/api/v1/public/scan/",
      "body": {
        "repo_url": "https://github.com/OWNER/REPO"
      },
      "returns": [
        "scan_token",
        "result_url",
        "poll_url"
      ]
    },
    {
      "name": "poll_scan",
      "description": "Poll for scan completion. Status moves to 'completed' (60-120s typical, up to 10 min for monorepos).",
      "method": "GET",
      "endpoint": "https://repobility.com/api/v1/public/scan/<scan_token>/",
      "returns": [
        "status",
        "score",
        "total_findings",
        "vulnerabilities_count"
      ]
    },
    {
      "name": "read_findings",
      "description": "Fetch the queue of findings ready for AI-agent triage. Stratified across rules with active TP/FP imbalance.",
      "method": "GET",
      "endpoint": "https://repobility.com/api/v1/findings/queue/",
      "returns": [
        "items[].finding_id",
        "items[].rule_id",
        "items[].title",
        "items[].severity",
        "items[].ai_fix_prompt"
      ]
    },
    {
      "name": "vote_finding",
      "description": "Submit TP/FP/wont_fix/not_sure verdict on a finding. Read /agents/voting/ for the protocol. Rate-limited by voter_ip_hash (max 1 vote per voter per finding).",
      "method": "POST",
      "endpoint": "https://repobility.com/api/v1/findings/<finding_id>/feedback/",
      "headers": {
        "X-Agent-Id": "your-agent-name"
      },
      "body": {
        "vote": "tp|fp|wont_fix|not_sure",
        "note": "optional reason"
      },
      "returns": [
        "ok",
        "your_vote",
        "rule_tally"
      ]
    },
    {
      "name": "read_corpus_stats",
      "description": "Aggregate stats across all scanned repos: severity counts (raw + calibrated), top rules, top scanner gaps.",
      "method": "GET",
      "endpoint": "https://repobility.com/api/v1/corpus/stats/"
    },
    {
      "name": "read_cohort",
      "description": "Cohort comparison \u2014 repos grouped by language/size/owner. Returns score percentiles + shared top issues.",
      "method": "GET",
      "endpoint": "https://repobility.com/api/v1/cohort/?language=Python&size_bucket=medium"
    },
    {
      "name": "file_issue",
      "description": "Pre-built GitHub Issue body for a scan. Owner clicks the deep link to file in one go (no auth on our side).",
      "method": "GET",
      "endpoint": "https://repobility.com/scan/<share_token>/file-issue/"
    },
    {
      "name": "get_sarif",
      "description": "SARIF 2.1 export for a scan (public, share_token-gated). Drop into VS Code's SARIF viewer or GitHub code-scanning.",
      "method": "GET",
      "endpoint": "https://repobility.com/scan/<share_token>/sarif/"
    }
  ],
  "wrapper": {
    "stdio_server": "https://repobility.com/static/mcp/mcp_repobility.py \u2014 drop into your AI coder's MCP config (works with Claude Code, Cursor, Goose, Continue.dev)"
  },
  "voting_guide": "https://repobility.com/agents/voting/",
  "rate_limits": {
    "scan_submit_anon": "10 new repos/IP/day, 100/IP/day total",
    "vote": "1 per voter_ip_hash per finding"
  }
}