VYG Docs
Tools

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:

ToolKindActions
data_sourcesreadlist, get
manage_data_sourcewritecreate_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:

IncludeWhat it adds
healthLast event, 14-day received and processing counts, and the 14-day count per event.
eventsThe events a custom source accepts, with their payload schema.
activityEvents received per day over the last 14 days.
setupThe webhook URL, the WooCommerce plugin download, or the web pixel snippet.
event_typesThe 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_source adds a custom source with a name. 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_source renames a source (source_id, name), turns it on or off (is_enabled), or changes settings.
  • create_event registers an event: source_id, a unique type, a name, its payload_schema (JSON Schema) and identifier_mappings (external_id_path and email_path or phone_path). Add sms_opt_in_path or email_opt_in_path to point at a true/false consent field in the payload; email stays unsubscribed unless email_opt_in_path is true.
  • update_event changes an event (source_id, event_id). Pass the current schema_version when changing payload_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.

On this page