atmon docs

REFERENCE/TOOLKITS/SEGMENT.MD

Segment

Customer data pipelines. Manage sources and destinations, and write the tracking plan rules that say what a valid event looks like.

PropertyValue
Slugsegment
Definition version0.1.0
Base URLhttps://api.segmentapis.com
Auth schemesapi_key
Action tools35
By class16 read, 11 write, 8 destructive
Triggers0
Provider rate limitnot declared, so outbound calls are unpaced

Measured routing accuracy

47 golden cases replayed through the router over the whole index: measured over corpus ea4f12ad2948 (65 toolkits, 2283 tools indexed and 13 declared uncallable), 35 cases written by hand and 12 cases from the paraphrase pass. A case counts as top-1 when its gold tool ranked first and top-8 when it reached the slate at all.

MeasureCasesShare
top-136/4776.6%
top-847/47100.0%

The sweep is offline: the reranker is a deterministic identity fake that returns candidates in the order retrieval produced them, so top-1 measures retrieval order rather than a reranked slate. just eval-live measures the same cases through the live reranker.

Authentication

Connect an entity with ConnectionsService.InitiateConnection, naming this toolkit's slug. Credentials stay in the connections vault; callers hold connected-account ids only.

api_key

PropertyValue
Placementheader
NameAuthorization
Rendered asBearer {key}

Submit the key with ConnectionsService rather than putting it in a request; it is sealed at rest and never returned.

Tools

35 action tools. The catalog-wide slug is segment.<tool>, which is what search_tools returns and call_tool takes.

segment.create_source

Create a new Segment source, the collection point data flows in from. Use when the user wants to add, connect, or set up a new source, app, or website in Segment. Needs a catalog metadata id for the source type (see list_source_catalog) and a workspace-unique slug.

Class write (writes, no confirmation needed). Scopes sources:write. Calls POST /sources.

Arguments:

ArgumentTypeRequiredNotes
enabledbooleannoWhether the source accepts data immediately. Defaults to true.
metadata_idstringyesSegment catalog id for the source type, from list_source_catalog.
slugstringyesWorkspace-unique identifier for the new source, e.g. "prod-web-app".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.sourceobject
data.source.enabledboolean
data.source.idstring
data.source.namestring
data.source.slugstring
data.source.writeKeysarray of string

Also retrieved by: "hook up a new app to feed us data", "I need a fresh collection point for this website", "onboard our new mobile app into the pipeline", "start pulling events from a new place", "register a new place data can come in from".

segment.get_source

Get one Segment source by id: its slug, name, enabled state, and write keys. Use when the user names a specific source. For finding or browsing all sources, use list_sources.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /sources/{{params.source_id}}.

Arguments:

ArgumentTypeRequiredNotes
source_idstringyesSegment source id, e.g. "src_2VbA1u9ZpQx7Nk".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.sourceobject
data.source.enabledboolean
data.source.idstring
data.source.namestring
data.source.slugstring
data.source.trackingPlanIdstring
data.source.writeKeysarray of string

Also retrieved by: "pull up the details on this integration point", "what write keys does this app have", "check the setup for this specific input".

segment.list_sources

List sources in the workspace. Use when the user asks what sources, apps, or sites are set up in Segment, or wants to browse them all. For one known source, use get_source.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /sources.

Arguments:

ArgumentTypeRequiredNotes
cursorstringnoPagination cursor from a previous page's response.
limitintegernoResults per page. Defaults to 50.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.paginationobject
data.pagination.currentstring
data.pagination.totalEntriesinteger
data.sourcesarray of object
data.sources[].enabledboolean
data.sources[].idstring
data.sources[].namestring
data.sources[].slugstring

Also retrieved by: "what's feeding data into our workspace", "show every app and site we're collecting from", "browse all our collection points".

segment.update_source

Pause or resume a source, or rename it. Use when the user wants to turn a source's data collection on or off, or update its display name. Does not change the source's write keys or its type.

Class write (writes, no confirmation needed). Scopes sources:write. Calls PATCH /sources/{{params.source_id}}.

Arguments:

ArgumentTypeRequiredNotes
enabledbooleannoTrue to resume data collection, false to pause it.
namestringnoNew display name for the source.
source_idstringyesSegment source id to update.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.sourceobject
data.source.enabledboolean
data.source.idstring
data.source.namestring

Also retrieved by: "pause this app so it stops sending data", "turn collection back on for this integration", "rename this input to something clearer".

segment.delete_source

Permanently delete a source and stop it from collecting data. Irreversible; any app still using its write keys starts failing to send events. Use only when the user explicitly asks to delete or remove a source entirely, not just pause it.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes sources:write. Calls DELETE /sources/{{params.source_id}}.

Arguments:

ArgumentTypeRequiredNotes
source_idstringyesSegment source id to delete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "rip this integration out for good", "get rid of this collection point entirely", "we're done with this app, remove it completely".

segment.create_source_write_key

Issue a new write key for a source, so a second app instance or environment can send events under the same source. Use when the user wants to add, generate, or rotate in a new write key.

Class write (writes, no confirmation needed). Scopes sources:write. Calls POST /sources/{{params.source_id}}/writekey.

Arguments:

ArgumentTypeRequiredNotes
source_idstringyesSegment source id to issue a write key for.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.writeKeystring

Also retrieved by: "I need a second key for the staging build", "generate a fresh key so another instance can send data", "issue a new credential for this app to use".

segment.delete_source_write_key

Revoke one write key from a source. Irreversible; whatever was sending events with that key immediately stops being accepted. Use when the user wants to revoke, disable, or retire a specific write key, e.g. after a leak.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes sources:write. Calls DELETE /sources/{{params.source_id}}/writekey/{{params.write_key}}.

Arguments:

ArgumentTypeRequiredNotes
source_idstringyesSegment source id the write key belongs to.
write_keystringyesThe write key to revoke.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "that key leaked, kill it", "revoke the old credential, we rotated it", "shut off access for this specific key".

segment.list_source_catalog

Browse the catalog of source types Segment supports (web, mobile, server, cloud-app), each with the metadata id create_source needs. Use when the user asks what kind of source to add, or is looking for a specific source type by name.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /catalog/sources.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.
searchstringnoFilter catalog entries by name, e.g. "ios" or "shopify".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.sourcesarray of object
data.sources[].categoriesarray of string
data.sources[].idstring
data.sources[].namestring
data.sources[].slugstring

Also retrieved by: "what kinds of apps can we hook up", "is there a ready-made option for an iOS app", "browse the available integration types", "what platforms does this support as an input".

segment.create_destination

Connect a new destination to a source, so its data starts flowing to a tool like an analytics suite or ad platform. Use when the user wants to add, connect, or turn on a destination. Needs a catalog metadata id for the destination type (see list_destination_catalog).

Class write (writes, no confirmation needed). Scopes destinations:write. Calls POST /destinations.

Arguments:

ArgumentTypeRequiredNotes
configobjectnoDestination-specific settings, e.g. {"apiKey": "..."} for the chosen destination type.
enabledbooleannoWhether data starts flowing immediately. Defaults to true.
metadata_idstringyesSegment catalog id for the destination type, from list_destination_catalog.
source_idstringyesSegment source id the destination receives data from.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.destinationobject
data.destination.enabledboolean
data.destination.idstring
data.destination.namestring

Also retrieved by: "route this app's data over to our analytics tool", "hook this source up to an ad platform", "start sending events to a new downstream tool", "connect our warehouse-adjacent tool as an output".

segment.get_destination

Get one destination by id: its name, enabled state, and config. Use when the user names a specific destination. For finding or browsing all destinations on a source, use list_destinations.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /destinations/{{params.destination_id}}.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id, e.g. "dst_2VbA1u9ZpQx7Nk".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.destinationobject
data.destination.configobject
data.destination.enabledboolean
data.destination.idstring
data.destination.namestring
data.destination.sourceIdstring

Also retrieved by: "check the config on this downstream connection", "is this output still turned on", "pull up what this specific output is set to".

segment.list_destinations

List destinations, optionally filtered by source. Use when the user asks where a source's data flows to, or wants to see every destination connected in the workspace.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /destinations.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.
source_idstringnoOnly destinations connected to this source id.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.destinationsarray of object
data.destinations[].enabledboolean
data.destinations[].idstring
data.destinations[].namestring
data.destinations[].sourceIdstring

Also retrieved by: "where does this app's data end up going", "show every tool we're forwarding events to", "what's this source connected to downstream".

segment.update_destination

Turn a destination on or off, or change its config. Use when the user wants to enable, disable, or reconfigure where a source's data is delivered.

Class write (writes, no confirmation needed). Scopes destinations:write. Calls PATCH /destinations/{{params.destination_id}}.

Arguments:

ArgumentTypeRequiredNotes
configobjectnoReplacement destination-specific settings.
destination_idstringyesSegment destination id to update.
enabledbooleannoTrue to resume delivery, false to pause it.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.destinationobject
data.destination.enabledboolean
data.destination.idstring

Also retrieved by: "flip this output off for now", "swap the api key on this downstream connection", "turn delivery back on for this tool".

segment.delete_destination

Permanently remove a destination. Irreversible; data stops flowing there and its config is not recoverable. Use only when the user explicitly asks to delete or disconnect a destination entirely, not just pause it.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes destinations:write. Calls DELETE /destinations/{{params.destination_id}}.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id to delete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "cut the feed to this analytics tool entirely", "unhook this downstream connection for good", "stop sending anything there, remove it completely".

segment.get_destination_delivery_metrics

Get a destination's delivery health: how many events succeeded or were dropped recently. Use when the user asks whether a destination is actually receiving data, or wants to check for delivery errors.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /destinations/{{params.destination_id}}/delivery-metrics.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id to check.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.errorCountinteger
data.lastEventAtstring
data.successCountinteger

Also retrieved by: "is this tool actually getting our data", "check for delivery failures on this output", "how many events bounced going to this destination".

segment.list_destination_catalog

Browse the catalog of destination types Segment supports (analytics tools, ad platforms, warehouses, and more), each with the metadata id create_destination needs. Use when the user asks whether Segment has a ready integration for a specific tool to send data to, or is picking one to connect.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /catalog/destinations.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.
searchstringnoFilter catalog entries by name, e.g. "amplitude" or "google ads".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.destinationsarray of object
data.destinations[].categoriesarray of string
data.destinations[].idstring
data.destinations[].namestring
data.destinations[].slugstring

Also retrieved by: "do you support amplitude as an output", "what tools can we forward data to", "browse the list of things we could connect downstream".

segment.create_destination_subscription

Add a subscription rule to a destination, filtering which events it receives. Use when the user wants to send only certain events, e.g. just track calls or one event name, to a particular destination.

Class write (writes, no confirmation needed). Scopes destinations:write. Calls POST /destinations/{{params.destination_id}}/subscriptions.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id to add a subscription to.
enabledbooleannoWhether the rule is active. Defaults to true.
namestringyesLabel for this subscription rule.
subscribestringyesFilter expression selecting which events match, e.g. "type = \"track\" and event = \"Order Completed\"".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.subscriptionobject
data.subscription.enabledboolean
data.subscription.idstring
data.subscription.namestring
data.subscription.subscribestring

Also retrieved by: "only forward checkout events to this tool", "filter what this output actually receives", "set up a rule so only one event type goes through".

segment.list_destination_subscriptions

List the event filter subscriptions configured on a destination. Use when the user asks which events go to a destination, or wants to review its filtering rules before changing them.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /destinations/{{params.destination_id}}/subscriptions.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id to list subscriptions for.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.subscriptionsarray of object
data.subscriptions[].enabledboolean
data.subscriptions[].idstring
data.subscriptions[].namestring
data.subscriptions[].subscribestring

Also retrieved by: "what filters are on this connection right now", "show the rules deciding what gets through to this tool", "what's currently being forwarded here and what's blocked".

segment.delete_destination_subscription

Remove an event filter subscription from a destination. Irreversible; without it the destination falls back to whatever broader default it had, which may mean it starts receiving events it was previously filtered from. Use when the user wants to remove or cancel a specific filtering rule.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes destinations:write. Calls DELETE /destinations/{{params.destination_id}}/subscriptions/{{params.subscription_id}}.

Arguments:

ArgumentTypeRequiredNotes
destination_idstringyesSegment destination id the subscription belongs to.
subscription_idstringyesSubscription id to remove.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "drop that filtering rule, send everything again", "remove this specific forwarding condition", "take off the restriction on what reaches this tool".

segment.create_tracking_plan

Create a new tracking plan, the named collection of event rules a workspace validates data against. Use when the user wants to start, set up, or draft a new tracking plan or data governance spec.

Class write (writes, no confirmation needed). Scopes tracking-plans:write. Calls POST /tracking-plans.

Arguments:

ArgumentTypeRequiredNotes
descriptionstringnoWhat this tracking plan governs, e.g. "checkout funnel events".
namestringyesDisplay name for the tracking plan.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.trackingPlanobject
data.trackingPlan.idstring
data.trackingPlan.namestring
data.trackingPlan.slugstring

Also retrieved by: "start a new spec for what our events should look like", "draft up a governance doc for our checkout events", "set up a fresh schema plan for the team".

segment.get_tracking_plan

Get one tracking plan by id: its name, description, and last updated time. Use when the user names a specific tracking plan. For its rules, use list_tracking_plan_rules.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /tracking-plans/{{params.tracking_plan_id}}.

Arguments:

ArgumentTypeRequiredNotes
tracking_plan_idstringyesSegment tracking plan id, e.g. "rs_2VbA1u9ZpQx7Nk".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.trackingPlanobject
data.trackingPlan.descriptionstring
data.trackingPlan.idstring
data.trackingPlan.namestring
data.trackingPlan.updatedAtstring

Also retrieved by: "pull up the details on this governance spec", "what does this event spec cover", "when was this schema doc last touched".

segment.list_tracking_plans

List tracking plans in the workspace. Use when the user asks what tracking plans exist, or wants to browse them before picking one to edit or attach a source to.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /tracking-plans.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.trackingPlansarray of object
data.trackingPlans[].idstring
data.trackingPlans[].namestring

Also retrieved by: "what schemas do we have defined", "show every governance plan in the workspace", "browse the specs we're enforcing across the team".

segment.update_tracking_plan

Rename a tracking plan or change its description. Use when the user wants to edit a tracking plan's name or documentation. For its rules, use upsert_tracking_plan_rule instead.

Class write (writes, no confirmation needed). Scopes tracking-plans:write. Calls PATCH /tracking-plans/{{params.tracking_plan_id}}.

Arguments:

ArgumentTypeRequiredNotes
descriptionstringnoNew description text.
namestringnoNew display name.
tracking_plan_idstringyesSegment tracking plan id to update.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.trackingPlanobject
data.trackingPlan.descriptionstring
data.trackingPlan.idstring
data.trackingPlan.namestring

Also retrieved by: "rename this event spec", "update the description on our schema doc", "change what this governance doc is called".

segment.delete_tracking_plan

Permanently delete a tracking plan and every rule it holds. Irreversible; sources connected to it stop being validated against it. Use only when the user explicitly asks to delete or remove a tracking plan entirely.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes tracking-plans:write. Calls DELETE /tracking-plans/{{params.tracking_plan_id}}.

Arguments:

ArgumentTypeRequiredNotes
tracking_plan_idstringyesSegment tracking plan id to delete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "scrap this whole schema spec", "remove this governance plan and everything in it", "wipe out this data governance doc for good".

segment.list_tracking_plan_rules

List the event rules in a tracking plan: each rule's event key, call type (track, identify, group, page, screen, or alias), and validation schema. Use when the user asks what events a tracking plan defines, wants every event definition it holds, or wants to check whether a specific event already has a rule.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /tracking-plans/{{params.tracking_plan_id}}/rules.

Arguments:

ArgumentTypeRequiredNotes
tracking_plan_idstringyesSegment tracking plan id to list rules for.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.rulesarray of object
data.rules[].jsonSchemaobject
data.rules[].keystring
data.rules[].typestring
data.rules[].versioninteger

Also retrieved by: "what events does this plan actually define", "is there already a schema for the signup event", "show every rule this spec enforces".

segment.upsert_tracking_plan_rule

Add or update the validation rule for one event in a tracking plan, defining what a valid track, identify, group, page, screen, or alias call for that event must look like. Use when the user wants to define, approve, or change the schema for a specific event name. This is how a track/identify/group/page event gets governed, not how one is sent live.

Class write (writes, no confirmation needed). Scopes tracking-plans:write. Calls PATCH /tracking-plans/{{params.tracking_plan_id}}/rules.

Arguments:

ArgumentTypeRequiredNotes
event_keystringyesEvent name the rule governs, e.g. "Order Completed".
event_typestring, one of TRACK, IDENTIFY, GROUP, PAGE, SCREEN, ALIASyesWhich kind of call this rule validates.
json_schemaobjectyesJSON Schema the event's properties or traits must satisfy.
tracking_plan_idstringyesSegment tracking plan id to add the rule to.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.rulesarray of object
data.rules[].keystring
data.rules[].typestring
data.rules[].versioninteger

Also retrieved by: "define what a valid signup event should contain", "lock in the required fields for this event name", "approve the shape of this specific event", "set the schema for what counts as a real page view here".

segment.delete_tracking_plan_rule

Remove the validation rule for one event from a tracking plan. Irreversible; that event stops being checked against a schema. Use when the user wants to drop, retire, or stop enforcing a rule for a specific event name.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes tracking-plans:write. Calls DELETE /tracking-plans/{{params.tracking_plan_id}}/rules.

Arguments:

ArgumentTypeRequiredNotes
event_keystringyesEvent name whose rule should be removed.
event_typestring, one of TRACK, IDENTIFY, GROUP, PAGE, SCREEN, ALIASyesWhich kind of call the rule being removed validates.
tracking_plan_idstringyesSegment tracking plan id the rule belongs to.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "stop enforcing a schema on this event name", "drop the validation rule for this one event", "let this specific event through unchecked from now on".

segment.connect_source_to_tracking_plan

Attach a source to a tracking plan, so events coming from it are validated against the plan's rules. Use when the user wants to apply, enforce, or turn on a tracking plan for a specific source.

Class write (writes, no confirmation needed). Scopes tracking-plans:write. Calls POST /tracking-plans/{{params.tracking_plan_id}}/sources.

Arguments:

ArgumentTypeRequiredNotes
source_idsarray of stringyesOne or more Segment source ids to connect to this plan.
tracking_plan_idstringyesSegment tracking plan id to attach.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.connectionsarray of object
data.connections[].sourceIdstring

Also retrieved by: "make this app follow our event spec", "enforce the governance plan on this input", "apply this schema to a specific source".

segment.list_tracking_plan_sources

List the sources a tracking plan is attached to. Use when the user asks which sources a tracking plan governs, or wants to check before disconnecting one.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /tracking-plans/{{params.tracking_plan_id}}/sources.

Arguments:

ArgumentTypeRequiredNotes
tracking_plan_idstringyesSegment tracking plan id to list connected sources for.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.sourcesarray of object
data.sources[].sourceIdstring

Also retrieved by: "which apps are following this schema", "what's this governance plan actually enforced on", "show everything checked against this spec right now".

segment.disconnect_source_from_tracking_plan

Detach a source from a tracking plan. Its events stop being validated against that plan's rules, which can let previously rejected event shapes through unnoticed. Use when the user wants to unlink, remove, or stop enforcing a tracking plan on a source.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes tracking-plans:write. Calls DELETE /tracking-plans/{{params.tracking_plan_id}}/sources.

Arguments:

ArgumentTypeRequiredNotes
source_idsarray of stringyesOne or more Segment source ids to disconnect.
tracking_plan_idstringyesSegment tracking plan id to detach from.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "stop checking this app's data against the spec", "unlink this source from the governance plan", "this app no longer needs to follow that schema".

segment.list_warehouses

List data warehouses connected to the workspace. Use when the user asks what warehouses Segment syncs data to, or wants to pick one to inspect further.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /warehouses.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.warehousesarray of object
data.warehouses[].idstring
data.warehouses[].namestring

Also retrieved by: "what data warehouses are we synced to", "show every place our data gets loaded into", "browse all our database sync targets".

segment.get_warehouse

Get one warehouse by id: its name and sync settings. Use when the user names a specific warehouse rather than browsing all of them.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /warehouses/{{params.warehouse_id}}.

Arguments:

ArgumentTypeRequiredNotes
warehouse_idstringyesSegment warehouse id, e.g. "wh_2VbA1u9ZpQx7Nk".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.warehouseobject
data.warehouse.idstring
data.warehouse.namestring
data.warehouse.settingsobject

Also retrieved by: "check the sync settings on this warehouse", "pull up details for this specific warehouse connection", "what database is this one actually pointed at".

segment.create_warehouse

Connect a new data warehouse to the workspace so Segment can sync data into it. Use when the user wants to add, connect, or set up a new warehouse destination such as a SQL data warehouse.

Class write (writes, no confirmation needed). Scopes warehouses:write. Calls POST /warehouses.

Arguments:

ArgumentTypeRequiredNotes
metadata_idstringyesSegment catalog id for the warehouse type.
namestringyesDisplay name for the warehouse connection.
settingsobjectnoWarehouse-specific connection settings, e.g. host and database.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.warehouseobject
data.warehouse.idstring
data.warehouse.namestring

Also retrieved by: "hook up a new data warehouse for syncing", "connect our database so data lands there too", "set up a new sync target for our analytics database".

segment.delete_warehouse

Permanently disconnect a warehouse. Irreversible; syncing into it stops and the connection settings are not recoverable. Use only when the user explicitly asks to remove a warehouse entirely.

Class destructive (held by the mutation gate until the call's own arguments carry "confirm": true). Scopes warehouses:write. Calls DELETE /warehouses/{{params.warehouse_id}}.

Arguments:

ArgumentTypeRequiredNotes
warehouse_idstringyesSegment warehouse id to delete.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
deletedboolean

Also retrieved by: "cut the sync to this warehouse for good", "disconnect this database entirely", "stop loading data into this destination database".

segment.list_labels

List the workspace labels available to tag sources with, e.g. team or environment labels. Use when the user asks what labels exist before tagging or filtering sources by one.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /labels.

Arguments:

ArgumentTypeRequiredNotes
limitintegernoResults per page. Defaults to 50.

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.labelsarray of object
data.labels[].descriptionstring
data.labels[].keystring
data.labels[].valuestring

Also retrieved by: "what tags can we put on our sources", "show the labels available for organizing apps", "browse the categories we can file things under".

segment.get_event_volume

Get how many events the workspace received over time, optionally filtered by source or event name. Use when the user asks whether data is flowing at all, wants to check tracking volume, or is debugging why a source looks quiet.

Class read (reads only). No scopes beyond the connection's defaults. Calls GET /events/volume.

Arguments:

ArgumentTypeRequiredNotes
end_datestringnoEnd of the date range, e.g. "2026-07-30".
eventstringnoOnly count this specific event name.
source_idstringnoOnly count events from this source id.
start_datestringnoStart of the date range, e.g. "2026-07-01".

Result fields (the payload is trimmed to these before it reaches the model):

FieldTypeNotes
dataobject
data.volumearray of object
data.volume[].countinteger
data.volume[].timestampstring

Also retrieved by: "is data actually flowing right now", "why does this app look quiet lately", "how many events came in this week", "check whether tracking is actually working".