Segment MCP Server for Cloudflare Workers
108 tools available in the Segment MCP server. Each tool can be called by AI assistants to perform specific actions.
segment_list_usersList all users in the workspace.
Args:
Returns: Paginated list of users.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_userGet details for a specific user.
Args:
Returns: User details.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"userId": {
"type": "string",
"description": "User ID"
}
}
}segment_delete_usersDelete users from the workspace.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"userIds"
],
"properties": {
"userIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "User IDs to delete"
}
}
}segment_list_user_groupsList all user groups in the workspace.
Args:
Returns: Paginated list of user groups.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_user_groupGet details for a specific user group.
Args:
Returns: User group details.
{
"type": "object",
"required": [
"groupId"
],
"properties": {
"groupId": {
"type": "string",
"description": "Group ID"
}
}
}segment_create_user_groupCreate a new user group.
Args:
Returns: The created user group.
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Group name"
}
}
}segment_update_user_groupUpdate a user group.
Args:
Returns: The updated user group.
{
"type": "object",
"required": [
"groupId",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "New group name"
},
"groupId": {
"type": "string",
"description": "Group ID"
}
}
}segment_delete_user_groupDelete a user group.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"groupId"
],
"properties": {
"groupId": {
"type": "string",
"description": "Group ID"
}
}
}segment_add_users_to_user_groupAdd users to a user group.
Args:
Returns: Confirmation of addition.
{
"type": "object",
"required": [
"groupId",
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "User emails to add"
},
"groupId": {
"type": "string",
"description": "Group ID"
}
}
}segment_remove_users_from_user_groupRemove users from a user group.
Args:
Returns: Confirmation of removal.
{
"type": "object",
"required": [
"groupId",
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "User emails to remove"
},
"groupId": {
"type": "string",
"description": "Group ID"
}
}
}segment_list_invitesList all pending invites.
Args:
Returns: Paginated list of invites.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_create_invitesSend invites to new users.
Args:
Returns: Confirmation of invites sent.
{
"type": "object",
"required": [
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to invite"
}
}
}segment_delete_invitesCancel pending invites.
Args:
Returns: Confirmation of invites cancelled.
{
"type": "object",
"required": [
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email addresses to cancel"
}
}
}segment_list_labelsList all labels in the workspace.
Labels are used to organize and filter resources.
Args:
Returns: Paginated list of labels.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_create_labelCreate a new label.
Args:
Returns: The created label.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "Label key"
},
"value": {
"type": "string",
"description": "Label value"
},
"description": {
"type": "string",
"description": "Label description"
}
}
}segment_delete_labelDelete a label.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"key",
"value"
],
"properties": {
"key": {
"type": "string",
"description": "Label key"
},
"value": {
"type": "string",
"description": "Label value"
}
}
}segment_list_regulations_from_sourceList regulations (deletion/suppression requests) for a source.
Args:
Returns: Paginated list of regulations.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_create_source_regulationCreate a regulation (deletion/suppression request) for a source.
Use this for GDPR/CCPA compliance to delete or suppress user data.
Args:
Returns: The created regulation.
{
"type": "object",
"required": [
"sourceId",
"regulationType",
"subjectType",
"subjectIds"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
},
"subjectIds": {
"type": "array",
"items": {
"type": "string"
},
"description": "Subject IDs to regulate"
},
"subjectType": {
"type": "string",
"description": "Subject type (USER_ID, etc.)"
},
"regulationType": {
"type": "string",
"description": "Regulation type (DELETE, SUPPRESS, etc.)"
}
}
}segment_get_regulationGet details for a regulation.
Args:
Returns: Regulation details including status.
{
"type": "object",
"required": [
"regulationId"
],
"properties": {
"regulationId": {
"type": "string",
"description": "Regulation ID"
}
}
}segment_delete_regulationDelete a regulation request.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"regulationId"
],
"properties": {
"regulationId": {
"type": "string",
"description": "Regulation ID"
}
}
}segment_list_audit_eventsList audit events for the workspace.
Audit events track changes made to workspace resources.
Args:
Returns: Paginated list of audit events.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"resourceId": {
"type": "string"
},
"resourceType": {
"type": "string"
}
}
}segment_get_workspaceGet details for the current workspace.
Returns: Workspace details including ID, name, and slug.
{
"type": "object",
"properties": {}
}segment_get_sources_catalogBrowse the sources catalog.
Lists all available source types that can be created.
Args:
Returns: Paginated list of source types.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_source_metadataGet metadata for a source type.
Args:
Returns: Source type metadata including description, logos, and categories.
{
"type": "object",
"required": [
"sourceMetadataId"
],
"properties": {
"sourceMetadataId": {
"type": "string",
"description": "Source metadata ID"
}
}
}segment_get_destinations_catalogBrowse the destinations catalog.
Lists all available destination types that can be created.
Args:
Returns: Paginated list of destination types.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_destination_metadataGet metadata for a destination type.
Args:
Returns: Destination type metadata including description, supported methods, and actions.
{
"type": "object",
"required": [
"destinationMetadataId"
],
"properties": {
"destinationMetadataId": {
"type": "string",
"description": "Destination metadata ID"
}
}
}segment_get_warehouses_catalogBrowse the warehouses catalog.
Lists all available warehouse types (Snowflake, BigQuery, Redshift, etc.).
Args:
Returns: Paginated list of warehouse types.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_warehouse_metadataGet metadata for a warehouse type.
Args:
Returns: Warehouse type metadata including description and logos.
{
"type": "object",
"required": [
"warehouseMetadataId"
],
"properties": {
"warehouseMetadataId": {
"type": "string",
"description": "Warehouse metadata ID"
}
}
}segment_list_destinationsList all destinations in the workspace.
Returns a paginated list of destinations configured in your workspace.
Args:
Returns: Paginated list of destinations with their IDs, names, types, and enabled status.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Number of destinations to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_destinationGet details for a specific destination.
Args:
Returns: Destination details including settings, metadata, and configuration.
{
"type": "object",
"required": [
"destinationId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_create_destinationCreate a new destination connected to a source.
Args:
Returns: The created destination object.
{
"type": "object",
"required": [
"sourceId",
"metadataId",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Display name for the destination"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Whether the destination is enabled"
},
"settings": {
"type": "object",
"description": "Destination-specific settings"
},
"sourceId": {
"type": "string",
"description": "Source ID to connect"
},
"metadataId": {
"type": "string",
"description": "Destination catalog ID"
}
}
}segment_update_destinationUpdate an existing destination.
Args:
Returns: The updated destination object.
{
"type": "object",
"required": [
"destinationId"
],
"properties": {
"name": {
"type": "string",
"description": "New display name"
},
"enabled": {
"type": "boolean",
"description": "Enable or disable"
},
"settings": {
"type": "object",
"description": "Updated settings"
},
"destinationId": {
"type": "string",
"description": "Destination ID to update"
}
}
}segment_delete_destinationDelete a destination.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"destinationId"
],
"properties": {
"destinationId": {
"type": "string",
"description": "Destination ID to delete"
}
}
}segment_list_destination_subscriptionsList subscriptions for a destination.
Subscriptions define which events are sent to an Actions destination.
Args:
Returns: List of subscriptions for the destination.
{
"type": "object",
"required": [
"destinationId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_get_destination_subscriptionGet a specific subscription for a destination.
Args:
Returns: The subscription details.
{
"type": "object",
"required": [
"destinationId",
"subscriptionId"
],
"properties": {
"destinationId": {
"type": "string",
"description": "Destination ID"
},
"subscriptionId": {
"type": "string",
"description": "Subscription ID"
}
}
}segment_create_destination_subscriptionCreate a subscription for a destination.
Args:
Returns: The created subscription.
{
"type": "object",
"required": [
"destinationId",
"name",
"actionId",
"trigger"
],
"properties": {
"name": {
"type": "string",
"description": "Subscription name"
},
"enabled": {
"type": "boolean",
"default": true
},
"trigger": {
"type": "string",
"description": "FQL trigger expression"
},
"actionId": {
"type": "string",
"description": "Action ID"
},
"settings": {
"type": "object"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_update_destination_subscriptionUpdate a destination subscription.
Args:
Returns: The updated subscription.
{
"type": "object",
"required": [
"destinationId",
"subscriptionId"
],
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"trigger": {
"type": "string"
},
"settings": {
"type": "object"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
},
"subscriptionId": {
"type": "string",
"description": "Subscription ID"
}
}
}segment_delete_destination_subscriptionDelete a destination subscription.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"destinationId",
"subscriptionId"
],
"properties": {
"destinationId": {
"type": "string",
"description": "Destination ID"
},
"subscriptionId": {
"type": "string",
"description": "Subscription ID"
}
}
}segment_list_destination_filtersList filters for a destination.
Filters control which events are sent to a destination.
Args:
Returns: List of filters for the destination.
{
"type": "object",
"required": [
"destinationId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_create_destination_filterCreate a filter for a destination.
Filters can drop events, sample events, or modify properties.
Args:
Returns: The created filter.
{
"type": "object",
"required": [
"sourceId",
"destinationId",
"title",
"ifClause"
],
"properties": {
"title": {
"type": "string",
"description": "Filter title"
},
"enabled": {
"type": "boolean",
"default": true
},
"ifClause": {
"type": "string",
"description": "FQL condition"
},
"sourceId": {
"type": "string",
"description": "Source ID"
},
"description": {
"type": "string"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_update_destination_filterUpdate a destination filter.
Args:
Returns: The updated filter.
{
"type": "object",
"required": [
"destinationId",
"filterId"
],
"properties": {
"title": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"filterId": {
"type": "string",
"description": "Filter ID"
},
"ifClause": {
"type": "string"
},
"description": {
"type": "string"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_delete_destination_filterDelete a destination filter.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"destinationId",
"filterId"
],
"properties": {
"filterId": {
"type": "string",
"description": "Filter ID"
},
"destinationId": {
"type": "string",
"description": "Destination ID"
}
}
}segment_list_spacesList all Engage spaces in the workspace.
Spaces are Engage workspaces that contain audiences and computed traits.
Args:
Returns: Paginated list of spaces.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_spaceGet details for a specific Engage space.
Args:
Returns: Space details.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}segment_list_audiencesList all audiences in an Engage space.
Audiences are dynamic groups of users based on conditions.
Args:
Returns: Paginated list of audiences.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}segment_get_audienceGet details for a specific audience.
Args:
Returns: Audience details including definition and status.
{
"type": "object",
"required": [
"spaceId",
"audienceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"audienceId": {
"type": "string",
"description": "Audience ID"
}
}
}segment_deploy_functionDeploy a function to make it available for use.
Args:
Returns: The deployed function.
{
"type": "object",
"required": [
"functionId"
],
"properties": {
"functionId": {
"type": "string",
"description": "Function ID"
}
}
}segment_create_audienceCreate a new audience in an Engage space.
Args:
Returns: The created audience.
{
"type": "object",
"required": [
"spaceId",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Audience name"
},
"enabled": {
"type": "boolean"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"description": {
"type": "string"
}
}
}segment_update_audienceUpdate an existing audience.
Args:
Returns: The updated audience.
{
"type": "object",
"required": [
"spaceId",
"audienceId"
],
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"audienceId": {
"type": "string",
"description": "Audience ID"
},
"description": {
"type": "string"
}
}
}segment_delete_audienceDelete an audience.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"spaceId",
"audienceId"
],
"properties": {
"spaceId": {
"type": "string",
"description": "Space ID"
},
"audienceId": {
"type": "string",
"description": "Audience ID"
}
}
}segment_list_computed_traitsList all computed traits in an Engage space.
Computed traits are dynamically calculated user properties.
Args:
Returns: Paginated list of computed traits.
{
"type": "object",
"required": [
"spaceId"
],
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
}
}
}segment_get_computed_traitGet details for a specific computed trait.
Args:
Returns: Computed trait details.
{
"type": "object",
"required": [
"spaceId",
"traitId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"traitId": {
"type": "string",
"description": "Computed trait ID"
}
}
}segment_create_computed_traitCreate a new computed trait.
Args:
Returns: The created computed trait.
{
"type": "object",
"required": [
"spaceId",
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Trait name"
},
"enabled": {
"type": "boolean"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"description": {
"type": "string"
}
}
}segment_update_computed_traitUpdate an existing computed trait.
Args:
Returns: The updated computed trait.
{
"type": "object",
"required": [
"spaceId",
"traitId"
],
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"spaceId": {
"type": "string",
"description": "Space ID"
},
"traitId": {
"type": "string",
"description": "Computed trait ID"
},
"description": {
"type": "string"
}
}
}segment_delete_computed_traitDelete a computed trait.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"spaceId",
"traitId"
],
"properties": {
"spaceId": {
"type": "string",
"description": "Space ID"
},
"traitId": {
"type": "string",
"description": "Computed trait ID"
}
}
}segment_list_functionsList all functions in the workspace.
Functions are custom JavaScript code that can transform or filter data.
Args:
Returns: Paginated list of functions.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Number to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"resourceType": {
"enum": [
"DESTINATION",
"INSERT_DESTINATION",
"SOURCE"
],
"type": "string"
}
}
}segment_get_functionGet details for a specific function.
Args:
Returns: Function details including code, settings, and deployment status.
{
"type": "object",
"required": [
"functionId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"functionId": {
"type": "string",
"description": "Function ID"
}
}
}segment_create_functionCreate a new function.
Args:
Returns: The created function.
{
"type": "object",
"required": [
"displayName",
"code",
"resourceType"
],
"properties": {
"code": {
"type": "string",
"description": "JavaScript code"
},
"description": {
"type": "string",
"description": "Description"
},
"displayName": {
"type": "string",
"description": "Function display name"
},
"resourceType": {
"enum": [
"DESTINATION",
"INSERT_DESTINATION",
"SOURCE"
],
"type": "string",
"description": "Function type"
}
}
}segment_update_functionUpdate an existing function.
Args:
Returns: The updated function.
{
"type": "object",
"required": [
"functionId"
],
"properties": {
"code": {
"type": "string"
},
"functionId": {
"type": "string",
"description": "Function ID"
},
"description": {
"type": "string"
},
"displayName": {
"type": "string"
}
}
}segment_delete_functionDelete a function.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"functionId"
],
"properties": {
"functionId": {
"type": "string",
"description": "Function ID"
}
}
}segment_list_reverse_etl_modelsList all Reverse ETL models.
Reverse ETL models sync data from warehouses back to destinations.
Args:
Returns: Paginated list of Reverse ETL models.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_reverse_etl_modelGet details for a specific Reverse ETL model.
Args:
Returns: Reverse ETL model details including query and schedule.
{
"type": "object",
"required": [
"modelId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"modelId": {
"type": "string",
"description": "Model ID"
}
}
}segment_list_connected_destinations_from_sourceList all destinations connected to a source.
Args:
Returns: List of destinations connected to the source.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_create_reverse_etl_modelCreate a new Reverse ETL model.
Args:
Returns: The created Reverse ETL model.
{
"type": "object",
"required": [
"sourceId",
"name",
"query",
"queryIdentifierColumn"
],
"properties": {
"name": {
"type": "string",
"description": "Model name"
},
"query": {
"type": "string",
"description": "SQL query"
},
"enabled": {
"type": "boolean",
"default": true
},
"sourceId": {
"type": "string",
"description": "Warehouse source ID"
},
"description": {
"type": "string"
},
"scheduleConfig": {
"type": "object"
},
"scheduleStrategy": {
"type": "string"
},
"queryIdentifierColumn": {
"type": "string",
"description": "Unique identifier column"
}
}
}segment_update_reverse_etl_modelUpdate a Reverse ETL model.
Args:
Returns: The updated Reverse ETL model.
{
"type": "object",
"required": [
"modelId"
],
"properties": {
"name": {
"type": "string"
},
"query": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"modelId": {
"type": "string",
"description": "Model ID"
},
"description": {
"type": "string"
},
"scheduleConfig": {
"type": "object"
},
"scheduleStrategy": {
"type": "string"
}
}
}segment_delete_reverse_etl_modelDelete a Reverse ETL model.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"modelId"
],
"properties": {
"modelId": {
"type": "string",
"description": "Model ID"
}
}
}segment_trigger_reverse_etl_syncManually trigger a Reverse ETL sync.
Args:
Returns: Confirmation that sync was triggered.
{
"type": "object",
"required": [
"modelId",
"subscriptionId"
],
"properties": {
"modelId": {
"type": "string",
"description": "Model ID"
},
"subscriptionId": {
"type": "string",
"description": "Subscription ID"
}
}
}segment_list_sourcesList all sources in the workspace.
Returns a paginated list of sources. Use the cursor from the response to fetch the next page.
Args:
Returns: Paginated list of sources with their IDs, names, slugs, and enabled status.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Number of sources to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor from previous response"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string",
"default": "json",
"description": "Response format"
}
}
}segment_get_sourceGet details for a specific source.
Args:
Returns: Source details including ID, name, slug, write keys, metadata, and settings.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_create_sourceCreate a new source in the workspace.
Args:
Returns: The created source object.
{
"type": "object",
"required": [
"slug",
"name",
"catalogId"
],
"properties": {
"name": {
"type": "string",
"description": "Display name for the source"
},
"slug": {
"type": "string",
"description": "Unique slug for the source"
},
"catalogId": {
"type": "string",
"description": "Source catalog ID (e.g., catalog/sources/javascript)"
}
}
}segment_update_sourceUpdate an existing source.
Args:
Returns: The updated source object.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"name": {
"type": "string",
"description": "New display name"
},
"enabled": {
"type": "boolean",
"description": "Enable or disable the source"
},
"sourceId": {
"type": "string",
"description": "Source ID to update"
}
}
}segment_delete_sourceDelete a source from the workspace.
WARNING: This action is irreversible. All data associated with the source will be deleted.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID to delete"
}
}
}segment_get_source_schema_settingsGet schema settings for a source.
Schema settings control how Segment validates tracking data.
Args:
Returns: Schema settings including track, identify, and group settings.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_update_source_schema_settingsUpdate schema settings for a source.
Args:
Returns: Updated schema settings.
{
"type": "object",
"required": [
"sourceId",
"settings"
],
"properties": {
"settings": {
"type": "object",
"description": "Schema settings to update"
},
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_add_labels_to_sourceAdd labels to a source for organization and filtering.
Args:
Returns: The updated source object.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_list_connected_warehouses_from_sourceList all warehouses connected to a source.
Args:
Returns: List of warehouses connected to the source.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_create_write_key_for_sourceCreate a new write key for a source.
Write keys are used to authenticate tracking API requests.
Args:
Returns: The new write key.
{
"type": "object",
"required": [
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
}
}
}segment_remove_write_key_from_sourceRemove a write key from a source.
WARNING: This will invalidate the write key and any systems using it will stop working.
Args:
Returns: Confirmation of removal.
{
"type": "object",
"required": [
"sourceId",
"writeKey"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
},
"writeKey": {
"type": "string",
"description": "Write key to remove"
}
}
}segment_list_tracking_plansList all tracking plans in the workspace.
Tracking plans define the expected schema for your tracking data.
Args:
Returns: Paginated list of tracking plans.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Number to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_tracking_planGet details for a specific tracking plan.
Args:
Returns: Tracking plan details including name, description, and type.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_create_tracking_planCreate a new tracking plan.
Args:
Returns: The created tracking plan.
{
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Tracking plan name"
},
"type": {
"enum": [
"ENGAGE",
"LIVE",
"PROPERTY_LIBRARY",
"RULE_LIBRARY",
"TEMPLATE"
],
"type": "string",
"default": "LIVE"
},
"description": {
"type": "string",
"description": "Description"
}
}
}segment_update_tracking_planUpdate an existing tracking plan.
Args:
Returns: The updated tracking plan.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"name": {
"type": "string",
"description": "New name"
},
"description": {
"type": "string",
"description": "New description"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_delete_tracking_planDelete a tracking plan.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_list_tracking_plan_rulesList rules in a tracking plan.
Rules define the expected schema for events, traits, and properties.
Args:
Returns: List of rules in the tracking plan.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_update_tracking_plan_rulesUpdate rules in a tracking plan.
Args:
Returns: Confirmation of update.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_add_source_to_tracking_planConnect a source to a tracking plan.
Once connected, events from the source will be validated against the tracking plan.
Args:
Returns: Confirmation of connection.
{
"type": "object",
"required": [
"trackingPlanId",
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_remove_source_from_tracking_planDisconnect a source from a tracking plan.
Args:
Returns: Confirmation of disconnection.
{
"type": "object",
"required": [
"trackingPlanId",
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_list_sources_from_tracking_planList sources connected to a tracking plan.
Args:
Returns: List of sources connected to the tracking plan.
{
"type": "object",
"required": [
"trackingPlanId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"trackingPlanId": {
"type": "string",
"description": "Tracking plan ID"
}
}
}segment_get_transformationGet details for a specific transformation.
Args:
Returns: Transformation details including rules and configuration.
{
"type": "object",
"required": [
"transformationId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"transformationId": {
"type": "string",
"description": "Transformation ID"
}
}
}segment_identifyIdentify a user and record their traits.
The Identify call lets you tie a user to their actions and record traits about them. It includes a unique User ID and any optional traits you know about them.
Args:
Returns: Confirmation that the identify call was sent.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"traits": {
"type": "object",
"description": "User traits (email, name, plan, etc.)"
},
"userId": {
"type": "string",
"description": "Unique user identifier"
},
"context": {
"type": "object",
"description": "Additional context (ip, userAgent, etc.)"
},
"anonymousId": {
"type": "string",
"description": "Anonymous ID if userId is not available"
}
}
}segment_trackTrack an event that a user has performed.
The Track call records actions your users perform. Every action triggers an "event", which can have associated properties.
Args:
Returns: Confirmation that the track call was sent.
{
"type": "object",
"required": [
"userId",
"event"
],
"properties": {
"event": {
"type": "string",
"description": "Name of the event being tracked"
},
"userId": {
"type": "string",
"description": "Unique user identifier"
},
"context": {
"type": "object",
"description": "Additional context"
},
"properties": {
"type": "object",
"description": "Event properties"
},
"anonymousId": {
"type": "string",
"description": "Anonymous ID if userId is not available"
}
}
}segment_pageTrack a page view on a website.
The Page call lets you record page views on your website, along with optional information about the page being viewed.
Args:
Returns: Confirmation that the page call was sent.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the page"
},
"userId": {
"type": "string",
"description": "Unique user identifier"
},
"context": {
"type": "object",
"description": "Additional context"
},
"category": {
"type": "string",
"description": "Category of the page"
},
"properties": {
"type": "object",
"description": "Page properties (url, referrer, title, etc.)"
},
"anonymousId": {
"type": "string",
"description": "Anonymous ID if userId is not available"
}
}
}segment_screenTrack a screen view in a mobile app.
The Screen call lets you record whenever a user sees a screen of your mobile app.
Args:
Returns: Confirmation that the screen call was sent.
{
"type": "object",
"required": [
"userId"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the screen"
},
"userId": {
"type": "string",
"description": "Unique user identifier"
},
"context": {
"type": "object",
"description": "Additional context"
},
"category": {
"type": "string",
"description": "Category of the screen"
},
"properties": {
"type": "object",
"description": "Screen properties"
},
"anonymousId": {
"type": "string",
"description": "Anonymous ID if userId is not available"
}
}
}segment_groupAssociate a user with a group (company, organization, account, etc.).
The Group call lets you associate an identified user with a group. A group could be a company, organization, account, project, or team.
Args:
Returns: Confirmation that the group call was sent.
{
"type": "object",
"required": [
"userId",
"groupId"
],
"properties": {
"traits": {
"type": "object",
"description": "Group traits (name, industry, employees, plan, etc.)"
},
"userId": {
"type": "string",
"description": "Unique user identifier"
},
"context": {
"type": "object",
"description": "Additional context"
},
"groupId": {
"type": "string",
"description": "Unique group identifier"
},
"anonymousId": {
"type": "string",
"description": "Anonymous ID if userId is not available"
}
}
}segment_aliasCreate an alias between two user identities.
The Alias call lets you merge two user identities. This is useful when a user signs up and you want to merge their anonymous browsing history with their new identity.
Args:
Returns: Confirmation that the alias call was sent.
{
"type": "object",
"required": [
"userId",
"previousId"
],
"properties": {
"userId": {
"type": "string",
"description": "The new user ID"
},
"context": {
"type": "object",
"description": "Additional context"
},
"previousId": {
"type": "string",
"description": "The previous user ID or anonymous ID"
}
}
}segment_batchSend a batch of tracking events.
The Batch call lets you send multiple identify, track, page, screen, group, and alias events in a single request for higher performance.
Args:
Returns: Confirmation that the batch was sent.
{
"type": "object",
"required": [
"batch"
],
"properties": {
"batch": {
"type": "array",
"items": {
"type": "string"
},
"description": "Array of event objects"
},
"context": {
"type": "object",
"description": "Shared context for all events"
},
"integrations": {
"type": "object",
"description": "Integration settings"
}
}
}segment_list_transformationsList all transformations in the workspace.
Transformations modify events as they flow through Segment.
Args:
Returns: Paginated list of transformations.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1
},
"cursor": {
"type": "string"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_create_transformationCreate a new transformation.
Args:
Returns: The created transformation.
{
"type": "object",
"required": [
"sourceId",
"name",
"ifClause"
],
"properties": {
"name": {
"type": "string",
"description": "Transformation name"
},
"enabled": {
"type": "boolean",
"default": true
},
"ifClause": {
"type": "string",
"description": "FQL condition"
},
"sourceId": {
"type": "string",
"description": "Source ID"
},
"newEventName": {
"type": "string",
"description": "New event name"
},
"destinationMetadataId": {
"type": "string"
}
}
}segment_update_transformationUpdate an existing transformation.
Args:
Returns: The updated transformation.
{
"type": "object",
"required": [
"transformationId"
],
"properties": {
"name": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"ifClause": {
"type": "string"
},
"newEventName": {
"type": "string"
},
"transformationId": {
"type": "string",
"description": "Transformation ID"
}
}
}segment_delete_transformationDelete a transformation.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"transformationId"
],
"properties": {
"transformationId": {
"type": "string",
"description": "Transformation ID"
}
}
}segment_list_warehousesList all warehouses in the workspace.
Returns a paginated list of data warehouses (Snowflake, BigQuery, Redshift, etc.).
Args:
Returns: Paginated list of warehouses with their IDs, names, types, and enabled status.
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"default": 20,
"maximum": 100,
"minimum": 1,
"description": "Number of warehouses to return"
},
"cursor": {
"type": "string",
"description": "Pagination cursor"
},
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
}
}
}segment_get_warehouseGet details for a specific warehouse.
Args:
Returns: Warehouse details including settings, metadata, and connection info.
{
"type": "object",
"required": [
"warehouseId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"warehouseId": {
"type": "string",
"description": "Warehouse ID"
}
}
}segment_create_warehouseCreate a new warehouse.
Args:
Returns: The created warehouse object.
{
"type": "object",
"required": [
"metadataId",
"settings"
],
"properties": {
"name": {
"type": "string",
"description": "Display name"
},
"enabled": {
"type": "boolean",
"default": true,
"description": "Whether enabled"
},
"settings": {
"type": "object",
"description": "Warehouse-specific settings"
},
"metadataId": {
"type": "string",
"description": "Warehouse catalog ID"
}
}
}segment_update_warehouseUpdate an existing warehouse.
Args:
Returns: The updated warehouse object.
{
"type": "object",
"required": [
"warehouseId"
],
"properties": {
"name": {
"type": "string",
"description": "New display name"
},
"enabled": {
"type": "boolean",
"description": "Enable or disable"
},
"settings": {
"type": "object",
"description": "Updated settings"
},
"warehouseId": {
"type": "string",
"description": "Warehouse ID to update"
}
}
}segment_delete_warehouseDelete a warehouse.
WARNING: This action is irreversible.
Args:
Returns: Confirmation of deletion.
{
"type": "object",
"required": [
"warehouseId"
],
"properties": {
"warehouseId": {
"type": "string",
"description": "Warehouse ID to delete"
}
}
}segment_add_source_connection_to_warehouseConnect a source to a warehouse.
This enables data from the source to be synced to the warehouse.
Args:
Returns: Confirmation of connection.
{
"type": "object",
"required": [
"warehouseId",
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID to connect"
},
"warehouseId": {
"type": "string",
"description": "Warehouse ID"
}
}
}segment_remove_source_connection_from_warehouseDisconnect a source from a warehouse.
Args:
Returns: Confirmation of disconnection.
{
"type": "object",
"required": [
"warehouseId",
"sourceId"
],
"properties": {
"sourceId": {
"type": "string",
"description": "Source ID to disconnect"
},
"warehouseId": {
"type": "string",
"description": "Warehouse ID"
}
}
}segment_list_connected_sources_from_warehouseList all sources connected to a warehouse.
Args:
Returns: List of sources connected to the warehouse.
{
"type": "object",
"required": [
"warehouseId"
],
"properties": {
"format": {
"enum": [
"json",
"markdown"
],
"type": "string"
},
"warehouseId": {
"type": "string",
"description": "Warehouse ID"
}
}
}