{
  "name": "RunMac agent API",
  "base": "https://ops.runmac.dev",
  "auth": "Authorization: Bearer rmo_… (admin → Settings → Agent API keys)",
  "mcp": "https://ops.runmac.dev/mcp (Streamable HTTP, JSON responses; same operations as tools)",
  "roles": {
    "support": "Reads support requests, customers, their Macs and payments, and the help guides; replies to customers and closes requests.",
    "ops": "Everything the support agent can do, plus the fleet, leases, orders, activity and survey results; can extend a lease by up to 7 days and run the health check."
  },
  "operations": [
    {
      "tool": "whoami",
      "method": "GET",
      "path": "/v1/whoami",
      "scope": null,
      "description": "This key: its name, role and what it may do."
    },
    {
      "tool": "list_support_requests",
      "method": "GET",
      "path": "/v1/support",
      "scope": "support.read",
      "description": "Support requests, newest activity first. status: open (waiting on us), answered (waiting on the customer), closed; omit for all."
    },
    {
      "tool": "get_support_request",
      "method": "GET",
      "path": "/v1/support/{id}",
      "scope": "support.read",
      "description": "One support request with every message (oldest first) and the customer: their Macs, plan and payments."
    },
    {
      "tool": "reply_to_support_request",
      "method": "POST",
      "path": "/v1/support/{id}/reply",
      "scope": "support.reply",
      "description": "Reply to a support request as RunMac support. The customer is emailed the reply and can answer by email. close: true also closes the request. Be warm, plain and accurate; never promise refunds, discounts or anything not in the help guides; leave refunds and account changes to a human (say a person will follow up)."
    },
    {
      "tool": "set_support_request_status",
      "method": "POST",
      "path": "/v1/support/{id}/status",
      "scope": "support.reply",
      "description": "Mark a request open (needs us), answered (waiting on the customer) or closed. Nothing is emailed."
    },
    {
      "tool": "find_customer",
      "method": "GET",
      "path": "/v1/customers",
      "scope": "support.read",
      "description": "Look a customer up by email: their Macs (current and past), plan, payments (refunds and disputes included) and support requests."
    },
    {
      "tool": "get_customer",
      "method": "GET",
      "path": "/v1/customers/{id}",
      "scope": "support.read",
      "description": "One customer by id: their Macs, plan, payments and support requests."
    },
    {
      "tool": "search_help",
      "method": "GET",
      "path": "/v1/help",
      "scope": "support.read",
      "description": "Search the RunMac help guides (the source of truth for answers). Returns slug, title, summary and link; read one with get_help_guide. Omit q for the full list."
    },
    {
      "tool": "get_help_guide",
      "method": "GET",
      "path": "/v1/help/{id}",
      "scope": "support.read",
      "description": "A help guide as Markdown. Link customers to its url rather than pasting long guides."
    },
    {
      "tool": "list_macs",
      "method": "GET",
      "path": "/v1/macs",
      "scope": "ops.read",
      "description": "The fleet: every Mac with status, health, macOS, agent report time and its active lease (customer and paid-until)."
    },
    {
      "tool": "list_leases",
      "method": "GET",
      "path": "/v1/leases",
      "scope": "ops.read",
      "description": "Leases: active ones by default (status=ended for the last 50 ended)."
    },
    {
      "tool": "list_orders",
      "method": "GET",
      "path": "/v1/orders",
      "scope": "ops.read",
      "description": "Payments in the last `days` days (default 7, at most 90), newest first, with tax bucket, refunds and disputes."
    },
    {
      "tool": "list_activity",
      "method": "GET",
      "path": "/v1/activity",
      "scope": "ops.read",
      "description": "The activity log (newest first), optionally only actions starting with `action` (e.g. \"support.\", \"lease.\")."
    },
    {
      "tool": "get_survey_results",
      "method": "GET",
      "path": "/v1/surveys",
      "scope": "ops.read",
      "description": "Survey results: the screen speed survey (answers by customer and country) and “why did you stop?”."
    },
    {
      "tool": "extend_lease",
      "method": "POST",
      "path": "/v1/leases/{id}/extend",
      "scope": "ops.write",
      "description": "Give an active lease free extra time: move its paid-until date later by up to 7 days at a time (YYYY-MM-DD). Nothing is charged or emailed."
    },
    {
      "tool": "run_health_check",
      "method": "POST",
      "path": "/v1/health-check",
      "scope": "ops.write",
      "description": "Run the fleet health check now (MDM last-seen, setup jobs, lease timers). Same as the 10-minute check."
    }
  ]
}