Data sources tools
The data_sources and manage_data_source tools show where your customer and event data comes from, whether it is arriving, and let you set up custom sources.
Two tools on https://api.vyg.app/mcp cover your data sources:
| Tool | Kind | Actions |
|---|---|---|
data_sources | read | list, get |
manage_data_source | write | create_source, update_source, create_event, update_event |
A data source is a connected app (such as Shopify, Klaviyo or Zendesk SMS), a custom source that sends events to a
webhook (WooCommerce and BigCommerce are custom sources built from the woocommerce and bigcommerce templates), or
the VYG Web Pixel on your website.
data_sources: list
list returns every source in one list, with the same access as the vyg.ai app. Connected apps need
integrations:read and are the ones the Integrations page shows your brand. The web pixel needs
integrations:read and customer data (CDP) access. Custom sources need providers:read;
every brand can use them. A part you cannot see is left out, and notes says why.
Add "health" to include for each custom source's last event, events received in the last 14 days, and how
many are still processing. Add "event_types" (needs events:read) for the event types campaigns and segments
can use.
{ "action": "list", "include": ["health"] }"Are all my data sources still sending events?"
data_sources: get
get takes a source_id from list; the web pixel is web_pixel. include adds:
| Include | What it adds |
|---|---|
health | Last event, 14-day received and processing counts, and the 14-day count per event. |
events | The events a custom source accepts, with their payload schema. |
activity | Events received per day over the last 14 days. |
setup | The webhook URL, the WooCommerce plugin download, or the web pixel snippet. |
event_types | The event type catalog. |
Pass event_id for one event of a custom source. Health is counts only: event contents are never returned. Setup
never includes a signing secret or API key.
{ "action": "get", "source_id": "web_pixel", "include": ["setup"] }"Give me the snippet for my website."
manage_data_source
manage_data_source needs providers:write. Like Data Sources in the app, it is available to every brand. Pick
the change with op:
create_sourceadds a custom source with aname. The response has the webhook URL and the signing secret. They are shown once, so save them. A signed-in user who can manage API keys also gets an API key: as in the app, that is a brand admin or LiveRecover staff. No beta enrollment is required.update_sourcerenames a source (source_id,name), turns it on or off (is_enabled), or changessettings.create_eventregisters an event:source_id, a uniquetype, aname, itspayload_schema(JSON Schema) andidentifier_mappings(external_id_pathandemail_pathorphone_path). Addsms_opt_in_pathoremail_opt_in_pathto point at a true/false consent field in the payload; email stays unsubscribed unlessemail_opt_in_pathis true.update_eventchanges an event (source_id,event_id). Pass the currentschema_versionwhen changingpayload_schema.
Turning a source or an event off stops its events from being accepted.
{
"op": "create_event",
"source_id": "f1c2…",
"type": "points_earned",
"name": "Points earned",
"payload_schema": { "type": "object" },
"identifier_mappings": { "external_id_path": "customer.id", "email_path": "customer.email" }
}"Add a points earned event to my loyalty source."
Replaced tools
These tools replace list_integrations, list_providers, get_provider, list_event_types,
list_event_definitions, get_event_definition, create_provider, update_provider, create_event_definition
and update_event_definition. The old names still work for now and each response names the replacement.