segment_sql
Retrieves the SQL statement for a specific segment by applying its filtering conditions to the parent audience SQL. Provide parent_segment_id and segment_id after finding IDs with the list tools.
Instructions
[EXPERIMENTAL] Get the SQL statement for a segment with filtering conditions applied to the parent segment (audience) SQL. Requires both parent_segment_id and segment_id parameters. Use list_parent_segments and list_segments first to find available IDs.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"parent_segment_id": "<parent_segment_id>",
"segment_id": "<segment_id>"
},
"name": "segment_sql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| segment_id | Yes | The segment ID (required). Use list_segments to find available IDs under the parent segment. | |
| parent_segment_id | Yes | The parent segment ID (required). Use list_parent_segments to find available IDs. |