MMetadata /docs
Docs/Tools/create_segment

create_segment

Create a new segment with insights criteria.

Writes audiences

Creates or changes something in the account. Put it behind whatever review your agent uses.

What it does

Create a new segment with insights criteria.

WORKFLOW:
1. Use search_insights_criteria_fields to discover valid fields
2. Build criteria object
3. Call create_segment with name and criteria

CRITERIA STRUCTURE:
{"operator": "AND|OR", "match": [{field, operator, type, value}, ...]}

FIELD TYPES: MULTIPICKLIST (array of {name,label}), PICKLIST (single {name,label}), STRING, NUMERIC, BOOLEAN, DATE

OPERATORS: AND, OR, EQUALS, NOT_EQUAL, LIKE, NOT_LIKE, IN, NOT_IN, CONTAINS, GREATER_THAN, GREATER_OR_EQUAL, LESS_THAN, LESS_OR_EQUAL, IN_THE_LAST, NOT_IN_THE_LAST, BETWEEN, IN_THE_NEXT, EXISTS, NOT_EXISTS

RETURNS: {id, name, criteria, status, createdDate}
STATUS: READY (usable), PENDING (processing), FAILED (error)

EXAMPLE:
{"name": "High Engagement", "criteria": {"operator": "AND", "match": [{"field": "ENGAGEMENT_SCORE_CLASSIFICATION", "operator": "IN", "type": "MULTIPICKLIST", "value": [{"name": "HIGH", "label": "High"}]}]}}

Arguments

ArgumentTypeNotes
name string required Descriptive, unique segment name.
criteria object required Criteria object with operator and match fields.

Request

curl
curl -s -X POST https://mcp-server.metadata.io/mcp \
  -H "Authorization: $METADATA_PAT" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "MCP-Protocol-Version: 2025-11-25" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"create_segment","arguments":{"name":"<name>","criteria":{}}}}'

Response

No recorded response. This tool writes to the account, so it is never executed to build these docs. The request above is still the exact shape to send. Nothing on this page is invented.

Other audiences tools:

All 160 tools · machine-readable index