{
  "name": "JARVIS MCP Server",
  "version": "1.10.0",
  "description": "Supabase-backed MCP intelligence layer for JARVIS agents — v1.6.0 enforces MCP_AUTH_TOKEN bearer.",
  "endpoints": {
    "mcp": "/mcp (POST, bearer required)",
    "sse": "/sse (GET ?auth=, POST bearer)",
    "message": "/message (POST, bearer required)",
    "health": "/health"
  },
  "tools": [
    {
      "name": "get_client_context",
      "description": "Load tenant config (name, goals, inventory) at session start."
    },
    {
      "name": "get_competitor_intel",
      "description": "Pull Loki Coach competitor + market intel for comparisons."
    },
    {
      "name": "log_action_item",
      "description": "Log follow-up task (callback, brochure, site visit) per client."
    },
    {
      "name": "search_market_intel",
      "description": "Search empire intel for industry data, trends, buyer personas."
    },
    {
      "name": "queue_task",
      "description": "Dispatch task to the empire (C2, PAP, CC, CODEX, JARVIS). Read back what you queued."
    },
    {
      "name": "claude_quick",
      "description": "Ask Claude for mid-call reasoning (draft, concept, summary). <200 words. Use queue_task for long builds."
    },
    {
      "name": "start_voice_session",
      "description": "Open voice_sessions row at call start. Returns session_id (chain to other tools)."
    },
    {
      "name": "end_voice_session",
      "description": "Close voice session with final telemetry (status, latency, sentiment)."
    },
    {
      "name": "update_omniscience",
      "description": "Upsert empire brain domain (decisions, status, intel). content = JSON object."
    },
    {
      "name": "query_omniscience",
      "description": "Read an exact or spoken empire brain domain. If exact lookup misses, returns fuzzy Omniscience/CIPHER matches."
    },
    {
      "name": "search_omniscience",
      "description": "Search the empire brain broadly by topic, company, project, or phrase when you do not know the exact domain key."
    },
    {
      "name": "query_akashic_journal",
      "description": "Read recent empire-wide Akashic journal entries. Use when Calvin asks what happened, what C2/PAP/CC/CODEX did, prior work, decisions, or activity logs."
    },
    {
      "name": "write_akashic_journal",
      "description": "Append an entry to the empire-wide akashic_journal log. Use to record what happened on this call — decisions made, actions taken, intel gathered, follow-ups committed."
    },
    {
      "name": "query_command_queue",
      "description": "Read pending or in-progress tasks across the empire (C2, PAP, CC, CODEX, JARVIS)."
    },
    {
      "name": "web_search",
      "description": "Run live web search using configured Tavily/Exa sources. Use for current facts, public web lookups, source discovery, and anything not guaranteed to be in Omniscience/Akashic."
    },
    {
      "name": "empire_sitrep",
      "description": "Empire status for Calvin: ATLAS's latest morning brief plus live counts of open proposals, items needing Calvin, and pending alerts. Use when Calvin asks 'sitrep', 'what's the status', 'what's open', 'what needs me', or 'what did ATLAS do'."
    },
    {
      "name": "apply_atlas_proposal",
      "description": "Execute an ATLAS proposal (re-route / re-dispatch / close) via the audited, transition-safe executor. Identify it by proposal_id, or by `match` — a word from the task intent (e.g. 'argus enrichment'). Use when Calvin says 'apply the re-route', 'do the ATLAS fix for X', or 'reassign X to Codex'."
    },
    {
      "name": "list_calendar_events",
      "description": "List upcoming Google Calendar events in a time window. Use when the caller asks 'what's on my schedule', 'when am I free Thursday', etc."
    },
    {
      "name": "create_calendar_event",
      "description": "Create a new Google Calendar event. Use when Calvin asks to schedule, book, or block time. Pass attendee emails to send invites."
    },
    {
      "name": "send_email",
      "description": "Send a real email through JARVIS's server-side Resend sender. Use this for caller-approved summaries, recaps, follow-ups, and email sends. Artifact/PDF emails require a verified cipher_artifact_ready.v1 artifact_reference. Does not require Google OAuth."
    },
    {
      "name": "cipher_artifact_request",
      "description": "Request a verified CIPHER PDF/artifact by target, client, or report type. Returns cipher_artifact_ready.v1 with storage path when ready, or queues a clear artifact-generation work order when missing."
    },
    {
      "name": "draft_email",
      "description": "Create a Gmail draft in Calvin's inbox. Use when Calvin asks JARVIS to draft an email, send a follow-up, or reply on his behalf. The draft lands in Drafts — Calvin reviews + sends manually."
    },
    {
      "name": "send_sms",
      "description": "Send a real SMS via Twilio. Brand-routed sender (bdigital=+15612640478, artofpossible=+17705251297). USE THIS when Calvin or any caller asks JARVIS to text/SMS them. Do NOT claim a message was sent unless this tool returns status=queued or sent. Logs to sms_log automatically. Default brand=bdigital."
    }
  ]
}