Skip to main content
Glama
pushengage-mcp

pushengage-mcp

Create an audience group

pushengage_create_audience_group

Create a PushEngage audience group by filtering subscribers by device, location, engagement, or signup date to target push notification campaigns to specific audiences.

Instructions

Creates a new audience group on the current site. Required: name and filter. The filter is a subscriber-filter expression — { op: "or" (the only supported value), value: 2-D array of rule groups }. Each rule is { field, op, value?, key? }. Rules WITHIN a group are AND-ed; groups in value are OR-ed, so conditions that must all hold go in ONE group. See the inputSchema field descriptions for the supported field and op enums. Common patterns: "Mobile subscribers" → filter={ op: "or", value: [[{ field: "device", op: "in", value: ["mobile"] }]] }. "Subscribed in the last 7 days" → filter={ op: "or", value: [[{ field: "ts_created", op: "ts_elapsed_lt", value: 10080 }]] } (ts_elapsed_* is in MINUTES: 7 × 1440). "Highly engaged" (≥20 sent AND ≥2 clicks) → filter={ op: "or", value: [[{ field: "sent_count", op: "gt", value: 20 }, { field: "click_count", op: "gt", value: 2 }]] }. "Sports Fans segment on mobile" → filter={ op: "or", value: [[{ field: "segments", op: "in", value: ["Sports Fans"] }, { field: "device", op: "in", value: ["mobile"] }]] } — segment NAMES are resolved to ids automatically. Call pushengage_list_audience_filter_values before any country/state/city/device/device_type rule and pushengage_list_attributes before any attributes rule: those values are site-specific, and a guessed one saves successfully but matches nobody. Only set description and complex filters when the user explicitly describes them.

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": {
      "name": "<name>",
      "filter": "<filter>"
    },
    "name": "pushengage_create_audience_group"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesAudience-group display name. 1–150 chars.
filterYesRequired. The subscriber-filter expression that decides which subscribers belong to this group. Use SubscriberFilterSchema: an outer op ("or"/"and") + a 2-D `value` array (groups of AND-ed rules). Each rule is { field, op, value?, key? }. Example — "all mobile subscribers": { op: "or", value: [[{ field: "device", op: "in", value: ["mobile"] }]] }. Example — "subscribed in the last 7 days": { op: "or", value: [[{ field: "ts_created", op: "ts_elapsed_lt", value: 10080 }]] }. (ts_elapsed_* values are MINUTES: 10080 = 7 × 24 × 60.)
site_idNoOverride the currently selected site.
descriptionNoOptional human-readable description, up to 256 chars.

Output Schema

NameRequiredDescriptionDefault
idNo
nameNo
filterNo
view_urlNo
descriptionNo
use_with_send_notificationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv1.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / filter / additionalProperties
      Removed value: -false
    • removedInput schema / properties / filter / properties / value / items / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / site_id / maximum
      Added value: +9007199254740991
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
    • changedOutput schema / properties / use_with_send_notification / additionalProperties
      Previous value: -trueNew value: +{}
  2. Changed12 schema fields changedv1.1.0
    • changedInput schema / properties / filter / description
      Previous value: -"Required. The subscriber-filter expression that decides which subscribers belong to this group. Use SubscriberFilterSchema: an outer op (\"or\"/\"and\") + a 2-D `value` array (groups of AND-ed rules). Each rule is { field, op, value?, key? }. Example — \"all mobile subscribers\": { op: \"or\", value: [[{ field: \"device\", op: \"in\", value: [\"mobile\"] }]] }. Example — \"subscribed in the last 7 days\": { op: \"or\", value: [[{ field: \"ts_created\", op: \"ts_elapsed_lt\", value: 604800 }]] }. (604800 = 7 × 24 × 3600 seconds.)"New value: +"Required. The subscriber-filter expression that decides which subscribers belong to this group. Use SubscriberFilterSchema: an outer op (\"or\"/\"and\") + a 2-D `value` array (groups of AND-ed rules). Each rule is { field, op, value?, key? }. Example — \"all mobile subscribers\": { op: \"or\", value: [[{ field: \"device\", op: \"in\", value: [\"mobile\"] }]] }. Example — \"subscribed in the last 7 days\": { op: \"or\", value: [[{ field: \"ts_created\", op: \"ts_elapsed_lt\", value: 10080 }]] }. (ts_elapsed_* values are MINUTES: 10080 = 7 × 24 × 60.)"
    • changedInput schema / properties / filter / properties / op / description
      Previous value: -"How groups in `value` combine: \"or\" (default) means a subscriber matches if ANY group matches; \"and\" means EVERY group must match. Rules WITHIN a group are always AND-ed together."New value: +"How groups in `value` combine. Only \"or\" is supported: a subscriber matches if ANY group matches. Rules WITHIN a group are always AND-ed, so use one group to require several conditions together. To AND across groups, create the audience in the dashboard instead."
    • changedInput schema / properties / filter / properties / op / enum
      Previous value: -[
      -  "or",
      -  "and"
      -]New value: +[
      +  "or"
      +]
    • addedInput schema / properties / filter / properties / timezone
      Added value: +{
      +  "description": "OPTIONAL. The IANA timezone that this filter's DATE values are written in, e.g. \"Asia/Kolkata\". Applies to absolute comparisons on ts_created / ts_last_sent / ts_last_click / ts_last_view, and to dt_gt / dt_lt on attributes. Date values in a filter are interpreted as UTC by default, so set this whenever the user gives a date in their own timezone (\"subscribed after 1 January my time\") — the values are converted to UTC before sending and the response reports what was converted. It does NOT affect ts_elapsed_gt / ts_elapsed_lt, which are durations in minutes and carry no timezone. Use a full zone name; abbreviations like IST or PST are rejected. Note this is unrelated to `schedule_timezone`, which concerns WHEN the notification is sent and is interpreted against the site's timezone rather than UTC.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / properties / filter / properties / value / description
      Previous value: -"2-D array: outer is a list of rule-groups (max 15), each inner group is an AND-ed list of rules (1–50). With the default top-level op=\"or\", subscribers match the audience if any group's rules all match."New value: +"2-D array: outer is a list of rule-groups (max 15), each inner group is an AND-ed list of rules (1–50). With the default op=\"or\", a subscriber matches if any group's rules all match."
    • changedInput schema / properties / filter / properties / value / items / items / properties / field / description
      Previous value: -"Which subscriber attribute the rule matches against. See the field enum for the supported list."New value: +"Which subscriber property to match. Each field accepts only certain operators — see `op`."
    • changedInput schema / properties / filter / properties / value / items / items / properties / field / enum
      Previous value: -[
      -  "attributes",
      -  "city",
      -  "click_count",
      -  "country",
      -  "device",
      -  "device_token_hash",
      -  "device_type",
      -  "profile_id",
      -  "segment",
      -  "segments",
      -  "sent_count",
      -  "state",
      -  "ts_created",
      -  "ts_last_click",
      -  "ts_last_sent",
      -  "ts_last_view",
      -  "view_count"
      -]New value: +[
      +  "attributes",
      +  "city",
      +  "click_count",
      +  "country",
      +  "device",
      +  "device_token_hash",
      +  "device_type",
      +  "profile_id",
      +  "segments",
      +  "sent_count",
      +  "state",
      +  "ts_created",
      +  "ts_last_click",
      +  "ts_last_sent",
      +  "ts_last_view",
      +  "view_count"
      +]
    • changedInput schema / properties / filter / properties / value / items / items / properties / key / description
      Previous value: -"Required ONLY when field=\"attributes\" — the custom-attribute key to look up. Ignored otherwise."New value: +"Required ONLY when field=\"attributes\" — the attribute key to look up. Call pushengage_list_attributes to discover valid keys. Must be omitted for every other field."
    • addedInput schema / properties / filter / properties / value / items / items / properties / key / maxLength
      Added value: +64
    • addedInput schema / properties / filter / properties / value / items / items / properties / key / pattern
      Added value: +"^[A-Za-z][A-Za-z0-9_-]*$"
    • changedInput schema / properties / filter / properties / value / items / items / properties / op / description
      Previous value: -"How to compare. Some ops (exists, not_exists) take no value; some (in/nin/all) take an array; ts_elapsed_gt/lt takes seconds."New value: +"Comparison operator. Allowed values depend on `field`: country/state/city/device/device_type → in, nin. segments → in (any of), all (all of), nin (none of). sent_count/view_count/click_count → eq, lt, gt, lte, gte. ts_created/ts_last_sent/ts_last_view/ts_last_click → lt (before), gt (after), ts_elapsed_lt (in the last N minutes), ts_elapsed_gt (older than N minutes). profile_id/device_token_hash → in. attributes → any operator, including exists / not_exists."
    • changedInput schema / properties / filter / properties / value / items / items / properties / value / description
      Previous value: -"The match value. Omit for exists/not_exists. Use an array for in/nin/all. Use seconds (integer) for ts_elapsed_gt/lt."New value: +"The match value. Omit entirely for exists / not_exists. Array for in / nin / all. Positive integer number of MINUTES for ts_elapsed_gt / ts_elapsed_lt — 60 = one hour, 1440 = one day, 10080 = seven days. Multiply days by 1440. For segments, pass segment NAMES as strings (resolved automatically) or numeric segment IDs."
  3. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already mark this as a non-readonly, open-world, non-idempotent create, so safety is covered; the description goes well beyond them. It discloses the failure mode that an invalid-but-well-formed filter saves silently and matches nobody, that segment names are auto-resolved to ids, and the AND/OR composition semantics, none of which the annotations convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads purpose, required params, and the filter shape, then examples, then the validation prerequisite. It is dense but nearly every clause carries information; the four worked examples are somewhat repetitive with the schema's own examples, and the critical 'guessed value matches nobody' warning sits at the very end where it is easy to miss.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be described; the description instead covers the risky parts of invocation — filter construction, site-specific value validation, timezone handling. For a nested-filter creation tool this is complete enough to call correctly on the first attempt.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3; the description adds the composition rule ('rules WITHIN a group are AND-ed; groups are OR-ed, so conditions that must all hold go in ONE group') and worked natural-language-to-filter mappings that help build the nested structure. Much of the detail (minutes units, segment name resolution, timezone) duplicates the already-rich schema, so it does not fully clear the 5 bar.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Creates a new audience group on the current site') and immediately names the two required parameters. An agent can distinguish it from pushengage_list_audience_groups, pushengage_create_segment, and pushengage_create_attribute without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit prerequisite routing: call pushengage_list_audience_filter_values before any country/state/city/device/device_type rule and pushengage_list_attributes before any attributes rule, with the reason stated ('a guessed one saves successfully but matches nobody'). Also scopes optional behavior ('Only set description and complex filters when the user explicitly describes them'), which is effectively a when-not rule.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.