{"report":"{\"v\":1,\"package\":\"@apex-inc/mcp-server\",\"version\":\"0.55.1\",\"ranAt\":\"2026-11-16T11:37:21.922Z\",\"install\":{\"ok\":true,\"bin\":\"mcp-server\",\"integrity\":\"sha512-oZOUeqTF9zqwUhBgyP6SIxlvLUGV/+5SWyqgZuT0VEQbtHysbZomUSan/qInWMp9twh+cCMX1HYuOgCGWclp5w==\",\"deps\":97,\"scripts\":[],\"bins\":[\"mcp-server\",\"apex-mcp\"],\"license\":\"MIT\"},\"start\":{\"ok\":true,\"ms\":256,\"serverName\":\"apex\",\"serverVersion\":\"0.55.1\",\"protocol\":\"2025-06-18\",\"stderr\":\"[apex] Apex tools 0.55.1\\n[apex] Ready. Run any Apex tool to connect — you'll get a one-time approval link.\\n[apex] Authorize this editor: open https://app.apex.inc/activate?code=CT76-V6G9 and approve (code CT76-V6G9).\\n\"},\"tools\":[{\"name\":\"plan_experiment\",\"description\":\"Apex — PLANNING ONLY, does not create anything. Analyzes a goal against existing beliefs and experiments, then returns structured options for the user to choose from. After calling, you MUST present the returned options as a numbered list or poll and wait for the user to pick before calling any other Apex tools.\",\"params\":[\"goal\",\"target_url\"]},{\"name\":\"start_reasoning\",\"description\":\"Apex — Record a belief and hypothesis chain. Only call AFTER the user has picked a belief statement and confidence level from the options you presented.\",\"params\":[\"decision\",\"belief\",\"confidence\"]},{\"name\":\"create_belief\",\"description\":\"Apex — Record an assumption your team is making. Confirm the belief statement and confidence with the user before calling.\",\"params\":[\"statement\",\"confidence\",\"parent_belief_id\"]},{\"name\":\"create_experiment\",\"description\":\"Apex — Create an experiment record. Returns a structured recipe for the AI agent to implement. The agent makes the actual code changes using useApexVariant hook — Apex never generates code. Always call with preview=true first so the user sees a summary.\",\"params\":[\"name\",\"target_url\",\"control_content\",\"variant_content\",\"target_component\",\"target_anchor\",\"traffic_split\",\"belief_id\",\"hypothesis_id\",\"prediction_id\",\"belief_statement\",\"belief_confidence\",\"hypothesis_statement\",\"primary_metric_event\",\"primary_metric_type\",\"primary_metric_value_property\",\"guardrail_event\",\"guardrail_type\",\"guardrail_threshold\",\"prediction_magnitude\",\"surface\",\"paid_channel\",\"data_source_id\",\"randomization_unit\",\"min_sample_per_arm\",\"runtime_days\",\"preview\"]},{\"name\":\"attach_experiment_asset\",\"description\":\"Apex — Attach a variant screenshot to an experiment. Use after capturing a control/variant screenshot: for localhost or auth-gated pages the agent captures, pass imageBase64; for an already-hosted image, pass url. The stored asset shows on the dashboard experiment card and the experiment detail gallery.\",\"params\":[\"experiment_id\",\"variant_key\",\"image_base64\",\"url\",\"viewport\",\"format\",\"label\",\"commit_sha\"]},{\"name\":\"recapture_experiment_screenshots\",\"description\":\"Apex — Re-take the pictures of a web or letter experiment's arms (the images shown on the dashboard and in the daily recap). Web: renders the target URL for control + variant; use after the variant is deployed. For unpublished SDK / Cursor drafts, attach localhost shots with attach_experiment_asset instead — hosted recapture of a public URL will be refused. Letter (Adaptive Journey) tests: draws each arm's letter as it sends, in the workspace's look; use after the workspace's logo or colors change. Mobile tests capture on-device and are refused.\",\"params\":[\"experiment_id\"]},{\"name\":\"send_daily_recap_to_me\",\"description\":\"Apex — Email today's experiment recap to the signed-in owner or admin, and nobody else. It is the same letter the evening recap sends: every running experiment with a picture of each arm. Use it when the user wants to see the recap now, or to check how it looks after a change. It needs a person: a workspace-wide key is refused.\",\"params\":[]},{\"name\":\"verify_experiment_wiring\",\"description\":\"Apex — Verify an experiment is actually wired up before launch: check whether `experiment_exposure` events are arriving for BOTH arms. Use this before activate_experiment to avoid launching an experiment that silently collects no data. Returns a per-arm exposure breakdown and an actionable next step.\",\"params\":[\"experiment_id\"]},{\"name\":\"activate_experiment\",\"description\":\"Apex — Launch an experiment. Changes its status from draft to running. Traffic will be split immediately. Before flipping to running, this verifies BOTH arms are producing `experiment_exposure` events (wiring check). Code-wired (SDK-hook) experiments may be activated before their code ships: the server holds them in `pending_deployment` (\\\"Waiting on deploy\\\") and starts on the first exposure. Snippet experiments and journey_arm message tests do not need pre-activation exposures — journey traffic starts on the next send once running. Only wired web experiments that genuinely can't self-start are refused unless force is true. Ask the user to confirm before calling.\",\"params\":[\"experiment_id\",\"force\"]},{\"name\":\"pause_experiment\",\"description\":\"Apex — Pause a running experiment. All visitors will see the control until resumed. Ask the user to confirm before calling.\",\"params\":[\"experiment_id\"]},{\"name\":\"conclude_experiment\",\"description\":\"Apex — End a running or paused experiment now, without declaring a winner. Everyone sees the control from then on. The result is recorded as inconclusive and its belief is updated, so the test can then be archived. Use this when the user wants to stop a test that has no clear winner (or that they're replacing). If there is a winner they want to ship, use promote_winner instead. Ask the user to confirm before calling.\",\"params\":[\"experiment_id\"]},{\"name\":\"track_deployment\",\"description\":\"Apex — Record that an experiment's code has been committed and pushed. Stores the commit SHA and monitors deployment status. Call after pushing the experiment code.\",\"params\":[\"experiment_id\",\"commit_sha\",\"branch\"]},{\"name\":\"check_deployment\",\"description\":\"Apex — Check if an experiment's code has been deployed. Verifies that the assignment endpoint responds for this experiment. Call after track_deployment.\",\"params\":[\"experiment_id\"]},{\"name\":\"archive_experiment\",\"description\":\"Apex — Archive an experiment. Removes it from active views but preserves all data, learnings, and belief graph connections. Archived experiments still contribute to intelligence scoring and recommendations. A RUNNING experiment cannot be archived — end it first (conclude_experiment / promote_winner) so its result + belief are captured; the server returns 409 archive_requires_conclusion otherwise. Ask the user to confirm before calling.\",\"params\":[\"experiment_id\"]},{\"name\":\"list_experiments\",\"description\":\"Apex — List the user's Apex experiments. Call this ONLY when the user explicitly asks about their experiments or what's running/ready to graduate. Do not call it proactively for unrelated tasks. Archived experiments are hidden by default — pass status \\\"archived\\\" to see them, or \\\"all\\\" to see everything. Experiments that are promoted but not graduated are flagged as PENDING GRADUATION.\",\"params\":[\"status\"]},{\"name\":\"get_results\",\"description\":\"Apex — Get the website experiment card: visitors, conversions, and confidence from GET /api/experiments/:id?unified=true. For readiness (collecting / decisive / inconclusive) or a letter Experiment step, use get_experiment_results.\",\"params\":[\"experiment_id\"]},{\"name\":\"list_beliefs\",\"description\":\"Apex — List the workspace's beliefs (the assumptions experiments test). Shows confidence, validation state, and AI-generated provenance so you can LINK an existing belief instead of minting a duplicate.\",\"params\":[\"query\"]},{\"name\":\"list_belief_suggestions\",\"description\":\"Apex — \\\"Worth writing down\\\": settled experiments whose verdict passes the belief gate (decisive, exclusion attached the whole window for Ad holdouts, no sample-ratio mismatch, no guardrail breach, both arms over the events floor) and have not been written down as a belief yet. Statistical only; no model in the path. Pass experimentId for one experiment and, when nothing is offered, 'blocker' says why in one word. Each row carries the sentence Apex would write and the evidence line; write one down with accept_belief_suggestion.\",\"params\":[\"experiment_id\",\"max\"]},{\"name\":\"accept_belief_suggestion\",\"description\":\"Apex — Write a settled experiment's verdict down as one belief. Creates the Belief with the experiment as its supporting evidence and generatedFromExperimentId set; its evidence state starts at 'one study' and moves to 'validated' when a second test agrees. 'statement' is the workspace's edit of the sentence (the numbers and evidence line stay Apex's). The gate re-runs here, so an experiment list_belief_suggestions would not offer is refused with its blocker. Writing it twice returns the existing belief. Admin only.\",\"params\":[\"experiment_id\",\"statement\"]},{\"name\":\"verify_ad_exclusion\",\"description\":\"Apex — Ad holdout only (surface paid_channel). Ask Apex to check, right now, whether the do-not-show list is on every ad set the holdout covers, and record the answer. Nothing is counted until this reads \\\"attached\\\"; the daily check runs on its own, so call this after the list lands or after the workspace attached it by hand. Rate-limited: a recent check returns the last reading instead of re-reading.\",\"params\":[\"experiment_id\"]},{\"name\":\"attach_ad_exclusion\",\"description\":\"Apex — Ad holdout only (surface paid_channel, Meta and TikTok). Apex puts the held-back list on the holdout's ad sets (TikTok: ad groups) itself: exactly one exclusion added per ad set, every other targeting key (locations, age, placements, ...) left as read, then read back to confirm. Two steps, always in this order: (1) call with preview=true (default) and SHOW the workspace the before/after per ad set — which ad sets get the exclusion, which already have it, which are on another account and will not be touched; (2) once the workspace confirms, call with preview=false. The first real attach in a workspace needs acknowledge=true, which records the workspace's standing allowance for Apex to edit ad-set targeting (say so before passing it; never pass it without the workspace having seen the preview). Refuses with needs_targeting_ack when it is missing, list_not_on_network while the list is still syncing, and not for Google/LinkedIn (there the owner adds the list in the network's tools and verify_ad_exclusion checks). Ending, pausing or archiving the holdout takes the list off again on its own. Not billed.\",\"params\":[\"experiment_id\",\"preview\",\"acknowledge\"]},{\"name\":\"detach_ad_exclusion\",\"description\":\"Apex — Ad holdout only (surface paid_channel, Meta and TikTok). Take Apex's exclusion back off the holdout's ad sets and delete the held-back list from the ad platform. Removes only what Apex added: a list the owner attached by hand is refused (not_apex_attached) and the owner removes it in Ads Manager. Ending, pausing or archiving the holdout does this on its own; call this only to undo an attach early. Admin only. Confirm with the workspace first: the held-back people start seeing the ads again and the holdout stops measuring.\",\"params\":[\"experiment_id\"]},{\"name\":\"update_experiment\",\"description\":\"Apex — Edit an EXISTING experiment. Editability is gated by lifecycle: a DRAFT (with no exposures yet) is fully editable; once it has data or is running, the pre-registration (hypothesis, metric, guardrails) and bucketing (surface, variants) freeze and edits return a clear \\\"experiment_locked\\\" reason. After freeze, fork_experiment instead. Use this to fix a mislabeled surface or correct a draft before launch.\",\"params\":[\"experiment_id\",\"name\",\"surface\",\"hypothesis\",\"target_url\",\"prediction_id\",\"primary_metric_event\",\"primary_metric_type\",\"guardrail_event\",\"min_sample_per_arm\",\"runtime_days\",\"allocation\"]},{\"name\":\"fork_experiment\",\"description\":\"Apex — Duplicate a frozen experiment's design into a fresh editable DRAFT. Use this after update_experiment reports \\\"experiment_locked\\\" (running or has exposures). The fork carries NO data (no results, assignments, or winner) and records its lineage; edit it freely, then activate.\",\"params\":[\"experiment_id\"]},{\"name\":\"check_experiment_conflicts\",\"description\":\"Apex — Before you create or activate an experiment, check who else is live on that page. Pin a part (target_anchor) so two homepage experiments are not the same place. Whole page plus a part is one place. Different named parts: the same person can see both — say so, do not add the two lifts. Overlap: Someone could see both; Keep them apart with set_experiment_mutex, or wait. Shared conversion on the allowed mix: one experiment or wait. Pass either experimentId OR the candidate's location + primaryMetricEvent. Advisory only.\",\"params\":[\"experiment_id\",\"surface\",\"target_component\",\"target_url\",\"target_anchor\",\"data_source_id\",\"primary_metric_event\"]},{\"name\":\"check_live_tests\",\"description\":\"Apex — Before you edit a page, commit, or push, call this even if the user did not mention experiments. Also call it before you change a letter, Adaptive Journey, or Milestone. If something live is on those files or ids, stop and ask. Do not edit. Do not commit.\",\"params\":[\"file_paths\",\"file_contents\",\"urls\",\"communication_ids\",\"journey_ids\",\"milestone_ids\"]},{\"name\":\"set_experiment_mutex\",\"description\":\"Apex — Put two experiments in a mutual-exclusion group: no visitor is ever assigned to both, so they run concurrently with partitioned traffic (the scientifically clean way to run two experiments that touch the same surface). Bidirectional. Pass mode:\\\"remove\\\" to unlink. Safe on running experiments — only affects future assignments.\",\"params\":[\"experiment_id\",\"with_experiment_id\",\"mode\"]},{\"name\":\"suggest_experiment\",\"description\":\"Apex — Get smart experiment suggestions based on context. Analyzes your assumptions, past experiments, and confidence gaps to recommend what to test next.\",\"params\":[\"context\"]},{\"name\":\"promote_winner\",\"description\":\"Apex — Promote the winner on a website experiment card (PATCH /api/experiments action=promote). The snippet serves that arm immediately. For a letter Experiment step, use promote_experiment_winner. After promoting, use graduate_experiment to put the winner in source.\",\"params\":[\"experiment_id\",\"winner\"]},{\"name\":\"get_experiment_results\",\"description\":\"Apex — Readiness + results for a letter Experiment step (or any experiment): collecting / decisive / inconclusive / guardrail from GET /api/experiments/:id/results. For the website experiment card (visitors and conversions), use get_results.\",\"params\":[\"experiment_id\"]},{\"name\":\"promote_experiment_winner\",\"description\":\"Apex — Promote the winner of a letter Experiment step (or any unified experiment). Re-verifies the readiness gate server-side and writes the winning variant's content into the canonical communication as a new version; losing variants are archived. For the website experiment card, use promote_winner. Pass force=true to override \\\"not enough people yet.\\\" Force cannot override a page that changed mid-flight.\",\"params\":[\"experiment_id\",\"force\",\"winner_key\"]},{\"name\":\"graduate_experiment\",\"description\":\"Apex — Get instructions to make a promoted experiment's winning changes permanent in the codebase. Returns the original values (for searching in source files) and new values (for replacement). After making the edits and deploying, the Apex snippet automatically detects the native changes and marks the experiment as graduated.\",\"params\":[\"experiment_id\"]},{\"name\":\"record_outcome\",\"description\":\"Apex — Log the outcome of an experiment and update belief confidence. Present the outcome interpretation to the user and let them confirm before recording.\",\"params\":[\"experiment_id\",\"belief_id\",\"outcome\",\"metric_delta\",\"notes\"]},{\"name\":\"predict_impact\",\"description\":\"Apex — Decision guardrail: predict the impact of a proposed change by searching history for similar experiments. Returns historical data, confidence, and a recommendation.\",\"params\":[\"description\"]},{\"name\":\"evaluate_feature\",\"description\":\"Apex — Pre-build decision intelligence: evaluate a feature idea against the belief graph, past experiments, and intelligence score before committing to building it.\",\"params\":[\"feature\",\"target_metric\"]},{\"name\":\"link_experiment\",\"description\":\"Apex — Link an experiment to a GitHub pull request or issue. The link is what auto-starts the experiment when the PR merges. The convention \\\"apex/exp_XXX\\\" in your PR title also auto-links, but call this explicitly to be sure.\",\"params\":[\"experiment_id\",\"system\",\"kind\",\"repo\",\"external_id\",\"url\"]},{\"name\":\"unlink_experiment\",\"description\":\"Apex — Remove an Engineering Link from an experiment.\",\"params\":[\"experiment_id\",\"link_id\"]},{\"name\":\"gate_experiment_on_merge\",\"description\":\"Apex — Arm a merge gate: bind an experiment to a linked PR so merging it auto-starts the test. Requires a frozen design spec (primary metric, minimum sample size, max duration, stopping rule) — this is the rigor gate that stops PR latency from changing the rules of the test. Link the PR first with link_experiment.\",\"params\":[\"experiment_id\",\"engineering_link_id\",\"ramp_on_merge\",\"primary_metric\",\"min_sample_size\",\"max_duration_days\",\"stopping_rule\"]},{\"name\":\"open_graduation_pr\",\"description\":\"Apex — Open an Apex-authored Graduation PR that inlines the winning variant in the merchant's repo. Requires the repo to be opted in for Apex writes (Automation Controls). The experiment must be promoted with a winner. No LLM — a deterministic, reviewable manifest + branded PR.\",\"params\":[\"experiment_id\"]},{\"name\":\"open_revert_pr\",\"description\":\"Apex — Open a native-format Revert PR removing a losing experiment's variant. Requires the repo to be opted in for Apex writes.\",\"params\":[\"experiment_id\"]},{\"name\":\"get_automation_controls\",\"description\":\"Apex — Read the workspace's Graduation Pipeline Automation Controls (on-conclusion behavior, per-repo write allowlist, GitHub visibility, commit/branch conventions).\",\"params\":[]},{\"name\":\"update_automation_controls\",\"description\":\"Apex — Update the workspace's Graduation Pipeline Automation Controls. Only the fields you pass change. To let Apex open PRs to a repo, add it via writeRepos (or use the dedicated repos endpoint).\",\"params\":[\"on_win\",\"on_lose\",\"write_repos\",\"github_visibility\",\"commit_convention\",\"branch_convention\",\"working_hours\"]},{\"name\":\"list_engineering_links\",\"description\":\"Apex — List the PRs and issues linked to an experiment, with their current state.\",\"params\":[\"experiment_id\"]},{\"name\":\"recommend_communications\",\"description\":\"Get recommended lifecycle communications for your vertical and conversion model. Returns a prioritized list of emails and push notifications to set up.\",\"params\":[]},{\"name\":\"generate_communications\",\"description\":\"Create your communication program from recommendations. Pass catalog entry IDs to generate tenant communications with pre-written copy. Each new letter wears the workspace default Theme (Title / Body / Button look is snapshotted; catalog copy is not rewritten to match). Preview with preview_communication to see theme roles vs block overrides.\",\"params\":[\"catalog_entry_ids\"]},{\"name\":\"list_communications\",\"description\":\"List the workspace's communication templates (email / inbox / web push / mobile push) with the fields you need to CHOOSE one — for a journey send step, a broadcast, or a transactional send. Returns per template: title, version, status, pipeline, channels, subject, a one-line body preview so you can disambiguate similar titles without opening each one, and controlState. Pipeline is 'transactional' (bypasses opt-out — needs a recipient-initiated trigger) or 'marketing' (consent-gated). Filter by pipeline, channel, or a search string. This is the programmatic equivalent of the dashboard's communication picker.\\n\\ncontrolState tells you what the Control currently IS, and therefore what editing it will cost: 'winner' (won an experiment, unedited — editing needs an explicit intent), 'winner_edited' (won, then changed since), 'in_experiment' (frozen, an experiment is measuring it right now), 'no_winner' (an experiment ran and settled without one), 'none' (never experimented on). A live letter with no champion is still editable; Publish asks replace vs compete. A champion or a running test: do not edit Control — add a variant, then compete.\",\"params\":[\"pipeline\",\"channel\",\"search\",\"include_archived\"]},{\"name\":\"list_communication_themes\",\"description\":\"List workspace communication Themes (the look: fonts, sizes, colors, Title/Body/Button roles). A Theme is not a Template — Templates are the job (event, slots, copy). Activate a Template with no extra theme step; new emails wear the workspace default theme. Apply writes drafts only; the merchant still publishes each email.\",\"params\":[]},{\"name\":\"create_communication_theme\",\"description\":\"Create a communication Theme (the look). Clone an existing theme with clone_from_id, or pass style/roles. Does not assign other emails. Tell the merchant to publish emails after applying.\",\"params\":[\"name\",\"clone_from_id\",\"style\",\"roles\"]},{\"name\":\"update_communication_theme\",\"description\":\"Update a communication Theme's name, style tokens, or Title/Body/Button roles. Does not rewrite other emails. Use apply_communication_theme to draft the look onto chosen emails. set_default makes new activations wear this theme.\",\"params\":[\"theme_id\",\"name\",\"style\",\"roles\",\"set_default\"]},{\"name\":\"apply_communication_theme\",\"description\":\"Apply a Theme's look onto chosen communication Templates. Default apply is draft — recipients keep the old look until the merchant publishes. apply=live publishes a new version with only the look, so the next send uses it; other unpublished edits stay drafts unless their ids are in publish_edits_ids. Only pass publish_edits_ids when the merchant asked to publish those edits: it sends unreviewed words and blocks to recipients. An email with a second version drafted, unresolved tokens, or a missing app URL keeps its edits as a draft (editsKept in the result). Emails in a running test are skipped (reason in_test) and keep their look. Emails Apex couldn't check for a running test are skipped (reason unchecked) and nothing changes on them: retry those ids, and only if the merchant says they aren't in a test, pass them in confirm_not_in_test_ids. Omit comm_ids to target every template already on this theme. Never group emails by experiment catalog ids; a workspace's order-updates series is the same object.\",\"params\":[\"theme_id\",\"comm_ids\",\"apply\",\"publish_edits_ids\",\"confirm_not_in_test_ids\"]},{\"name\":\"edit_communication\",\"description\":\"Update a communication's subject, body, CTA, channels, or status. Pass the communication ID and the fields to update. For blank/builder comms, the headline/body/ctaLabel/ctaUrl slots are synced into the rendered email body — verify with preview_communication.\\n\\nA communication's Control is protected when it won an experiment or a published journey is sending it. Editing it then requires `intent`: \\\"compete\\\" adds your edit as a variant and measures it against the current content (nothing changes for recipients yet); \\\"replace\\\" makes your edit what everyone receives and supersedes any prior win. WHEN IN DOUBT, USE \\\"compete\\\" — it is recoverable, \\\"replace\\\" discards a measured result permanently. The server returns 409 intent_required with both options if you omit it.\",\"params\":[\"communication_id\",\"subject\",\"slots\",\"blocks\",\"channels\",\"sender_name\",\"reply_to\",\"status\",\"audience_bucket\",\"intent\",\"confirm_live_experiment\"]},{\"name\":\"reset_communication\",\"description\":\"Put the Apex template's current version into a communication's draft, replacing its copy and layout. Use when a letter was made from an Apex template and the template has since improved, or the stored copy is broken. Works on any communication made from an Apex template, including lists of people or items that edit_communication can't reach. Only the draft changes; nothing sends differently until publish_communication (intent \\\"replace\\\" sends it to everyone and moves its journeys onto it). Refuses while the letter is in a running test. Returns no_template when the letter wasn't made from an Apex template.\",\"params\":[\"communication_id\"]},{\"name\":\"publish_communication\",\"description\":\"Publish a communication's draft as the live version — this is what makes an edit reach recipients. Editing only saves a draft.\\n\\nCompete (or publishing a letter that already has variants) creates a prefilled DRAFT experiment. It does not start the test. After the user reviews the draft, call activate_experiment to begin it. Replace publishes the letter for everyone and never creates an experiment.\\n\\nOptional overrides: hypothesis, belief_id, confidence, duration_days.\\n\\nTwo conflicts need a decision rather than a retry. `ambiguous_experiment_host` means several published journeys send this communication — the candidates are returned; ask the user and re-issue with host_journey_id. `comm_already_in_experiment` means one is already running; end it first.\\n\\n`test_check_unavailable` means Apex couldn't check whether the communication is in a running test, so nothing changed. Retry once. If it still fails, ask the user; pass confirmLiveExperiment only when they say it isn't in a test.\",\"params\":[\"communication_id\",\"intent\",\"confirm_live_experiment\",\"host_journey_id\",\"opt_out_journey_ids\",\"hypothesis\",\"belief_id\",\"confidence\",\"duration_days\"]},{\"name\":\"get_communication\",\"description\":\"Read one communication as written: title, status, channels, subject, and its body as the same sections edit_communication takes in `blocks` (heading, text, image, button, html, spacer, divider). Each section has an id. A section these types can't describe (a list of people or items, a product grid) comes back as keep with its kind. Read, change, and pass the sections back to edit_communication, ids and keep sections included, to edit a letter without losing its pictures, lists or layout. The brand header and footer are not listed; edits keep them. Shows the unpublished draft when there is one.\",\"params\":[\"communication_id\"]},{\"name\":\"preview_communication\",\"description\":\"See the rendered communication with your brand and Theme applied. Returns the subject, the rendered plain-text body, every picture's URL and size in order, Title/Body/Button roles, which blocks override the theme, and a browser preview link.\",\"params\":[\"communication_id\"]},{\"name\":\"add_communication_variant\",\"description\":\"Add a content variant (Variant A, B, …) to a communication. Clones the current Control into a new column so you can run a content experiment. When the letter is a champion, this is how you author a challenger — do not edit Control. Does not change what recipients get until you publish. Theme look is inherited; do not set per-block align here.\",\"params\":[\"communication_id\",\"label\"]},{\"name\":\"send_test_communication\",\"description\":\"Send a test email to yourself. The email will be sent to the logged-in user's email address.\",\"params\":[\"communication_id\"]},{\"name\":\"trigger_communication\",\"description\":\"Manually send a communication to a specific recipient. Use for one-off sends or testing with specific email addresses.\",\"params\":[\"communication_id\",\"recipient_email\",\"merge_data\"]},{\"name\":\"create_comm_experiment\",\"description\":\"Legacy helper. Prefer the composer loop: edit_communication or add_communication_variant, then publish_communication (compete creates a prefilled draft), then activate_experiment to start the test. Do not teach this as the default.\",\"params\":[\"communication_id\",\"name\",\"split_level\",\"funnel_goal\",\"goal_action\",\"observation\",\"hypothesis\",\"prediction_magnitude\",\"prediction_direction\",\"confidence_level\",\"evaluation_window\",\"min_sample_size\",\"variants\"]},{\"name\":\"wire_audience_seed\",\"description\":\"Apex — Wire up the events and traits a campaign audience seed depends on. Use this when the merchant says \\\"wire up the active customers audience\\\" or after the AudienceActivationWizard's Screen 1 hands off to Cursor. Returns the per-event/trait code snippets, the file recommendations, and fires a test event with is_test=1 so the wizard's polling loop confirms the wiring landed end-to-end. Idempotent: calling twice does NOT double-instrument; the agent should still review existing code before adding the snippet.\",\"params\":[\"seed_id\",\"framework\",\"fire_test_event\"]},{\"name\":\"wire_audience\",\"description\":\"Apex — Wire up the events and traits ANY audience depends on, not just starter audiences. Use this for bespoke / merchant-built audiences (e.g. 'New sign-ups in the last 14 days', 'Stalled sign-ups: no connector in 12h'). Walks the audience's predicate server-side, classifies each referenced event (auto-fired by the Apex snippet vs documented in Apex's event taxonomy vs custom merchant event), returns per-event recommendations, and optionally fires test events (is_test=1) for non-auto-fired events so the wizard's polling loop confirms wiring landed.\",\"params\":[\"audience_id\",\"framework\",\"fire_test_event\"]},{\"name\":\"audit_audience_readiness\",\"description\":\"Apex — Check whether an audience is wired up and matching users. Use this to verify your wire_audience_seed work succeeded, or to diagnose why a campaign is showing zero matches. Returns the audience predicate, current matching count, recency buckets, and which referenced events have arrived from the workspace.\",\"params\":[\"audience_id\"]},{\"name\":\"create_journey\",\"description\":\"Apex — Create a blank draft journey (an unconfigured event trigger wired to an exit). Then set_journey_trigger and add_journey_step to build it, and publish_journey to launch. For e-commerce flows like cart recovery, prefer create_journey_from_template. audience_bucket defaults to production (live customers). Same email on TestFlight and the store is two people — do not create a staging copy of the journey.\",\"params\":[\"name\",\"audience_bucket\"]},{\"name\":\"create_journey_from_template\",\"description\":\"Apex — Instantiate a starter journey template (e.g. Abandoned Cart Recovery) into a fresh draft. Get the templateId from get_wiring_status (Ready-to-run templates list their id). After instantiating, review the steps, then publish_journey.\",\"params\":[\"template_id\"]},{\"name\":\"list_trigger_contracts\",\"description\":\"Apex — List the workspace's trigger contracts (the event bindings you pass to set_journey_trigger / add_journey_exit). Returns each contract's id + the event it fires on. Call this before set_journey_trigger so you use a real id instead of guessing.\",\"params\":[]},{\"name\":\"set_journey_trigger\",\"description\":\"Apex — Set the entry trigger (the event that enrolls subjects) on a draft journey's trigger step. Pass event_name (the Apex Spec event, e.g. user_signed_up). A trig-* contract id is storage-only — prefer the Spec name.\",\"params\":[\"journey_id\",\"event_name\",\"trigger_contract_id\"]},{\"name\":\"add_journey_step\",\"description\":\"Apex — Append a Wait or Send to a draft Adaptive Journey. Prefer compose_adoption_milestone for a Milestone (one Wait until they finish, letters already on the arms). Wait mode duration (ISO, e.g. P1D) or until_event (trigger_contract_id + deadline_iso). Send arm event|deadline puts the letter on that Wait arm. Do not add_journey_step send on a compose-built path — use set_journey_send to point the existing Send.\",\"params\":[\"journey_id\",\"kind\",\"mode\",\"duration_iso\",\"trigger_contract_id\",\"deadline_iso\",\"comm_id\",\"comm_version\",\"channels\",\"arm\"]},{\"name\":\"set_journey_send\",\"description\":\"Apex — Point a draft journey's send step at a communication. Use after create_communication + edit_communication so the letter on the journey is yours, not the shared starter template. If the journey has one send, that send is updated. If it has several, pass step_id.\",\"params\":[\"journey_id\",\"comm_id\",\"step_id\",\"comm_version\"]},{\"name\":\"add_journey_branch\",\"description\":\"Apex — Insert a CONDITIONAL content branch: evaluate one condition and send a different communication to each side, then both continue where the flow went before. Goes after the step that leads into the exit unless after_step_id says otherwise. Use this for true content branching (e.g. \\\"cart value > $100 → VIP email, else standard email\\\", or \\\"clicked the welcome letter → next-step letter, else a reminder\\\"). For the simpler \\\"skip the next send if they already converted\\\" case, use add_journey_exit instead. The condition is an attribute test (field_path + operator + value), an event test (event_fired / event_not_fired within a window), or how they responded to the letter the journey just sent (letter_opened / letter_clicked): the journey waits up to wait_days for the open or click, then takes the other side. A letter branch has to come right after that send. Prefer letter_clicked; opens are inflated by mail apps that preload images.\",\"params\":[\"journey_id\",\"after_step_id\",\"condition\",\"when_true_comm_id\",\"when_false_comm_id\",\"channels\"]},{\"name\":\"publish_journey\",\"description\":\"Apex — Publish a draft journey so it runs on live trigger events. SAFETY: defaults to a dry-run (validation only) — pass confirmLive:true to actually publish to real customers. Email sends require a verified sender domain or publish is blocked. If this path is already live or a test is measuring it, stop and ask. Do not pass confirmTreatmentChange unless they picked an out.\",\"params\":[\"journey_id\",\"confirm_live\",\"confirm_treatment_change\"]},{\"name\":\"archive_journey\",\"description\":\"Apex — Archive a journey so it stops starting for new people. Same as Archive on the Journeys page: history and records are kept, people already partway through finish, and restore brings it back. A draft that was never published has nothing to keep, so it cannot be archived; pass deleteDraft:true to delete it instead (same as Delete on the Journeys page). If the journey is live or a test is measuring it, stop and ask. Do not pass confirmLiveJourney unless they picked an out.\",\"params\":[\"journey_id\",\"delete_draft\",\"confirm_live_journey\"]},{\"name\":\"archive_communication\",\"description\":\"Apex — Archive a letter (communication template). Same as Archive on the Communications page: it leaves the picker and lists, history and sends are kept, and it can be restored. If a published journey still sends it, Apex refuses and names those journeys, because their Send steps would fail; archive or repoint the journeys first, or pass confirmJourneyRefs:true when they said to archive anyway. If a test is measuring the letter, stop and ask. Do not pass confirmLiveExperiment unless they picked an out.\",\"params\":[\"communication_id\",\"confirm_journey_refs\",\"confirm_live_experiment\"]},{\"name\":\"create_communication\",\"description\":\"Apex — Create a blank custom communication (draft, no send path) you can reference from a journey send step. Distinct from generate_communications, which generates pre-written messages from catalog templates; use this when you need a net-new message (e.g. a cart-recovery email not in the catalog). audience_bucket defaults to production.\",\"params\":[\"title\",\"channels\",\"audience_bucket\"]},{\"name\":\"list_journeys\",\"description\":\"Apex — List every adaptive journey in the active workspace. Returns id, name, status (draft/published/paused/archived), and journey type (lifecycle/campaign). Foundation for exit-rule audit loops + journey CRUD agent flows.\",\"params\":[]},{\"name\":\"get_journey\",\"description\":\"Apex — Read the full configuration for a single journey, including steps, goal event, attribution window, and exit rules. Use after list_journeys to inspect a journey's wiring before recommending edits.\",\"params\":[\"journey_id\"]},{\"name\":\"list_journey_exits\",\"description\":\"Apex — Just the exit-rules block of one journey. Cheaper than get_journey for audit loops that only need to know \\\"does this journey suppress purchase / unsubscribe?\\\".\",\"params\":[\"journey_id\"]},{\"name\":\"add_journey_exit\",\"description\":\"Apex — Append a new exit rule to a journey's draft. Rule fires when the chosen trigger contract's event lands on a contact with an in-flight execution — Apex stops the execution and skips any pending sends. Re-publish required for the rule to take effect on live runs.\",\"params\":[\"journey_id\",\"trigger_contract_id\",\"label\",\"enabled\"]},{\"name\":\"remove_journey_exit\",\"description\":\"Apex — Remove an exit rule from a journey's draft. Re-publish required for the change to apply to live runs.\",\"params\":[\"journey_id\",\"rule_id\"]},{\"name\":\"get_contact_cart\",\"description\":\"Apex — Read the rolled-up cart state for a contact (Phase 2 of Journey Exit Semantics). Returns lines, itemCount, valueCents, and last-updated timestamp. Useful for \\\"is this lead worth a follow-up?\\\" agent loops.\",\"params\":[\"contact_id\"]},{\"name\":\"audit_journey_exits\",\"description\":\"Apex — Audit every published journey in the workspace for exit-rule hygiene. Flags marketing/lifecycle journeys (goalEventName=in_app_purchase) that don't have a purchase exit rule — the most common misconfiguration that produces \\\"received the recovery push AFTER converting\\\" complaints.\",\"params\":[]},{\"name\":\"list_segments\",\"description\":\"Apex — List the workspace's segments (saved groups of customers over your own events + traits).\",\"params\":[\"scope\"]},{\"name\":\"get_segment\",\"description\":\"Apex — Fetch one segment by id.\",\"params\":[\"segment_id\",\"scope\"]},{\"name\":\"create_segment\",\"description\":\"Apex — Create a segment from friendly \\\"conditions\\\" (compiled server-side) OR a raw predicate. Conditions grammar: match all|any of groups; each group match all|any of conditions; each condition is an event ({verb:\\\"has\\\"|\\\"hasnt\\\", event, window_days?}) or a trait ({attribute, op:\\\"is\\\"|\\\"is_not\\\"|\\\"exists\\\", value?}). This is the same grammar the dashboard chip builder speaks.\",\"params\":[\"name\",\"description\",\"scope\",\"conditions\",\"predicate\"]},{\"name\":\"list_adoption_milestones\",\"description\":\"Apex — List the workspace's adoption milestones (per-feature \\\"has this user adopted X?\\\" definitions). A milestone is NOT a goal. Each row now includes enrollMode (all vs future) and gapPolicy.hours when the wait is sub-day.\",\"params\":[]},{\"name\":\"get_adoption_milestone\",\"description\":\"Apex — Fetch one adoption milestone by id.\",\"params\":[\"milestone_id\"]},{\"name\":\"create_adoption_milestone\",\"description\":\"Apex — Create an adoption milestone. \\\"Adopted\\\" is one event or one trait. Omit adopted_when_kind to create the milestone before its finishing moment is chosen, then set it later with update_adoption_milestone; a milestone with no moment counts nobody, mails nobody, and cannot be turned on. Default enroll_mode is \\\"future\\\" (only people who sign up after this is created). Use enroll_mode=\\\"all\\\" to include everyone already here. gap_hours wins over gap_days. Starts OFF unless active=true.\",\"params\":[\"name\",\"feature_key\",\"action_label\",\"adopted_when_kind\",\"event_name\",\"trait_path\",\"trait_value\",\"trait_op\",\"priority\",\"order\",\"gap_days\",\"gap_hours\",\"gap_kind\",\"since_event_name\",\"enroll_mode\",\"finish_when\",\"active\"]},{\"name\":\"update_adoption_milestone\",\"description\":\"Apex — Update an adoption milestone (finishing moment, name, priority, active, gap days/hours, enroll mode, who finishing counts, nudge journey). Pass adopted_when_kind plus event_name or trait_path to set the finishing moment on a milestone created without one. active=true is REFUSED while there is no moment, because nobody could ever finish it and everyone would stay late forever. Changing the moment resets the lift window. If the Milestone is ON, changing what \\\"finished\\\" means stops and asks — do not pass confirmLiveMilestone unless they picked an out. A Milestone keeps BOTH letters on its one Adaptive Journey: the Celebration is a Send on the finish arm, not a second journey. finish_when=anyone_here on a live event Milestone backfills leftover Nudges for Accounts that already have a doer.\",\"params\":[\"milestone_id\",\"name\",\"action_label\",\"adopted_when_kind\",\"event_name\",\"trait_path\",\"trait_value\",\"trait_op\",\"priority\",\"order\",\"active\",\"gap_days\",\"gap_hours\",\"gap_kind\",\"since_event_name\",\"enroll_mode\",\"finish_when\",\"nudge_journey_id\",\"nudge_clocks\",\"confirm_live_milestone\"]},{\"name\":\"delete_adoption_milestone\",\"description\":\"Apex — Delete an adoption milestone. If it is on, stop and ask. Do not pass confirmLiveMilestone unless they picked an out.\",\"params\":[\"milestone_id\",\"confirm_live_milestone\"]},{\"name\":\"compose_adoption_milestone\",\"description\":\"Apex — Create a Milestone and stamp ONE Adaptive Journey (Trigger → Wait until they finish → Celebration and/or Nudge). scaffold=\\\"both\\\" (default) includes both letters; \\\"nudge\\\" / \\\"celebration\\\" one letter; \\\"none\\\" is just-track. Unique Communication per Send — never reuse the shared catalog letters. New milestones default to enroll_mode=\\\"future\\\". Journeys are drafts — preview, then publish_journey. A Milestone is NOT a Target.\",\"params\":[\"name\",\"feature_key\",\"action_label\",\"adopted_when_kind\",\"event_name\",\"trait_path\",\"trait_value\",\"trait_op\",\"priority\",\"order\",\"gap_days\",\"gap_hours\",\"nudge_clocks\",\"gap_kind\",\"since_event_name\",\"enroll_mode\",\"finish_when\",\"active\",\"scaffold\",\"journey_name\",\"save_not_yet_segment\",\"save_done_segment\"]},{\"name\":\"attach_adoption_milestone_still\",\"description\":\"Apex — Attach a still of the empty screen (not_yet) or the finished screen (done) to a Milestone. Same two pictures the owner uploads. Pass imageBase64 or a public url. For a signed-in product page, capture on their machine with `npx @apex-inc/mcp-server screenshot --milestone … --state not_yet|done --url … --storage-state <login file>` — do not use hosted recapture. A Milestone is NOT a Target.\",\"params\":[\"milestone_id\",\"state\",\"image_base64\",\"url\",\"viewport\",\"format\",\"label\"]},{\"name\":\"recapture_adoption_milestone_stills\",\"description\":\"Apex — Capture the Not yet and Done stills from public pages on a named workspace host. Not localhost. A login wall fails honestly and writes nothing. For a signed-in product page, sit it on their machine: `npx @apex-inc/mcp-server screenshot --milestone … --storage-state <login file>`. Same two pictures the owner uploads.\",\"params\":[\"milestone_id\",\"not_yet_url\",\"done_url\"]},{\"name\":\"list_adoption_milestone_stills\",\"description\":\"Apex — List the Not yet and Done stills attached to a Milestone. Empty means they have not attached one yet.\",\"params\":[\"milestone_id\"]},{\"name\":\"reorder_adoption_milestones\",\"description\":\"Apex — Set the sequence order of adoption milestones in one call. Pass the milestone ids in the desired order; each gets order = its index. Ordering the full set unlocks the \\\"Path\\\" funnel in the account view (a step-by-step drop-off chart that is only honest over an explicitly-ordered set).\",\"params\":[\"ordered_ids\"]},{\"name\":\"get_adoption_metrics\",\"description\":\"Apex — Aggregated adoption metrics: per-milestone funnel + lift-vs-holdout, plus workspace health. Counts only (no user PII).\",\"params\":[]},{\"name\":\"get_adoption_account_progress\",\"description\":\"Apex — One Account's Path: which Milestones this company has finished, who did them, and how many people are Not yet / Started / Done. account_id is the company id from identify({ account: { id } }). Never includes holdout.\",\"params\":[\"account_id\"]},{\"name\":\"get_adoption_user_progress\",\"description\":\"Apex — One person's Path (Not yet / Started / Done) across every active Milestone. Includes finish_when and inherited when Anyone here finished for their company. Never email, name, or holdout. end_user_id must be a valid user id, not an email.\",\"params\":[\"end_user_id\"]},{\"name\":\"list_adoption_features\",\"description\":\"Apex — List the workspace's tenant-owned feature groupings (how adoption milestones group your own events).\",\"params\":[]},{\"name\":\"create_adoption_feature\",\"description\":\"Apex — Create or upsert (by key) a tenant-owned feature grouping. Group your own events under a named feature the milestone builder can target.\",\"params\":[\"label\",\"key\",\"event_names\"]},{\"name\":\"list_partner_programs\",\"description\":\"List every affiliate program this merchant owns. Returns each program's name, status (active/paused/archived), visibility (public/private), approval mode, commission structure, reputation counters, and created/updated timestamps.\",\"params\":[]},{\"name\":\"create_partner_program\",\"description\":\"Create a new affiliate program. Partners can join via marketplace (public+auto), by invite only (private), or via application (public+manual). Commission can be a flat CPA amount or a percentage of sale (RevShare).\",\"params\":[\"name\",\"description\",\"vertical\",\"commission_structure\",\"visibility\",\"approval_mode\"]},{\"name\":\"update_partner_program\",\"description\":\"Update an existing program (pause/resume, change visibility, edit default commission). Changing default commission does NOT apply to existing members — use apply_program_default_to_members for that.\",\"params\":[\"program_id\",\"updates\"]},{\"name\":\"list_partner_program_members\",\"description\":\"List every partner bound to a specific program. Shows each member's handle, current commission (with source: program_default | membership_override | invite_override), totalEarnedUsd, approvedConversions count.\",\"params\":[\"program_id\"]},{\"name\":\"apply_program_default_to_members\",\"description\":\"Apply the program's current default commission to every existing member whose commission is a program_default source. Members with sticky overrides (membership_override / invite_override) are NOT touched. Fires partner_commission_changed emails to affected partners.\",\"params\":[\"program_id\"]},{\"name\":\"update_membership_rate\",\"description\":\"Override a single partner's commission rate on this merchant's program. Sticky — survives future program default updates. Opens the per-membership commission history with `source: membership_override` for audit.\",\"params\":[\"profile_id\",\"commission_structure\",\"reason\"]},{\"name\":\"reset_membership_rate\",\"description\":\"Reset a partner's commission back to the program default, removing any prior override. Useful when a negotiated rate expires or a promo ends.\",\"params\":[\"profile_id\",\"reason\"]},{\"name\":\"invite_partner\",\"description\":\"Send a magic-link invite to a partner for a specific program. Resolves existing profiles by email (no duplicate profile created) or creates a pending invite the partner redeems on first sign-in. Optional customRate overrides the program default for this partner's membership.\",\"params\":[\"email\",\"program_id\",\"inviter_name\",\"inviter_message\",\"custom_rate\"]},{\"name\":\"list_pending_payouts\",\"description\":\"The merchant's payout queue. `awaitingApproval.items` are partner sales still pending: nothing pays them until they are approved, and their ids are what approve_payouts and reject_payouts take. `heldForReview` counts sales held while Apex reviews them (not approvable here). `buckets` are approved-but-unpaid commissions by age (0-30 / 30-60 / 60+ days), each with `payoutState`, plus totals, the effective autoPayoutPolicy and the merchant cap. `payoutSchedule` is weekly (Fridays) or monthly (the 1st). `programPolicies` lists programs whose own payout rule replaces the workspace's for their sales.\",\"params\":[]},{\"name\":\"approve_payouts\",\"description\":\"Approve one or more pending partner sales. Each approved conversion: transitions to 'approved', writes a HoldbackEntry splitting commission into available + held portions per tier policy (25% held for NEW, 15% TRUSTED, 5% VERIFIED), stamps approvedAt. Transfer fires later via the scheduled payout orchestrator (run-payouts cron). Sales already approved come back in `skipped` as already_approved; sales Apex is holding for review come back as held_for_review (Apex's review releases them to pending).\",\"params\":[\"conversion_ids\"]},{\"name\":\"reject_payouts\",\"description\":\"Reject pending payouts (e.g. suspicious patterns that don't warrant a FraudCase). Flips conversions to 'reversed'. Also opens a low-severity audit FraudCase per rejection so patterns surface if the same partner's payouts get rejected repeatedly.\",\"params\":[\"conversion_ids\",\"reason\"]},{\"name\":\"get_effective_fees\",\"description\":\"Show the merchant's current fee schedule for every fee kind (facilitation_payout, identity_verification, instant_payout). Returns bps + flatUsd + source (platform_default | merchant_override | hardcoded_fallback) + isCustom flag. Useful for building pricing disclosure UIs or answering 'what am I charged?'.\",\"params\":[]},{\"name\":\"vouch_for_partner\",\"description\":\"Vouch for a partner — bumps their trust tier by one level (NEW→TRUSTED or TRUSTED→VERIFIED) for 60 days. REQUIRES indemnityAcknowledged=true: if the partner commits fraud during the vouched window, your merchant account is liable for any clawback the reserve can't cover. Fails if the partner is already VERIFIED.\",\"params\":[\"profile_id\",\"indemnity_acknowledged\",\"reason\",\"vouch_days\"]},{\"name\":\"list_events\",\"description\":\"Apex — List the workspace's ACTIVE events: the canonical event names actually firing, with total volume and the platforms they arrive on, from the ingest catalog. Use this to discover which events exist / are wired before choosing a primary metric or guardrail in create_experiment, or to confirm an event is live. Distinct from list_metrics (which lists typed rate/revenue/duration GOALS) — this is the raw observed-event catalog.\",\"params\":[\"limit\"]},{\"name\":\"list_metrics\",\"description\":\"Apex — List the canonical metric/goal catalog for this workspace: typed metrics (rate/revenue/duration) with whether each is DETECTED (firing, with volume) and its outcome tier. Use this to pick a measurable OUTCOME goal (purchase/signup) over a proxy (email_open) before create_experiment, or role:'guardrail' to see protective harm signals.\",\"params\":[\"only_measurable\",\"role\"]},{\"name\":\"get_growth_reality\",\"description\":\"Apex — \\\"Is our growth real?\\\" Per goal, the cumulative lift of everything Apex did (journeys + experiments) vs a persistent do-nothing global holdout, with a 95% CI. The honest, holdout-gated answer to \\\"would this have happened anyway?\\\" Forward-only; goals still collecting are flagged, not faked.\",\"params\":[\"days\"]},{\"name\":\"get_source_performance\",\"description\":\"Apex — \\\"What did this link, campaign or ad bring me?\\\" The Source performance report for one Apex Link (scope link, ref = slug or handle/slug), one campaign (scope campaign, ref = utm_campaign), one platform (scope source, ref = linkedin, meta, apex_link…), or the whole workspace (scope all). Clicks, visitors, people, conversions and revenue, with each broken down by platform, ad, link, device, country and referring site. Ads come from the exact ad on the click (apex_ad) or the link a single ad lands on. A figure the breakdown can't know is omitted, never zero. Set include_people to list who they are.\",\"params\":[\"scope\",\"ref\",\"start\",\"end\",\"compare\",\"conversion_ids\",\"include_people\"]},{\"name\":\"get_channel_economics\",\"description\":\"Apex — \\\"Where should my next dollar go?\\\" Per acquisition channel (raw first-touch): LTGP:CAC (lifetime gross profit over CAC) where the merchant reports product cost, LTV:CAC (lifetime revenue over CAC) everywhere else, plus payback months, CAC, and customers, split into Acquisition (paid) vs Leverage (owned/organic, no spend). Computed from real contacts + spend + revenue — metrics with missing inputs are shown as \\\"—\\\", never fabricated. Free intelligence; the verdict is never gated.\",\"params\":[\"days\"]},{\"name\":\"get_saas_recurring_revenue\",\"description\":\"Apex — SaaS recurring-revenue economics: MRR, ARR, the monthly waterfall (new / expansion / reactivation / contraction / churn — accounting-identity tested), and NRR/GRR for the last complete month. Computed from materialized monthly snapshots (calendar months, UTC); the current month is flagged in-progress. NRR/GRR read \\\"collecting history\\\" until 13 months of snapshots exist — never fabricated.\",\"params\":[\"months\",\"start\",\"end\"]},{\"name\":\"get_saas_expansion\",\"description\":\"Apex — SaaS expansion economics: expansion vs contraction MRR for the last complete month, accounts expanding (counts — small-n honest), and seat growth from seat_count. Metrics with missing inputs come back null, never fabricated.\",\"params\":[\"months\",\"start\",\"end\"]},{\"name\":\"get_ecommerce_product_sales\",\"description\":\"Apex — E-commerce product sales: top products by revenue with the per-product view → add-to-cart → purchase funnel and refund counts. Products need a product_id on commerce events; never-wired signals are reported as unwired, not zero.\",\"params\":[\"days\",\"start\",\"end\"]},{\"name\":\"list_product_costs\",\"description\":\"Apex — What each product costs, and which ones Apex has no cost for. Lists every SKU with a declared cost PLUS every SKU the merchant's orders have sold in the last 30 days, so an uncosted product is visible rather than merely absent. Apex reports gross profit and LTGP:CAC only where cost is known, so the uncosted rows are the gap worth closing. Two columns matter: \\\"orders\\\" is the per-unit cost the merchant's own purchase events reported (preferred — it tracks their real costs over time), \\\"declared\\\" is a standing cost set in Apex that fills orders reporting none. Use this before set_product_cost so you never overwrite a cost that is already right.\",\"params\":[\"uncosted_only\",\"limit\"]},{\"name\":\"set_product_cost\",\"description\":\"Apex — Declare what one product costs per unit, so Apex can report gross profit on orders that didn't carry a cost of their own. PREFER instrumenting unit_cost on purchase line items instead where you can: an order carries the cost that was true when it happened, whereas a standing cost declared here is a snapshot that goes stale silently. Use this to backfill history, or for a SKU whose checkout can't report cost. NEVER invent or estimate a cost — a fabricated margin looks measured and is not, and the merchant has no way to tell downstream. Ask them for the number. Rules: the cost is PER UNIT (not a line total), it never overrides a cost an order reported for itself, and it never applies backward before effective_from.\",\"params\":[\"item_key\",\"cost_usd\",\"effective_from\",\"name\"]},{\"name\":\"upload_product_catalog\",\"description\":\"Apex — Tell Apex what the merchant sells, in bulk, BEFORE the first sale. Every other way a product reaches Apex needs a sale to have happened already, so a merchant setting up pre-launch has a catalog Apex knows nothing about. Use this when you can read their catalog from somewhere — a products table, a Shopify/Stripe export, a CSV they hand you. NEVER invent, estimate, or derive a cost from a price: a fabricated margin looks measured and nobody downstream can tell. Ask them, or send only the fields you actually know. cost_usd is applied to orders that report no cost of their own, from effective_from forward. price_usd is reference only — revenue, LTV and gross profit always come from what orders actually report, so a price here can never distort them; it makes the catalog complete before launch and lets Apex flag it when real orders disagree with it. Re-running with the same data is safe. Max 500 products per call — page through a larger catalog. This does not replace instrumenting unit_cost on purchase line items, which stays the durable fix because an order then carries the cost that was true when it happened; a catalog cost is a snapshot that goes stale silently.\",\"params\":[\"products\"]},{\"name\":\"get_ecommerce_returns\",\"description\":\"Apex — E-commerce returns & refunds: refund rate (money back, order basis), return rate (goods back — separate metric, never summed), reason breakdown, refund cycle time, AOV, and repeat purchase. Refund data lands automatically from Stripe; return_requested / return_completed events power the goods-back story.\",\"params\":[\"days\",\"start\",\"end\"]},{\"name\":\"get_marketplace_metrics\",\"description\":\"Apex — Marketplace health across six pillars: liquidity (search→transaction, match rate, zero-result searches, unfulfilled demand), supply & demand balance, economics (GMV vs the take — fee_amount is the platform's revenue, GMV never inflates LTV), buyer retention, trust rates, and concentration risk. Sliceable by category / geo / price_band (low-volume slices are suppressed for privacy). Metrics whose events aren't wired come back as unwired hints, never fabricated zeros.\",\"params\":[\"days\",\"start\",\"end\",\"category\",\"geo\",\"price_band\"]},{\"name\":\"track_event\",\"description\":\"Apex — Track an event through the Apex Spec.\\n\\nIdentical to the SDK's track() and the snippet's apex.track(). Use this to instrument events from agent workflows, CI pipelines, or IDE actions.\\n\\nThe public Spec is one registry (`APEX_EVENTS`): `page_view`, `product_view`, `add_to_cart`, `checkout_started`, `order_placed`, `in_app_purchase`, `user_signed_up`, `waitlist_joined`, `user_invited`, `user_invite_accepted`, `user_identified`, `app_open`, `session_start`, `form_submit`, `feature_used`, `ui_action`. Field names are flat snake_case. Named in-product controls are `ui_action` with `action` + `name` + optional `location`. SDK helper: `trackUiAction({ action, name, location })`.\\n\\nCustom event names are accepted, but prefer canonical names from GET /api/spec/events so templates, journeys, and conversions wire without aliases. Full spec: https://docs.apex.inc/spec.\\n\\nEvents fired through this tool carry a stable synthetic visitorId (mcp-agent-*, fixed for this MCP process) and a timestamp, so they WILL count toward wiring detection. They are flagged as agent-fired (source: \\\"mcp\\\") — not test-mode. Fire them deliberately.\",\"params\":[\"event\",\"properties\"]},{\"name\":\"send_server_event\",\"description\":\"Apex — Server Events API. Send a server-to-server event via the /api/v1/events endpoint (clientType: \\\"server\\\", batch cap 100, idempotency-key supported). Use this from agent workflows that simulate backend integrations (Stripe webhook flows, CRM-driven conversions, billing events) or to test the Server Events API end-to-end. Differs from track_event in that it stamps clientType: \\\"server\\\" and uses the v1 ingest contract.\",\"params\":[\"type\",\"visitor_id\",\"email\",\"data\",\"environment\",\"consent\",\"country\",\"release_channel\",\"idempotency_key\"]},{\"name\":\"identify_user\",\"description\":\"Apex — Identify a user by email for identity stitching. Works identically to the SDK's identify() and the snippet's apex.identify(). Links an anonymous visitor to a known email. Pass avatarUrl (a canonical attribute) to give the Contact a profile photo that renders across Apex — the people list, detail page, and Live widget. The workspace's own word for a person (Customer / Lead / Client / User, from its vertical) is what its dashboard shows; use that word when reporting back.\",\"params\":[\"email\",\"name\",\"company\",\"avatar_url\",\"metadata\"]},{\"name\":\"get_schema\",\"description\":\"Apex — Read the workspace's canonical Schema (data dictionary): entities, their fields, which fields are wired (observed in live data) vs not, surface coverage, and any canonical mappings. Use to see what variables/attributes a workspace has and what's still unwired before authoring comms or segments.\",\"params\":[]},{\"name\":\"map_attribute\",\"description\":\"Apex — Map a discovered field onto its canonical Apex Spec name (e.g. firstName -> first_name) so templates resolve it cleanly at send time. Pass canonicalName: null to clear an existing mapping.\",\"params\":[\"entity_key\",\"field_name\",\"canonical_name\"]},{\"name\":\"define_event\",\"description\":\"Apex — Define a governed custom event in the workspace's Schema (the customer-extensible registry). Promotes one of the merchant's own events to a first-class, typed, versioned definition that behaves like a canonical Apex Spec event (selectable as a journey trigger/goal, resolvable as comm tokens, validated at ingest). Names must be snake_case and CANNOT shadow a canonical Apex Spec event — call get_event_spec first and reuse the canonical event when one fits. Propose the schema from the merchant's observed payloads (get_schema) and codebase, then confirm with them before defining.\",\"params\":[\"name\",\"description\",\"fields\",\"scope\",\"primary_metric\",\"recommended_transport\"]},{\"name\":\"log_prediction\",\"description\":\"Apex — Log a prediction about a metric change. Feeds the calibration loop. Before calling, present the metric, expected change, and confidence as options the user can pick from or adjust.\",\"params\":[\"metric\",\"expected_change\",\"confidence\",\"time_horizon\",\"hypothesis_id\",\"belief_id\"]},{\"name\":\"list_data_sources\",\"description\":\"Apex — List the workspace's Data Sources (the producers that send events: Website, iOS/Android apps, Backend). Shows each source's live status (live / listening / stalled / not-started). Call when the user asks \\\"where is my data coming from?\\\", \\\"which sources are live?\\\", or to audit collection coverage.\",\"params\":[\"include_archived\"]},{\"name\":\"create_data_source\",\"description\":\"Apex — Register a new Data Source in the active workspace. Most sources auto-register on their first event; use this to set one up BEFORE events arrive (e.g. a Backend API source). Reporting-only — registering a source never changes access control.\",\"params\":[\"kind\",\"name\"]},{\"name\":\"get_data_source_health\",\"description\":\"Apex — Get the live status of one Data Source (live / listening / stalled / not-started) plus its first/last seen timestamps. Use to diagnose \\\"why isn't my backend / app showing data?\\\"\",\"params\":[\"id\"]},{\"name\":\"get_analytics_sources\",\"description\":\"Apex — Unified analytics breakdown by Data Source, platform, and hostname over a date range. Use for \\\"how much traffic from each source?\\\", \\\"web vs mobile split\\\", or \\\"which hostnames are busiest?\\\".\",\"params\":[\"days\"]},{\"name\":\"get_analytics_hostnames\",\"description\":\"Apex — The hostname catalog for this workspace (every host the web snippet has reported, ranked by volume). Use to populate a hostname filter or audit which subdomains are sending events.\",\"params\":[\"limit\"]},{\"name\":\"get_event_spec\",\"description\":\"Apex — The canonical event reference for instrumenting Apex tracking: every event name, its fields (with required/optional markers), and example payloads, as a JSON Schema bundle. Call this BEFORE wiring apex.track()/Apex.track() calls or Server Events API posts into a codebase so you use canonical names and field shapes. Pair with get_wiring_status to verify your instrumentation afterwards.\",\"params\":[\"event\"]},{\"name\":\"get_wiring_status\",\"description\":\"Apex — Live wiring verification for the active workspace: which canonical events have been received (tier: waiting → detected → verified), which identify traits (first_name, email, …) are arriving, per-data-source status, and which journey/communication templates are Ready to run. Call this AFTER instrumenting tracking code to verify your own work — iterate until each wired event reports \\\"detected\\\". Presence-only: never returns end-user values.\",\"params\":[]},{\"name\":\"propose_wiring_plan\",\"description\":\"Apex — Report the Apex Spec instrumentation opportunities you found by SCANNING the merchant's codebase (auth flows → identify + user_signed_up, checkout → purchase events, forms → form_submit, app purchases → in_app_purchase, server order paths → order_placed, …). Call this BEFORE wiring: the plan appears on the merchant's setup page as pending lights, each flipping green when its first real event arrives. Structure your scan report in three sections: (1) ALREADY WIRED — events the repo already instruments (include them here with wired: true; they're awaiting their first heartbeat), (2) GAPS TO WIRE — the work you propose, (3) WON'T WIRE + WHY — opportunities you're deliberately skipping (e.g. a server event with no backend, or a form that already fires a richer dedicated event). Then instrument each gap where the truth lives and verify with get_wiring_status. Scan first; never ask the merchant to enumerate events for you.\",\"params\":[\"events\",\"summary\"]},{\"name\":\"apex_test_event\",\"description\":\"Apex — Send a test event through the public ingestion endpoint and confirm it was accepted. The fastest way to verify event tracking works after installing the SDK. The event is marked as a test, so it shows tagged \\\"test\\\" in apex_recent_events and on the Debug Events page. A test signup with an email never creates a person; apex_recent_events says whether the real one would link to a person, and why not.\",\"params\":[\"event_name\",\"attributes\",\"visitor_id\"]},{\"name\":\"apex_recent_events\",\"description\":\"Apex — List recent events for the workspace, newest first, real and test together. Each line shows the event name, a [test] tag for test-mode events, platform, the environment Apex filed it under (Production, Beta, Dev, Unclassified) with release channel and client, visitor, and event id. Use to debug SDK wiring without opening the dashboard, e.g. \\\"did my dev build land in Dev?\\\".\",\"params\":[\"type\",\"since_minutes\",\"source\",\"environment\"]},{\"name\":\"apex_health\",\"description\":\"Apex — One-shot health check: which version of the Apex tools is running, and every connected integration (last sync, status). Use before adding a feature that depends on a connector, or when the owner asks which Apex version they are on.\",\"params\":[]},{\"name\":\"apex_spec_validate\",\"description\":\"Apex — Fetch the canonical Apex Spec event taxonomy so you can validate the track()/identify()/useApexVariant() calls in the user's files against it (ESLint-like for Apex usage). Read the user's files, find the calls, and flag event names + attributes that don't match the returned spec.\",\"params\":[]},{\"name\":\"list_conversions\",\"description\":\"Apex — List the workspace's Conversions (owned-event definitions of valued actions, e.g. \\\"Purchase\\\", \\\"Signup\\\"). Call this when the user asks what conversions are defined. The starred primary is a label for that Conversion — it does not pick the funnel stages and it is not the experiment default. Experiments name their own metric; the funnel follows the workspace conversion model.\",\"params\":[]},{\"name\":\"create_conversion\",\"description\":\"Apex — Define a new Conversion (an owned-event definition of a valued action). Most conversions are a custom_event with an eventName (e.g. \\\"order_placed\\\", \\\"user_signed_up\\\") matching an Apex Spec event you send via track. isPrimary stars this Conversion as a label — it does not pick experiment defaults or drive the funnel.\",\"params\":[\"name\",\"type\",\"event_name\",\"selector\",\"target_url\",\"is_primary\"]},{\"name\":\"set_primary_conversion\",\"description\":\"Apex — Mark a Conversion as the starred primary. That star labels the Conversion — it does not set experiment defaults or drive the funnel. Experiments name their own metric. Pass the conversion id from list_conversions.\",\"params\":[\"conversion_id\"]},{\"name\":\"create_target\",\"description\":\"Apex — Create a Target: an aggregate KPI number to hit by a date (MRR, pipeline, \\\"1,000 signups by Q3\\\"). Optionally bind it to a Conversion (sourceConversionId from list_conversions) to auto-count progress from that conversion's completions; otherwise it's a manual number you update yourself.\",\"params\":[\"metric\",\"target\",\"deadline\",\"source_conversion_id\"]},{\"name\":\"list_audiences\",\"description\":\"Apex — List the buyer lists Apex keeps on the workspace's ad platforms: which segment each is built from, which platforms it goes to, which platforms it actually reached, and how many people it holds back. Same as Attribution → Ad platforms → Who sees your ads.\",\"params\":[]},{\"name\":\"update_audience\",\"description\":\"Apex — Change where a buyer list goes, or how many of its people Apex holds back from the ads. holdout_percent 0 stops holding anyone back. Dropping a platform the list already reached deletes the list on that platform, which cannot be undone, and any ad set using it loses it: ask the owner first and pass confirm_delete only after they said yes. Without it, Apex changes nothing and says which platforms would lose the list. Held-back lists that belong to an Ad holdout can't be changed here.\",\"params\":[\"audience_id\",\"platforms\",\"holdout_percent\",\"confirm_delete\"]},{\"name\":\"remove_audience\",\"description\":\"Apex — Take a buyer list off every ad platform it reached and stop sending it. Deleting it on a platform cannot be undone, and an ad set that used it stops using it. Ask the owner first; pass confirm only after they said yes. Reports any platform that refused, so the workspace can delete it there by hand.\",\"params\":[\"audience_id\",\"confirm\"]},{\"name\":\"list_audience_removals\",\"description\":\"Apex — People who asked to be deleted or opted out of ads but are still on one of the workspace's buyer lists, because the platform refused or couldn't be reached when Apex took them off. One row per list and platform: `owed` (still on it), `stopped_retrying` (Apex retries every day for 30 days, then stops and waits for the workspace), `why` (not_connected, platform_cant_remove_yet, or platform_refused) and `platform_said`. Empty means nobody is owed. Pass audience_id for one list, or nothing for every list. Same as the amber line on the list card.\",\"params\":[\"audience_id\"]},{\"name\":\"retry_audience_removals\",\"description\":\"Apex — Try again now to take the people who asked to be deleted or opted out off one buyer list, including the ones Apex stopped retrying after 30 days. Use it after the owner reconnects a platform or fixes what the platform refused (see list_audience_removals). Returns how many Apex tried, how many came off, and what is still owed. Admin-only.\",\"params\":[\"audience_id\"]},{\"name\":\"list_audience_goals\",\"description\":\"Apex — The four things a buyer list can be for, and whether this workspace can make each one now. win_back shows ads to people who bought but not within the workspace's kind-of-business window (`window_days`); stop_paying leaves everyone who ever bought out of ads meant for new people; interested shows ads to people who added to cart or started checkout in the last 30 days and never bought (`locked` until those events arrive); lookalike gives Meta everyone who bought with what each spent, for a value-based lookalike (Meta only). Each goal returns `networks` (where its list can go right now) and `lists` (lists the workspace already made for it). When a goal already has a list, ask whether the workspace wants another before adding one.\",\"params\":[]},{\"name\":\"add_audience\",\"description\":\"Apex — Make a buyer list from a goal (see list_audience_goals) and send it. Apex saves the goal's rule as a segment named after the list, which the owner can change in Segments, makes the list on it, and sends it to each platform; it updates every day after. Nobody is held back. Call list_audience_goals first, tell the owner who goes on the list and where it goes, and pass confirm: true only after they say yes. Refused when the goal is locked, or when none of the platforms can take the list. Admin-only.\",\"params\":[\"goal\",\"platforms\",\"name\",\"send_now\",\"confirm\"]},{\"name\":\"preview_ad_platform_send\",\"description\":\"Apex — Before sending one of the workspace's events to its ad platforms, see what each platform would hear. Pass the event as the workspace sends it and what it means. Returns each platform's state: sends (hears `word` right away), apex_makes (hears it once Apex makes the conversion there), no_word (the platform has nothing for this meaning, so it is not sent), not_connected, not_agreed (the workspace hasn't agreed to send sales there yet), other_source (the workspace set another tool to send that platform's conversions), unanswered (nobody has said whether another tool already sends there; ask the owner and record it with set_conversion_source_of_truth), held (the owner asked Apex not to send people to any ad platform), coming_soon, or turned_off. `without_consent_answer` says whether an event that carries no consent answer goes out (sent) or not (not_sent); when it's not_sent, tell the owner only events with a yes go. Also returns `estimate`: how often the event happened in the last 30 days, the sends a month that bills (one per event, however many platforms hear it), the workspace's free sends and use this month, and the monthly cost at its price (null when Apex couldn't count; only people Apex knows are sent, so the real number can be lower). Saves and sends nothing. Show the owner the result before anything starts sending.\",\"params\":[\"event_name\",\"meaning\"]},{\"name\":\"list_ad_platform_sends\",\"description\":\"Apex — The workspace's own events Apex sends to its ad platforms, with what each one means and what each platform hears (same states as preview_ad_platform_send). Sales, signups and leads Apex already knows about go out on their own and are not listed here.\",\"params\":[]},{\"name\":\"add_ad_platform_send\",\"description\":\"Apex — Start sending one of the workspace's events to its ad platforms. Call preview_ad_platform_send first and show the owner what each platform would hear, the 30-day count and the monthly cost; pass confirm: true only after the owner says yes. Saved on the workspace's Conversion for that event (created when there isn't one). Only platforms the workspace has connected and agreed to send to hear it; this tool never agrees for the workspace. For something_else, Apex makes the custom conversion on Meta so campaigns can optimize for it, and a rule on LinkedIn; for a lead, booking or any other kind Google has no conversion for yet, Apex makes one in Google Ads (reported only unless it is what the workspace's business is for). The result's `made` lists where it did and `couldnt_make` says why a platform refused (the send still goes). Refused when the event already means something else on Conversions, when Apex already sends it as a sale, or when no platform can hear it yet. Admin-only.\",\"params\":[\"event_name\",\"meaning\",\"send_value\",\"name\",\"confirm\"]},{\"name\":\"create_google_purchase_conversion\",\"description\":\"Apex — Create the Purchase conversion in the workspace's Google Ads account that the sales Apex sends count toward, and make it where Apex sends them. Google only takes Apex's sales into an \\\"Import from clicks\\\" conversion, so an account with none, or with only website-tag conversions, can't receive them until one exists. Same as Create it for me on the Google Ads page. It writes into the owner's Google Ads account: tell them first and pass confirm: true only after they say yes. `primary` is false when the account already counts purchases with its tag, so Google doesn't count each sale twice. `email_matching` false means only sales from a Google ad click count until the owner turns on enhanced conversions for leads in Google Ads (Goals, then Settings). `saved` false means the conversion was made but sending still needs the owner's sign-in or agreement on the Google Ads page. Admin-only.\",\"params\":[\"customer_id\",\"login_customer_id\",\"confirm\"]},{\"name\":\"remove_ad_platform_send\",\"description\":\"Apex — Stop sending one of the workspace's events to its ad platforms. The Conversion stays, so experiments and goals that count it are untouched, and what the platforms already heard stays with them. Pass the id from list_ad_platform_sends. Admin-only.\",\"params\":[\"send_id\"]},{\"name\":\"list_apex_campaigns\",\"description\":\"Apex — List the workspace's Apex Campaigns: each one launch's ad platform campaigns grouped so spend and results read side by side (Attribution → Campaigns). Each row lists its platform campaigns. Also lists the platform campaigns Apex has synced spend for in the last 90 days that are in no Apex Campaign yet, with the ids create_apex_campaign and add_apex_campaign_member take.\",\"params\":[]},{\"name\":\"create_apex_campaign\",\"description\":\"Apex — Create an Apex Campaign: one name for a launch whose ads run on several platforms, so spend, clicks and results show side by side under Attribution → Campaigns. Optionally link its platform campaigns now (platform + the campaign's id there); add more later with add_apex_campaign_member. Name it the same as the Apex Links' campaign so the launch reads as one thing. Workspace admin.\",\"params\":[\"name\",\"description\",\"start_date\",\"end_date\",\"members\"]},{\"name\":\"add_apex_campaign_member\",\"description\":\"Apex — Link platform campaigns to an existing Apex Campaign (from list_apex_campaigns), so their spend and results count toward it. Workspace admin.\",\"params\":[\"campaign_id\",\"members\"]},{\"name\":\"list_accounts\",\"description\":\"Apex — List B2B accounts (companies / clients) in the active workspace with rollup LTV, member count, and pipeline. Accounts aggregate every member's revenue into one company-level number. Default sort is by LTV.\",\"params\":[\"sort\",\"search\"]},{\"name\":\"get_account\",\"description\":\"Apex — Read one B2B account: rollup counters (account LTV, gross, refunds, purchases), member count, plan, seats, and traits. Account LTV is the sum of every member's directly-billed revenue with no double counting.\",\"params\":[\"account_id\"]},{\"name\":\"get_account_people\",\"description\":\"Apex — The member roster for an account: every Contact linked to it (primary members plus sub-account members), with each member's directly-billed revenue, score, and last-active. Per-person dollars are what that member was billed — account LTV is never split across seats.\",\"params\":[\"account_id\"]},{\"name\":\"list_sub_accounts\",\"description\":\"Apex — List the sub-accounts (workspaces / teams / projects) that belong to a B2B account (B2B-001). Sub-accounts are the intermediate org-unit layer between an account and its people; each carries a kind label and its own member count.\",\"params\":[\"account_id\"]},{\"name\":\"get_contact_groups\",\"description\":\"Apex — The account groups (workspaces / teams) a contact belongs to (B2B-001) — the answer to \\\"which workspaces is this user in?\\\". Returns each group with its kind and the contact's role in it.\",\"params\":[\"contact_id\"]},{\"name\":\"update_account_pipeline\",\"description\":\"Apex — Log an account-level pipeline (open-deal) value with a note (Sales-Led / Hybrid workspaces). The account number is canonical for reporting when both an account and a contact pipeline value exist.\",\"params\":[\"account_id\",\"pipeline_value\",\"note\"]},{\"name\":\"list_workspaces\",\"description\":\"List all workspaces available to your API key. Use this to see which workspaces you can work with.\",\"params\":[]},{\"name\":\"switch_workspace\",\"description\":\"Switch the active workspace for this session. All subsequent API calls will use this workspace. After switching, Apex verifies it can read the workspace and warns if authentication or the workspace key looks wrong.\",\"params\":[\"workspace_key\",\"project_key\"]},{\"name\":\"list_orgs\",\"description\":\"List all organizations you have access to, with their workspaces. Use this to see which orgs and workspaces are available.\",\"params\":[]},{\"name\":\"switch_org\",\"description\":\"Switch the active organization. This also switches to the first workspace in that org.\",\"params\":[\"org_id\"]},{\"name\":\"get_setup_state\",\"description\":\"Apex — READ-ONLY. The Set up Apex checklist for the active workspace, the same one the dashboard shows: the next step, every step's status, what each is waiting on, and how to finish it from here (the tool to call, or why a person has to do it in a browser, with the link). Use to answer \\\"where am I in setup?\\\" and \\\"what's next?\\\". Work the next step, then call this again. If first-run is incomplete, name the merchant with update_organization / update_workspace before inventing events. This tool never writes. No tool marks a step complete: steps finish when the real thing happens. When the owner says a step or area is not for them, record it with skip_setup_step or decline_setup_area after they say so.\",\"params\":[]},{\"name\":\"list_workspace_environments\",\"description\":\"Apex — Read the sites this workspace named as Production and Beta, plus unclassified sites Apex has seen. Name sites before you trust the Production slice. Do not invent a second workspace.\",\"params\":[]},{\"name\":\"set_workspace_environments\",\"description\":\"Apex — Name Production sites (and optional Beta sites). Apex will not guess staging. / qa. / dev. Naming reclassifies events from those sites at read time, and moves the people who came from them to match within a few minutes.\",\"params\":[\"production_hosts\",\"beta_hosts\"]},{\"name\":\"check_workspace_readiness\",\"description\":\"Apex — Check whether the workspace is ready for the Graduation Pipeline flow: Apex auth, GitHub App install, and (if you pass a repo) whether Apex may write to it. Run this at the top of /apex-experiment, /apex-graduate, etc., and resolve any gaps before proceeding.\",\"params\":[\"repo\"]},{\"name\":\"start_apex_login\",\"description\":\"Apex — Mint a stored API key through a browser sign-in, for a server or CI that cannot do browser approval. Not for setting up or connecting this editor: that is browser approval (get_setup_state shows the link, then wait_for_apex_approval). Returns a browser URL and polls until the key is minted. Save it only with the developer's consent, never in a committed file.\",\"params\":[]},{\"name\":\"wait_for_apex_approval\",\"description\":\"Apex — Call this right after showing the user an Apex approval link (the \\\"Apex isn't connected to this editor yet\\\" message). Waits up to 2 minutes and returns the moment they click Approve in the browser, so you can carry on without asking them to tell you. Then retry the call you were making. If nothing is pending it starts a new request and returns the link.\",\"params\":[]},{\"name\":\"start_integration_install\",\"description\":\"Apex — Begin a browser hop to connect GitHub, Stripe, Meta, Google, LinkedIn, TikTok, or Google Analytics. Returns a URL; open it. Legal acknowledgements stay on the opened page — this tool does not confirm them. Polls until connected, same as GitHub.\",\"params\":[\"type\",\"org_id\"]},{\"name\":\"create_server_key\",\"description\":\"Apex — Create an organization server key (apex_sk_) so a backend can send events (send_server_event, POST /api/v1/events). Owners and admins only. The key is shown once: put it straight into the server's secret store or hosting environment secrets. Never commit it, and never use it as this editor's APEX_API_KEY. A personal key from create_api_key cannot send server events.\",\"params\":[\"name\",\"org_id\"]},{\"name\":\"create_api_key\",\"description\":\"Apex — Create a personal Apex API key (apex_uk_) for signing an editor or script in as you. Returns the raw key once. It cannot send server events; use create_server_key for a backend.\",\"params\":[\"name\"]},{\"name\":\"list_api_keys\",\"description\":\"Apex — List the current user's Apex API keys (names + ids; never the secret).\",\"params\":[]},{\"name\":\"revoke_api_key\",\"description\":\"Apex — Revoke (delete) an Apex API key by id.\",\"params\":[\"key_id\"]},{\"name\":\"update_organization\",\"description\":\"Apex — Rename the organization. Same save as Set up Apex → name your organization. Admin only. To start a separate company, use create_organization instead. The rail finishes when the name is saved — do not mark the step complete.\",\"params\":[\"org_id\",\"name\"]},{\"name\":\"update_workspace\",\"description\":\"Apex — Name the workspace and set vertical, conversion model, website, how Apex installs on it, and app URL. One save, same as Set up Apex first-run. Omit a field to leave it unchanged. Admin only. The rail finishes from the live name / vertical / conversion model / website + install path — do not mark the step complete. app_url is where the workspace's customers sign in or use the product (Brand settings → App URL); letter buttons that use {{app_url}} go there.\",\"params\":[\"workspace_name\",\"vertical\",\"conversion_model\",\"website_url\",\"site_install\",\"app_url\"]},{\"name\":\"create_workspace\",\"description\":\"Apex — A new workspace inside one of the owner's organizations: another site, app, or product of the same business. For a separate company use create_organization instead; ask \\\"separate company, or another site of the same business?\\\" first. Switches to the new workspace and returns the .apex/workspace.json contents to commit in this repo. Org owner or admin only.\",\"params\":[\"org_id\",\"name\",\"website_url\",\"vertical\",\"conversion_model\"]},{\"name\":\"create_organization\",\"description\":\"Apex — A new organization for a separate company, with its own team and billing and one production workspace. The owner of this sign-in becomes its owner. Only when the owner says this repo is a separate company; for another site of the same business use create_workspace. Needs the person's own sign-in (browser approval), not a workspace key. Switches to the new workspace and returns the .apex/workspace.json contents to commit in this repo.\",\"params\":[\"name\",\"workspace_name\"]},{\"name\":\"skip_setup_step\",\"description\":\"Apex — Record the owner's \\\"not now\\\" or \\\"not for us\\\" on one Set up Apex step. Only after the owner says so in this conversation, in their words. Never call this to make setup look finished. snooze: true puts it off and it comes back on its own; otherwise it is skipped until someone undoes it. This never marks the step done, and the checklist shows it as skipped, not finished. Admin only. Use the step id from get_setup_state.\",\"params\":[\"step_id\",\"reason\",\"snooze\"]},{\"name\":\"decline_setup_area\",\"description\":\"Apex — Record that a whole area of Set up Apex does not apply to this workspace: no app, no server events, no messages from Apex, no ad platforms, or no partners. Only after the owner says so in this conversation, in their words. Never call this to make setup look finished. The area's steps leave the checklist; nothing in it is marked done. Admin only.\",\"params\":[\"area\",\"reason\"]},{\"name\":\"undo_setup_answer\",\"description\":\"Apex — Put a step or area back on the checklist: undo a skip, snooze, decline, or a step a person ticked done. Only when the owner asks for that step by name; never to tidy up. A step Apex can see is done (events arriving, domain verified) stays done anyway. Admin only.\",\"params\":[\"step_id\"]},{\"name\":\"claim_links_subdomain\",\"description\":\"Apex — Claim the workspace's links subdomain (name.links.apex.inc). Same save as Set up Apex → claim links subdomain. Admin only. Fails if another workspace already has that name.\",\"params\":[\"subdomain\"]},{\"name\":\"get_link_domain\",\"description\":\"Apex — The workspace's own link domain (e.g. go.theirbrand.com): the host, where it stands, the one DNS record to add, and what is wrong if anything. Same as Settings → Links.\",\"params\":[]},{\"name\":\"set_link_domain\",\"description\":\"Apex — Put the workspace's links on its own domain (e.g. go.theirbrand.com). Saves the host and starts the first DNS check; the reply names the one DNS record the owner adds where their domain is managed. Turning it on waits for a payment method on file (and the add-on, when it has a price). Admin only. One domain per workspace: remove the old one in Settings → Links first.\",\"params\":[\"host\"]},{\"name\":\"check_link_domain\",\"description\":\"Apex — Check the workspace's link domain now (Settings → Links → Check now), after the owner added the DNS record. Returns where it stands and what is still wrong. Admin only.\",\"params\":[]},{\"name\":\"set_consent_posture\",\"description\":\"Apex — Save the workspace's consent-form answers (do they have a box, which kind). This does not finish the step: whether Apex may send people to ad networks is the owner's own sign-off, checked in Set up Apex. The reply carries the link to give them. Admin only.\",\"params\":[\"has_form\",\"banner\"]},{\"name\":\"list_webhook_destinations\",\"description\":\"Apex — List webhook destinations this workspace has registered. Signing keys are hidden.\",\"params\":[]},{\"name\":\"add_webhook_destination\",\"description\":\"Apex — Register an HTTPS webhook destination. Private / loopback addresses are rejected. Admin only.\",\"params\":[\"name\",\"base_url\"]},{\"name\":\"get_messaging_guardrails\",\"description\":\"Apex — Read holdout percent and channel send limits for Adaptive Journeys.\",\"params\":[]},{\"name\":\"set_messaging_guardrails\",\"description\":\"Apex — Set holdout and channel send limits. Omit a field to keep the current value. reset_to_defaults puts every limit back to Apex's default (any field you also pass still wins). nudge_cap_per_day null = no daily limit on milestone nudges. Admin only.\",\"params\":[\"reset_to_defaults\",\"holdout_pct\",\"attribution_window_days\",\"nudge_cap_per_day\",\"fire_on_test_events\",\"cap_policy\"]},{\"name\":\"set_app_surface_paths\",\"description\":\"Apex — Name the product-path prefixes (e.g. /dashboard) so in-app pages are not filed as the marketing site. Admin only.\",\"params\":[\"paths\"]}],\"toolsHash\":\"3ea1f287cfcf0d35934ac3e46b84c7d00b094fce6f7833565623d132e85364cf\",\"wrote\":[],\"callsAt\":\"2026-11-16T11:37:34.848Z\",\"calls\":[{\"tool\":\"list_experiments\",\"ok\":false,\"ms\":87,\"bytes\":0,\"error\":\"tool reported an error: Error: Apex isn't connected to this editor yet. To authorize:\\n  1. Open https://app.apex.inc/activate?code=CT76-V6G9\\n  2. Sign in to Apex if needed, then click Approve (code CT76-V6G9).\\nShow the user \"},{\"tool\":\"list_beliefs\",\"ok\":false,\"ms\":1,\"bytes\":0,\"error\":\"tool reported an error: Error: Apex isn't connected to this editor yet. To authorize:\\n  1. Open https://app.apex.inc/activate?code=CT76-V6G9\\n  2. Sign in to Apex if needed, then click Approve (code CT76-V6G9).\\nShow the user \"},{\"tool\":\"list_belief_suggestions\",\"ok\":false,\"ms\":1,\"bytes\":0,\"error\":\"tool reported an error: Apex Could not read the suggestions: Apex isn't connected to this editor yet. To authorize:\\n  1. Open https://app.apex.inc/activate?code=CT76-V6G9\\n  2. Sign in to Apex if needed, then click Approve (c\"},{\"tool\":\"get_automation_controls\",\"ok\":false,\"ms\":1,\"bytes\":0,\"error\":\"tool reported an error: Error: Apex isn't connected to this editor yet. To authorize:\\n  1. Open https://app.apex.inc/activate?code=CT76-V6G9\\n  2. Sign in to Apex if needed, then click Approve (code CT76-V6G9).\\nShow the user \"},{\"tool\":\"list_communications\",\"ok\":false,\"ms\":1,\"bytes\":0,\"error\":\"tool reported an error: Error: Apex isn't connected to this editor yet. To authorize:\\n  1. Open https://app.apex.inc/activate?code=CT76-V6G9\\n  2. Sign in to Apex if needed, then click Approve (code CT76-V6G9).\\nShow the user \"}],\"host\":{\"commit\":\"eaaffffaf52255d1b77dc4aacffdfaf353f0c12c\",\"run\":\"https://github.com/itsHaddad/bragproof/actions/runs/43857070216\"},\"network\":{\"names\":[\"app.apex.inc\",\"registry.npmjs.org\"],\"conns\":[],\"callNames\":[],\"callConns\":[]}}","token":"eyJhbGciOiJSUzI1NiIsImtpZCI6IjM4ODI2YjE3LTZhMzAtNWY5Yi1iMTY5LThiZWI4MjAyZjcyMyIsInR5cCI6IkpXVCIsIng1dCI6InlrTmFZNHFNX3RhNGsyVGdaT0NFWUxrY1lsQSJ9.eyJhY3RvciI6Iml0c0hhZGRhZCIsImFjdG9yX2lkIjoiMTE0NzMyNjEiLCJhdWQiOiJicmFncHJvb2YtcmVwb3J0OmI0YWNmMTEzNGY4NGU0Mzc0ZTA3ZDkxZTBkNGRlNWRkZmY0MmM2NjgyZTM2OGI5ZDgwYTU5NGQ4OWU4ZjE4ZGEiLCJiYXNlX3JlZiI6IiIsImNoZWNrX3J1bl9pZCI6IjEzMzI2Mzk5NTM3MyIsImV2ZW50X25hbWUiOiJzY2hlZHVsZSIsImV4cCI6MTc5NDgyOTM2MSwiaGVhZF9yZWYiOiIiLCJpYXQiOjE3OTQ4MjkwNjEsImlzcyI6Imh0dHBzOi8vdG9rZW4uYWN0aW9ucy5naXRodWJ1c2VyY29udGVudC5jb20iLCJqb2Jfd29ya2Zsb3dfcmVmIjoiaXRzSGFkZGFkL2JyYWdwcm9vZi8uZ2l0aHViL3dvcmtmbG93cy9yZXBvcnQueW1sQHJlZnMvaGVhZHMvbWFpbiIsImpvYl93b3JrZmxvd19zaGEiOiJlYWFmZmZmYWY1MjI1NWQxYjc3ZGM0YWFjZmZkZmFmMzUzZjBjMTJjIiwianRpIjoiM2M4YWFhYWYtNjg2Ny00Y2U1LWEzYmItMWU3MzllMmVhNzNmIiwibmJmIjoxNzk0ODI4NzYxLCJyZWYiOiJyZWZzL2hlYWRzL21haW4iLCJyZWZfcHJvdGVjdGVkIjoiZmFsc2UiLCJyZWZfdHlwZSI6ImJyYW5jaCIsInJlcG9zaXRvcnkiOiJpdHNIYWRkYWQvYnJhZ3Byb29mIiwicmVwb3NpdG9yeV9pZCI6IjE0NTQ2MjExODMiLCJyZXBvc2l0b3J5X293bmVyIjoiaXRzSGFkZGFkIiwicmVwb3NpdG9yeV9vd25lcl9pZCI6IjExNDczMjYxIiwicmVwb3NpdG9yeV92aXNpYmlsaXR5IjoicHVibGljIiwicnVuX2F0dGVtcHQiOiIxIiwicnVuX2lkIjoiNDM4NTcwNzAyMTYiLCJydW5fbnVtYmVyIjoiMjQiLCJydW5uZXJfZW52aXJvbm1lbnQiOiJnaXRodWItaG9zdGVkIiwic2hhIjoiZWFhZmZmZmFmNTIyNTVkMWI3N2RjNGFhY2ZmZGZhZjM1M2YwYzEyYyIsInN1YiI6InJlcG86aXRzSGFkZGFkQDExNDczMjYxL2JyYWdwcm9vZkAxNDU0NjIxMTgzOnJlZjpyZWZzL2hlYWRzL21haW4iLCJ3b3JrZmxvdyI6InJlcG9ydCIsIndvcmtmbG93X3JlZiI6Iml0c0hhZGRhZC9icmFncHJvb2YvLmdpdGh1Yi93b3JrZmxvd3MvcmVwb3J0LnltbEByZWZzL2hlYWRzL21haW4iLCJ3b3JrZmxvd19zaGEiOiJlYWFmZmZmYWY1MjI1NWQxYjc3ZGM0YWFjZmZkZmFmMzUzZjBjMTJjIn0.j1WcJY0cjKwsKHhdaLDCS8smswbl0RP0jbAccl7toZzt5XW_N9ZxBsEhAHbvGvNj4ls5K48JLnDOzReE5_ezQVNzk_CbRccV6YroUYZKWYC8kG1D09BbKG2d5Ce58U7gUinOKikqQZGM_n1kxDsc8Gj8lEeYy20uZdnuc7BdrpG07ql843SknwOssxK4uFbJDHOTCr6z_Ht9ab-M-RZb0D5gwqvg6r1ko9PfZsePZGs_ivsoURxE_XQ3QDXbaLNpR0tAQPUrSBFK0a_hi9q6XjgBPmPpDiZfiYMKuly8H597oKPgpF3XcAsGP1-0cXeXEuxw72Svb5OrN463E5pDGg"}