Login (self-authenticating via email magic link)
Authenticate to claude.ai without cookie injection: requests an email magic link, reads it from Gmail in the same browser (requires an active Google session for that inbox), and lands logged in. Returns {authenticated, method: existing|magic_link, email, orgs}. Chain it before other claude.ai scripts (e.g. list_invoices). Google SSO button is a GIS popup (not drivable) — this email flow is the automatable self-auth path.
Input
email requiredClaude account email. Its Gmail inbox must be reachable (Google session active in this browser).
Output
orgs requiredemail requiredmethod requiredauthenticated requiredAsk Claude
Open a new Claude.ai chat, send one question, and wait for the answer to finish (up to 3 minutes). Returns the answer as the markdown the model emitted, the message and conversation ids, why generation stopped, which model answered, the web_search queries it issued, every source its web_search and web_fetch tools surfaced, and — separately — the sources the answer actually cited. Requires a signed-in session: claude.ai has no anonymous chat. Avoid running many of these at once: claude.ai limits how many chats one account may hold concurrently and refuses the extras, so a refused send comes back quickly carrying Claude's own message and only needs to be retried at a slower pace.
List Claude invoices
List every invoice across the orgs you have billing access to. Returns invoices (org_uuid, org_name, created_ts, due_date_ts, total, total_excluding_tax, currency, status, num_seats, hosted_invoice_url, invoice_pdf_url, payment_status) and skipped, newest first. Orgs you lack billing access to are reported in skipped rather than raising an error. Feed hosted_invoice_url to invoice.stripe.com/download_invoice_pdf to fetch the PDF (verified public/login-free, no Claude session needed).
Claude (Anthropic) login
Log into Claude (Anthropic) via Google SSO. Drives Claude's Continue-with-Google popup, picks the account (optional email arg), clears the consent screen, and lands in the Claude app. Runs on your local extension-paired browser only — it relies on the browser's own signed-in Google session, so it won't work on a cloud/managed browser without one.
