Skip to main content
Glama
pushengage-mcp

pushengage-mcp

Create a segment

pushengage_create_segment

Create a push notification subscriber segment by name, with optional URL include/exclude rules to define membership on subscribe or on every page visit.

Instructions

Creates a new segment on the current site. Required: segment_name. Optionally pass segment_criteria with URL include and/or exclude rules to define what subscribers belong to the segment — each rule is { rule: "start" | "exact" | "contains", value: "<url>" }. By default, segment criteria are evaluated only when a visitor subscribes to push notifications. Set add_segment_on_page_load=true (Segment on Page Visit) to evaluate those criteria on every page visit instead, so segment membership can change as subscribers browse the site. Only include segment_criteria and add_segment_on_page_load when the user explicitly describes the matching rules.

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": {
      "segment_name": "<segment_name>"
    },
    "name": "pushengage_create_segment"
  }
}

Input Schema

NameRequiredDescriptionDefault
site_idNoOverride the currently selected site.
segment_nameYesSegment display name. 1–150 characters.
segment_criteriaNoURL-based include/exclude rules that decide which subscribers belong to this segment. Omit to create a name-only segment that the user populates later via the dashboard or workflows. When provided, at least one of `include` or `exclude` must have rules.
add_segment_on_page_loadNoSegment on Page Visit. By default (false), segment criteria (such as URL rules) are evaluated only when a visitor subscribes to push notifications. Set to true to evaluate those criteria on every page visit instead, so segment membership can change as subscribers browse your site.

Output Schema

NameRequiredDescriptionDefault
view_urlNo
segment_idNo
segment_nameNo
segment_criteriaNo
add_segment_on_page_loadNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changedv1.2.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / segment_criteria / additionalProperties
      Removed value: -false
    • removedInput schema / properties / segment_criteria / properties / exclude / items / $ref
      Removed value: -"#/properties/segment_criteria/properties/include/items"
    • addedInput schema / properties / segment_criteria / properties / exclude / items / properties
      Added value: +{
      +  "rule": {
      +    "description": "How the URL match is evaluated: \"start\" — the subscriber's page URL starts with `value`; \"exact\" — the URL exactly equals `value`; \"contains\" — the URL contains `value`.",
      +    "enum": [
      +      "start",
      +      "exact",
      +      "contains"
      +    ],
      +    "type": "string"
      +  },
      +  "value": {
      +    "description": "The URL or URL fragment to match against, per the chosen rule.",
      +    "maxLength": 2048,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / segment_criteria / properties / exclude / items / required
      Added value: +[
      +  "rule",
      +  "value"
      +]
    • addedInput schema / properties / segment_criteria / properties / exclude / items / type
      Added value: +"object"
    • removedInput schema / properties / segment_criteria / properties / include / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / site_id / maximum
      Added value: +9007199254740991
    • changedOutput schema / additionalProperties
      Previous value: -trueNew value: +{}
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-idempotent, open-world mutation, so the description's job is to add semantics — and it does, explaining that criteria evaluation timing (subscribe vs. every page visit) determines how membership changes over time, and that omitting criteria yields a name-only segment populated later. It does not address duplicate-name behavior or the fact that repeats create distinct segments, which matters given idempotentHint=false.

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 the required field and creation scope, then proceeds to optional behavior in a logical order with a clear closing constraint. It is somewhat long and duplicates the schema's rule enum explanation verbatim, which is the main trim opportunity, but no sentence is purely filler.

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

Completeness4/5

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

The presence of an output schema relieves the description of explaining return values, and annotations cover the safety profile, so what remains is parameter behavior and defaults — both covered well, including the nested include/exclude structure and the page-visit mode. Remaining gaps (duplicate segment names, site_id interaction with the currently selected site) are minor for a create tool of this complexity.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents segment_name length limits, the site_id override, the rule enum, and the add_segment_on_page_load default. The description largely restates the rule enum values and default rather than adding new meaning; its only added value is the conditional instruction on when to supply these fields, which is usage guidance rather than semantics. Baseline 3 is appropriate.

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?

Opens with a specific verb and resource plus scope: "Creates a new segment on the current site." The following sentences define what a segment is (URL include/exclude rules over subscribers), which cleanly separates it from sibling creators like create_attribute and create_audience_group without needing to name them.

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

Usage Guidelines4/5

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

Gives explicit when-to guidance for the optional fields: criteria are evaluated on subscribe by default, and add_segment_on_page_load=true switches to page-visit evaluation. It also warns to only pass segment_criteria and add_segment_on_page_load when the user explicitly describes matching rules. It stops short of naming any alternative tool or saying when a name-only segment is preferable, so it is strong but not exhaustive.

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