Skip to main content
Glama
thenavidm

Kit MCP Server

by thenavidm

Filter subscribers by engagement, sign-up date, state, and tags

filter_subscribers
Read-onlyIdempotent

Filter newsletter subscribers by engagement, sign-up date, lifecycle state, tags, location, or custom fields to build targeted audience segments.

Instructions

Filter subscribers by engagement, sign-up date, state, and tags. Reads account data.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
allNo
accountNoNamed private account from KIT_ACCOUNTS. Defaults to KIT_DEFAULT_ACCOUNT or the first configured account.
includeNo
payloadNoComplete JSON body instead of individual body flags. Supports nullable fields and nested bulk structures. Cannot be combined with body flags or payload_file.
sort_fieldNo
sort_orderNoSort direction (default: desc).
payload_fileNoLocal JSON request body file, at most 5 MB. Contents are validated before the API call and are never logged.
counting_modeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed35 schema fields changedv3.0.0
    • addedInput schema / $defs
      Added value: +{
      +  "all": {
      +    "description": "Array of filter conditions where ALL must be met (AND logic)",
      +    "items": {
      +      "additionalProperties": false,
      +      "description": "A filter condition with type and optional parameters. Used within the 'all' array for complex filtering where multiple conditions must be met.",
      +      "properties": {
      +        "after": {
      +          "description": "Start date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      +          "format": "date",
      +          "type": "string"
      +        },
      +        "any": {
      +          "description": "Array of OR conditions. Subscriber activity must match ANY of these conditions. Engagement types accept broadcasts/URLs; 'tags' accepts tag id matchers; 'attribution' accepts attribution sub-conditions ('forms' or 'kit_source'). Not applicable for 'subscribed', 'subscriber_state', 'custom_field', or 'location' types.",
      +          "items": {
      +            "oneOf": [
      +              {
      +                "additionalProperties": false,
      +                "description": "Filter by specific broadcast IDs. Subscriber must have interacted with ANY of the specified broadcasts.",
      +                "properties": {
      +                  "ids": {
      +                    "description": "Array of broadcast IDs. Subscriber must match ANY of these.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "type": {
      +                    "description": "Must be 'broadcasts'",
      +                    "enum": [
      +                      "broadcasts"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type",
      +                  "ids"
      +                ],
      +                "title": "Broadcasts",
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "description": "Filter by URL patterns. Only applicable for 'clicks' type. Subscriber must have clicked ANY of the specified URLs.",
      +                "properties": {
      +                  "ids": {
      +                    "description": "Array of URL IDs. Subscriber must have clicked ANY of these.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "matching": {
      +                    "default": "exact",
      +                    "description": "URL matching strategy",
      +                    "enum": [
      +                      "exact",
      +                      "contains",
      +                      "starts_with",
      +                      "ends_with"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "type": {
      +                    "description": "Must be 'urls'",
      +                    "enum": [
      +                      "urls"
      +                    ],
      +                    "type": "string"
      +                  },
      +                  "urls": {
      +                    "description": "Array of URL patterns. Subscriber must have clicked ANY of these.",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  }
      +                },
      +                "required": [
      +                  "type"
      +                ],
      +                "title": "URLs (clicks only)",
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "description": "Match a list of ids. Used by the 'tags' filter to select tag ids.",
      +                "properties": {
      +                  "matching": {
      +                    "description": "Ids the filter should match against.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "type": {
      +                    "description": "Must be 'ids'",
      +                    "enum": [
      +                      "ids"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type",
      +                  "matching"
      +                ],
      +                "title": "Tag ids (tags only)",
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "description": "Attribution sub-condition: matches subscribers whose original signup attribution points at one of the given form / landing-page ids. Ids may refer to either a form or a legacy landing page : the attribution source does not distinguish between the two.",
      +                "properties": {
      +                  "ids": {
      +                    "description": "Form / landing-page ids the subscriber's attribution should match.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "type": {
      +                    "description": "Must be 'forms'",
      +                    "enum": [
      +                      "forms"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type",
      +                  "ids"
      +                ],
      +                "title": "Forms (attribution only)",
      +                "type": "object"
      +              },
      +              {
      +                "additionalProperties": false,
      +                "description": "Attribution sub-condition: matches subscribers whose original signup attribution row matches any combination of the supplied Kit source fields. All fields are optional; supplied fields are ANDed together against the same attribution row, and array fields (`source_ids`, `source_names`, `mechanism_ids`) match any value in the array. Known `source_type` values include `form_subscription` (form / landing-page signup), `api_subscription` (added via the API), and `manual` (added by the creator). Multiple entries in the parent `attribution` filter's `any` array are OR-ed together (consistent with `any` semantics elsewhere in this endpoint), so use separate entries to express \"kit_source A OR kit_source B\".",
      +                "properties": {
      +                  "mechanism": {
      +                    "description": "Match attribution rows whose `kit_source_mechanism` equals this value.",
      +                    "type": "string"
      +                  },
      +                  "mechanism_ids": {
      +                    "description": "Match attribution rows whose `kit_source_mechanism_id` is in this list.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "source_ids": {
      +                    "description": "Match attribution rows whose `kit_source_id` is in this list.",
      +                    "items": {
      +                      "type": "integer"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "source_names": {
      +                    "description": "Match attribution rows whose `kit_source_name` is in this list.",
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "source_type": {
      +                    "description": "Match attribution rows whose `kit_source_type` equals this value.",
      +                    "type": "string"
      +                  },
      +                  "type": {
      +                    "description": "Must be 'kit_source'",
      +                    "enum": [
      +                      "kit_source"
      +                    ],
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "type"
      +                ],
      +                "title": "Kit source (attribution only)",
      +                "type": "object"
      +              }
      +            ]
      +          },
      +          "type": "array"
      +        },
      +        "before": {
      +          "description": "End date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      +          "format": "date",
      +          "type": "string"
      +        },
      +        "comparison": {
      +          "description": "How `value` is matched against the stored custom-field value. `is` is exact equality, `contains` is a case-insensitive substring (blank `value` matches any subscriber that has a value stored for the field), `has_value` matches any non-empty stored value (ignores `value`), `greater_than` / `greater_than_or_equal` / `less_than` / `less_than_or_equal` compare numerically. Only applicable for 'custom_field' type.",
      +          "enum": [
      +            "is",
      +            "contains",
      +            "has_value",
      +            "greater_than",
      +            "greater_than_or_equal",
      +            "less_than",
      +            "less_than_or_equal"
      +          ],
      +          "type": "string"
      +        },
      +        "count_greater_than": {
      +          "description": "Minimum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      +          "type": "integer"
      +        },
      +        "count_greater_than_or_equal": {
      +          "description": "Minimum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      +          "type": "integer"
      +        },
      +        "count_less_than": {
      +          "description": "Maximum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      +          "type": "integer"
      +        },
      +        "count_less_than_or_equal": {
      +          "description": "Maximum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      +          "type": "integer"
      +        },
      +        "latitude": {
      +          "description": "Center latitude (decimal degrees). Required for the 'location' type. Combined with `longitude` and `radius` to form a bounding box around the point.",
      +          "format": "float",
      +          "type": "number"
      +        },
      +        "longitude": {
      +          "description": "Center longitude (decimal degrees). Required for the 'location' type.",
      +          "format": "float",
      +          "type": "number"
      +        },
      +        "radius": {
      +          "description": "Radius around (`latitude`, `longitude`) in miles. Required for the 'location' type. Subscribers whose primary location falls inside the bounding box pass the filter.",
      +          "type": "number"
      +        },
      +        "states": {
      +          "description": "Subscriber lifecycle states. Required for 'subscriber_state' type; ignored for other types. Subscribers matching any of the listed states pass the filter. Strongly recommended to use `['active']` unless you specifically need other states : most subscriber-facing queries elsewhere in the app scope to active subscribers by default.",
      +          "items": {
      +            "enum": [
      +              "active",
      +              "inactive",
      +              "bounced",
      +              "cancelled",
      +              "complained"
      +            ],
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "subscriber_custom_field_id": {
      +          "description": "Id of the custom field whose stored value is being filtered on. Required for 'custom_field' type; ignored for other types.",
      +          "type": "integer"
      +        },
      +        "type": {
      +          "description": "Type of filter condition. `attribution` matches subscribers by their *original signup attribution* : supports two sub-conditions: `forms` matches by the form / landing-page id the subscriber signed up through, and `kit_source` matches by any combination of the underlying Kit source fields (source type, source id, source name, mechanism, mechanism id). Attribution is the original signup source; it does not track current subscription state. `custom_field` matches subscribers by the value they have stored for a particular custom field, identified by `subscriber_custom_field_id`. `location` matches subscribers whose primary location falls within a `radius` (miles) of (`latitude`, `longitude`). All three fields are required.",
      +          "enum": [
      +            "opens",
      +            "clicks",
      +            "sent",
      +            "delivered",
      +            "subscribed",
      +            "subscriber_state",
      +            "tags",
      +            "attribution",
      +            "custom_field",
      +            "location"
      +          ],
      +          "type": "string"
      +        },
      +        "value": {
      +          "description": "Value to compare against. Used by 'custom_field' type together with `comparison`. For the numeric comparisons (`greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`) the value is parsed as a number; non-numeric stored values are excluded. Ignored when `comparison` is `has_value`.",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "counting_mode": {
      +    "description": "Controls how engagement-filter count thresholds are tallied. `raw` (default) counts every event : five opens of the same email = five. `unique_email` counts distinct emails on which the action occurred : five opens of the same email = one. Applies to every engagement filter (opens, clicks, sent, delivered) in the request; ignored for other filter types.",
      +    "enum": [
      +      "raw",
      +      "unique_email"
      +    ],
      +    "type": "string"
      +  },
      +  "include": {
      +    "description": "Optional. Array of `{ type, ...config }` objects naming additional fields to embed on each subscriber row. Valid types: `attribution`, `tags`, `location`, `canceled_at`, `stats`, `custom_fields`. The `stats` type accepts an optional `range: { start, end }` (YYYY-MM-DD dates, defaulting to the last 90 days). The `custom_fields` type adds a `fields` object with all account custom field values (null for fields the subscriber has not set).",
      +    "items": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "range": {
      +          "additionalProperties": false,
      +          "description": "Only used by the `stats` type. Date window for the engagement stats. Defaults to the last 90 days; clamped to the account's data-retention window.",
      +          "properties": {
      +            "end": {
      +              "format": "date",
      +              "type": "string"
      +            },
      +            "start": {
      +              "format": "date",
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": {
      +          "enum": [
      +            "attribution",
      +            "tags",
      +            "location",
      +            "canceled_at",
      +            "stats",
      +            "custom_fields"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  "sort_field": {
      +    "default": "created_at",
      +    "description": "Field to order results by. Base columns (`id`, `first_name`, `email_address`, `created_at`) order by that subscriber attribute. `engagement__ ` orders by an engagement stat over the trailing 90 days: counts (`sent`, `opens`, `clicks`) and rates (`open_rate`, `click_rate`); subscribers with no sends order as 0. `location__distance` orders by great-circle distance and requires a `location` filter in the same request : its `latitude`/`longitude` supply the origin, and subscribers without a primary location are excluded. Distance defaults to nearest-first (`sort_order` defaults to `asc` for this field); pass `sort_order=desc` for farthest-first.",
      +    "enum": [
      +      "id",
      +      "first_name",
      +      "email_address",
      +      "created_at",
      +      "engagement__sent",
      +      "engagement__opens",
      +      "engagement__clicks",
      +      "engagement__open_rate",
      +      "engagement__click_rate",
      +      "location__distance"
      +    ],
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / all / $ref
      Added value: +"#/$defs/all"
    • removedInput schema / properties / all / description
      Removed value: -"Array of filter conditions where ALL must be met (AND logic)"
    • removedInput schema / properties / all / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "A filter condition with type and optional parameters. Used within the 'all' array for complex filtering where multiple conditions must be met.",
      -  "properties": {
      -    "after": {
      -      "description": "Start date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "any": {
      -      "description": "Array of OR conditions. Subscriber activity must match ANY of these conditions. Engagement types accept broadcasts/URLs; 'tags' accepts tag id matchers; 'attribution' accepts attribution sub-conditions ('forms' or 'kit_source'). Not applicable for 'subscribed', 'subscriber_state', 'custom_field', or 'location' types.",
      -      "items": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": false,
      -            "description": "Filter by specific broadcast IDs. Subscriber must have interacted with ANY of the specified broadcasts.",
      -            "properties": {
      -              "ids": {
      -                "description": "Array of broadcast IDs. Subscriber must match ANY of these.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'broadcasts'",
      -                "enum": [
      -                  "broadcasts"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "ids"
      -            ],
      -            "title": "Broadcasts",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Filter by URL patterns. Only applicable for 'clicks' type. Subscriber must have clicked ANY of the specified URLs.",
      -            "properties": {
      -              "ids": {
      -                "description": "Array of URL IDs. Subscriber must have clicked ANY of these.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "matching": {
      -                "default": "exact",
      -                "description": "URL matching strategy",
      -                "enum": [
      -                  "exact",
      -                  "contains",
      -                  "starts_with",
      -                  "ends_with"
      -                ],
      -                "type": "string"
      -              },
      -              "type": {
      -                "description": "Must be 'urls'",
      -                "enum": [
      -                  "urls"
      -                ],
      -                "type": "string"
      -              },
      -              "urls": {
      -                "description": "Array of URL patterns. Subscriber must have clicked ANY of these.",
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "title": "URLs (clicks only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Match a list of ids. Used by the 'tags' filter to select tag ids.",
      -            "properties": {
      -              "matching": {
      -                "description": "Ids the filter should match against.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'ids'",
      -                "enum": [
      -                  "ids"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "matching"
      -            ],
      -            "title": "Tag ids (tags only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Attribution sub-condition: matches subscribers whose original signup attribution points at one of the given form / landing-page ids. Ids may refer to either a form or a legacy landing page : the attribution source does not distinguish between the two.",
      -            "properties": {
      -              "ids": {
      -                "description": "Form / landing-page ids the subscriber's attribution should match.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'forms'",
      -                "enum": [
      -                  "forms"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "ids"
      -            ],
      -            "title": "Forms (attribution only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Attribution sub-condition: matches subscribers whose original signup attribution row matches any combination of the supplied Kit source fields. All fields are optional; supplied fields are ANDed together against the same attribution row, and array fields (`source_ids`, `source_names`, `mechanism_ids`) match any value in the array. Known `source_type` values include `form_subscription` (form / landing-page signup), `api_subscription` (added via the API), and `manual` (added by the creator). Multiple entries in the parent `attribution` filter's `any` array are OR-ed together (consistent with `any` semantics elsewhere in this endpoint), so use separate entries to express \"kit_source A OR kit_source B\".",
      -            "properties": {
      -              "mechanism": {
      -                "description": "Match attribution rows whose `kit_source_mechanism` equals this value.",
      -                "type": "string"
      -              },
      -              "mechanism_ids": {
      -                "description": "Match attribution rows whose `kit_source_mechanism_id` is in this list.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "source_ids": {
      -                "description": "Match attribution rows whose `kit_source_id` is in this list.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "source_names": {
      -                "description": "Match attribution rows whose `kit_source_name` is in this list.",
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              },
      -              "source_type": {
      -                "description": "Match attribution rows whose `kit_source_type` equals this value.",
      -                "type": "string"
      -              },
      -              "type": {
      -                "description": "Must be 'kit_source'",
      -                "enum": [
      -                  "kit_source"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "title": "Kit source (attribution only)",
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "type": "array"
      -    },
      -    "before": {
      -      "description": "End date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "comparison": {
      -      "description": "How `value` is matched against the stored custom-field value. `is` is exact equality, `contains` is a case-insensitive substring (blank `value` matches any subscriber that has a value stored for the field), `has_value` matches any non-empty stored value (ignores `value`), `greater_than` / `greater_than_or_equal` / `less_than` / `less_than_or_equal` compare numerically. Only applicable for 'custom_field' type.",
      -      "enum": [
      -        "is",
      -        "contains",
      -        "has_value",
      -        "greater_than",
      -        "greater_than_or_equal",
      -        "less_than",
      -        "less_than_or_equal"
      -      ],
      -      "type": "string"
      -    },
      -    "count_greater_than": {
      -      "description": "Minimum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_greater_than_or_equal": {
      -      "description": "Minimum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_less_than": {
      -      "description": "Maximum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_less_than_or_equal": {
      -      "description": "Maximum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "latitude": {
      -      "description": "Center latitude (decimal degrees). Required for the 'location' type. Combined with `longitude` and `radius` to form a bounding box around the point.",
      -      "format": "float",
      -      "type": "number"
      -    },
      -    "longitude": {
      -      "description": "Center longitude (decimal degrees). Required for the 'location' type.",
      -      "format": "float",
      -      "type": "number"
      -    },
      -    "radius": {
      -      "description": "Radius around (`latitude`, `longitude`) in miles. Required for the 'location' type. Subscribers whose primary location falls inside the bounding box pass the filter.",
      -      "type": "number"
      -    },
      -    "states": {
      -      "description": "Subscriber lifecycle states. Required for 'subscriber_state' type; ignored for other types. Subscribers matching any of the listed states pass the filter. Strongly recommended to use `['active']` unless you specifically need other states : most subscriber-facing queries elsewhere in the app scope to active subscribers by default.",
      -      "items": {
      -        "enum": [
      -          "active",
      -          "inactive",
      -          "bounced",
      -          "cancelled",
      -          "complained"
      -        ],
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "subscriber_custom_field_id": {
      -      "description": "Id of the custom field whose stored value is being filtered on. Required for 'custom_field' type; ignored for other types.",
      -      "type": "integer"
      -    },
      -    "type": {
      -      "description": "Type of filter condition. `attribution` matches subscribers by their *original signup attribution* : supports two sub-conditions: `forms` matches by the form / landing-page id the subscriber signed up through, and `kit_source` matches by any combination of the underlying Kit source fields (source type, source id, source name, mechanism, mechanism id). Attribution is the original signup source; it does not track current subscription state. `custom_field` matches subscribers by the value they have stored for a particular custom field, identified by `subscriber_custom_field_id`. `location` matches subscribers whose primary location falls within a `radius` (miles) of (`latitude`, `longitude`). All three fields are required.",
      -      "enum": [
      -        "opens",
      -        "clicks",
      -        "sent",
      -        "delivered",
      -        "subscribed",
      -        "subscriber_state",
      -        "tags",
      -        "attribution",
      -        "custom_field",
      -        "location"
      -      ],
      -      "type": "string"
      -    },
      -    "value": {
      -      "description": "Value to compare against. Used by 'custom_field' type together with `comparison`. For the numeric comparisons (`greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`) the value is parsed as a number; non-numeric stored values are excluded. Ignored when `comparison` is `has_value`.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / all / type
      Removed value: -"array"
    • addedInput schema / properties / counting_mode / $ref
      Added value: +"#/$defs/counting_mode"
    • removedInput schema / properties / counting_mode / description
      Removed value: -"Controls how engagement-filter count thresholds are tallied. `raw` (default) counts every event : five opens of the same email = five. `unique_email` counts distinct emails on which the action occurred : five opens of the same email = one. Applies to every engagement filter (opens, clicks, sent, delivered) in the request; ignored for other filter types."
    • removedInput schema / properties / counting_mode / enum
      Removed value: -[
      -  "raw",
      -  "unique_email"
      -]
    • removedInput schema / properties / counting_mode / type
      Removed value: -"string"
    • addedInput schema / properties / include / $ref
      Added value: +"#/$defs/include"
    • removedInput schema / properties / include / description
      Removed value: -"Optional. Array of `{ type, ...config }` objects naming additional fields to embed on each subscriber row. Valid types: `attribution`, `tags`, `location`, `canceled_at`, `stats`, `custom_fields`. The `stats` type accepts an optional `range: { start, end }` (YYYY-MM-DD dates, defaulting to the last 90 days). The `custom_fields` type adds a `fields` object with all account custom field values (null for fields the subscriber has not set)."
    • removedInput schema / properties / include / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "range": {
      -      "additionalProperties": false,
      -      "description": "Only used by the `stats` type. Date window for the engagement stats. Defaults to the last 90 days; clamped to the account's data-retention window.",
      -      "properties": {
      -        "end": {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        "start": {
      -          "format": "date",
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": {
      -      "enum": [
      -        "attribution",
      -        "tags",
      -        "location",
      -        "canceled_at",
      -        "stats",
      -        "custom_fields"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / include / type
      Removed value: -"array"
    • addedInput schema / properties / payload / properties / all / $ref
      Added value: +"#/$defs/all"
    • removedInput schema / properties / payload / properties / all / description
      Removed value: -"Array of filter conditions where ALL must be met (AND logic)"
    • removedInput schema / properties / payload / properties / all / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "description": "A filter condition with type and optional parameters. Used within the 'all' array for complex filtering where multiple conditions must be met.",
      -  "properties": {
      -    "after": {
      -      "description": "Start date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "any": {
      -      "description": "Array of OR conditions. Subscriber activity must match ANY of these conditions. Engagement types accept broadcasts/URLs; 'tags' accepts tag id matchers; 'attribution' accepts attribution sub-conditions ('forms' or 'kit_source'). Not applicable for 'subscribed', 'subscriber_state', 'custom_field', or 'location' types.",
      -      "items": {
      -        "oneOf": [
      -          {
      -            "additionalProperties": false,
      -            "description": "Filter by specific broadcast IDs. Subscriber must have interacted with ANY of the specified broadcasts.",
      -            "properties": {
      -              "ids": {
      -                "description": "Array of broadcast IDs. Subscriber must match ANY of these.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'broadcasts'",
      -                "enum": [
      -                  "broadcasts"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "ids"
      -            ],
      -            "title": "Broadcasts",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Filter by URL patterns. Only applicable for 'clicks' type. Subscriber must have clicked ANY of the specified URLs.",
      -            "properties": {
      -              "ids": {
      -                "description": "Array of URL IDs. Subscriber must have clicked ANY of these.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "matching": {
      -                "default": "exact",
      -                "description": "URL matching strategy",
      -                "enum": [
      -                  "exact",
      -                  "contains",
      -                  "starts_with",
      -                  "ends_with"
      -                ],
      -                "type": "string"
      -              },
      -              "type": {
      -                "description": "Must be 'urls'",
      -                "enum": [
      -                  "urls"
      -                ],
      -                "type": "string"
      -              },
      -              "urls": {
      -                "description": "Array of URL patterns. Subscriber must have clicked ANY of these.",
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "title": "URLs (clicks only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Match a list of ids. Used by the 'tags' filter to select tag ids.",
      -            "properties": {
      -              "matching": {
      -                "description": "Ids the filter should match against.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'ids'",
      -                "enum": [
      -                  "ids"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "matching"
      -            ],
      -            "title": "Tag ids (tags only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Attribution sub-condition: matches subscribers whose original signup attribution points at one of the given form / landing-page ids. Ids may refer to either a form or a legacy landing page : the attribution source does not distinguish between the two.",
      -            "properties": {
      -              "ids": {
      -                "description": "Form / landing-page ids the subscriber's attribution should match.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "type": {
      -                "description": "Must be 'forms'",
      -                "enum": [
      -                  "forms"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type",
      -              "ids"
      -            ],
      -            "title": "Forms (attribution only)",
      -            "type": "object"
      -          },
      -          {
      -            "additionalProperties": false,
      -            "description": "Attribution sub-condition: matches subscribers whose original signup attribution row matches any combination of the supplied Kit source fields. All fields are optional; supplied fields are ANDed together against the same attribution row, and array fields (`source_ids`, `source_names`, `mechanism_ids`) match any value in the array. Known `source_type` values include `form_subscription` (form / landing-page signup), `api_subscription` (added via the API), and `manual` (added by the creator). Multiple entries in the parent `attribution` filter's `any` array are OR-ed together (consistent with `any` semantics elsewhere in this endpoint), so use separate entries to express \"kit_source A OR kit_source B\".",
      -            "properties": {
      -              "mechanism": {
      -                "description": "Match attribution rows whose `kit_source_mechanism` equals this value.",
      -                "type": "string"
      -              },
      -              "mechanism_ids": {
      -                "description": "Match attribution rows whose `kit_source_mechanism_id` is in this list.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "source_ids": {
      -                "description": "Match attribution rows whose `kit_source_id` is in this list.",
      -                "items": {
      -                  "type": "integer"
      -                },
      -                "type": "array"
      -              },
      -              "source_names": {
      -                "description": "Match attribution rows whose `kit_source_name` is in this list.",
      -                "items": {
      -                  "type": "string"
      -                },
      -                "type": "array"
      -              },
      -              "source_type": {
      -                "description": "Match attribution rows whose `kit_source_type` equals this value.",
      -                "type": "string"
      -              },
      -              "type": {
      -                "description": "Must be 'kit_source'",
      -                "enum": [
      -                  "kit_source"
      -                ],
      -                "type": "string"
      -              }
      -            },
      -            "required": [
      -              "type"
      -            ],
      -            "title": "Kit source (attribution only)",
      -            "type": "object"
      -          }
      -        ]
      -      },
      -      "type": "array"
      -    },
      -    "before": {
      -      "description": "End date (YYYY-MM-DD). For 'subscribed' type, filters by subscriber_created_at. For engagement types, filters by event date. Not applicable for 'tags', 'subscriber_state', 'attribution', or 'custom_field' types.",
      -      "format": "date",
      -      "type": "string"
      -    },
      -    "comparison": {
      -      "description": "How `value` is matched against the stored custom-field value. `is` is exact equality, `contains` is a case-insensitive substring (blank `value` matches any subscriber that has a value stored for the field), `has_value` matches any non-empty stored value (ignores `value`), `greater_than` / `greater_than_or_equal` / `less_than` / `less_than_or_equal` compare numerically. Only applicable for 'custom_field' type.",
      -      "enum": [
      -        "is",
      -        "contains",
      -        "has_value",
      -        "greater_than",
      -        "greater_than_or_equal",
      -        "less_than",
      -        "less_than_or_equal"
      -      ],
      -      "type": "string"
      -    },
      -    "count_greater_than": {
      -      "description": "Minimum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_greater_than_or_equal": {
      -      "description": "Minimum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_less_than": {
      -      "description": "Maximum count (exclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "count_less_than_or_equal": {
      -      "description": "Maximum count (inclusive). Only applicable for engagement types ('opens', 'clicks', 'sent', 'delivered').",
      -      "type": "integer"
      -    },
      -    "latitude": {
      -      "description": "Center latitude (decimal degrees). Required for the 'location' type. Combined with `longitude` and `radius` to form a bounding box around the point.",
      -      "format": "float",
      -      "type": "number"
      -    },
      -    "longitude": {
      -      "description": "Center longitude (decimal degrees). Required for the 'location' type.",
      -      "format": "float",
      -      "type": "number"
      -    },
      -    "radius": {
      -      "description": "Radius around (`latitude`, `longitude`) in miles. Required for the 'location' type. Subscribers whose primary location falls inside the bounding box pass the filter.",
      -      "type": "number"
      -    },
      -    "states": {
      -      "description": "Subscriber lifecycle states. Required for 'subscriber_state' type; ignored for other types. Subscribers matching any of the listed states pass the filter. Strongly recommended to use `['active']` unless you specifically need other states : most subscriber-facing queries elsewhere in the app scope to active subscribers by default.",
      -      "items": {
      -        "enum": [
      -          "active",
      -          "inactive",
      -          "bounced",
      -          "cancelled",
      -          "complained"
      -        ],
      -        "type": "string"
      -      },
      -      "type": "array"
      -    },
      -    "subscriber_custom_field_id": {
      -      "description": "Id of the custom field whose stored value is being filtered on. Required for 'custom_field' type; ignored for other types.",
      -      "type": "integer"
      -    },
      -    "type": {
      -      "description": "Type of filter condition. `attribution` matches subscribers by their *original signup attribution* : supports two sub-conditions: `forms` matches by the form / landing-page id the subscriber signed up through, and `kit_source` matches by any combination of the underlying Kit source fields (source type, source id, source name, mechanism, mechanism id). Attribution is the original signup source; it does not track current subscription state. `custom_field` matches subscribers by the value they have stored for a particular custom field, identified by `subscriber_custom_field_id`. `location` matches subscribers whose primary location falls within a `radius` (miles) of (`latitude`, `longitude`). All three fields are required.",
      -      "enum": [
      -        "opens",
      -        "clicks",
      -        "sent",
      -        "delivered",
      -        "subscribed",
      -        "subscriber_state",
      -        "tags",
      -        "attribution",
      -        "custom_field",
      -        "location"
      -      ],
      -      "type": "string"
      -    },
      -    "value": {
      -      "description": "Value to compare against. Used by 'custom_field' type together with `comparison`. For the numeric comparisons (`greater_than`, `greater_than_or_equal`, `less_than`, `less_than_or_equal`) the value is parsed as a number; non-numeric stored values are excluded. Ignored when `comparison` is `has_value`.",
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / payload / properties / all / type
      Removed value: -"array"
    • addedInput schema / properties / payload / properties / counting_mode / $ref
      Added value: +"#/$defs/counting_mode"
    • removedInput schema / properties / payload / properties / counting_mode / description
      Removed value: -"Controls how engagement-filter count thresholds are tallied. `raw` (default) counts every event : five opens of the same email = five. `unique_email` counts distinct emails on which the action occurred : five opens of the same email = one. Applies to every engagement filter (opens, clicks, sent, delivered) in the request; ignored for other filter types."
    • removedInput schema / properties / payload / properties / counting_mode / enum
      Removed value: -[
      -  "raw",
      -  "unique_email"
      -]
    • removedInput schema / properties / payload / properties / counting_mode / type
      Removed value: -"string"
    • addedInput schema / properties / payload / properties / include / $ref
      Added value: +"#/$defs/include"
    • removedInput schema / properties / payload / properties / include / description
      Removed value: -"Optional. Array of `{ type, ...config }` objects naming additional fields to embed on each subscriber row. Valid types: `attribution`, `tags`, `location`, `canceled_at`, `stats`, `custom_fields`. The `stats` type accepts an optional `range: { start, end }` (YYYY-MM-DD dates, defaulting to the last 90 days). The `custom_fields` type adds a `fields` object with all account custom field values (null for fields the subscriber has not set)."
    • removedInput schema / properties / payload / properties / include / items
      Removed value: -{
      -  "additionalProperties": false,
      -  "properties": {
      -    "range": {
      -      "additionalProperties": false,
      -      "description": "Only used by the `stats` type. Date window for the engagement stats. Defaults to the last 90 days; clamped to the account's data-retention window.",
      -      "properties": {
      -        "end": {
      -          "format": "date",
      -          "type": "string"
      -        },
      -        "start": {
      -          "format": "date",
      -          "type": "string"
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": {
      -      "enum": [
      -        "attribution",
      -        "tags",
      -        "location",
      -        "canceled_at",
      -        "stats",
      -        "custom_fields"
      -      ],
      -      "type": "string"
      -    }
      -  },
      -  "required": [
      -    "type"
      -  ],
      -  "type": "object"
      -}
    • removedInput schema / properties / payload / properties / include / type
      Removed value: -"array"
    • addedInput schema / properties / payload / properties / sort_field / $ref
      Added value: +"#/$defs/sort_field"
    • removedInput schema / properties / payload / properties / sort_field / default
      Removed value: -"created_at"
    • removedInput schema / properties / payload / properties / sort_field / description
      Removed value: -"Field to order results by. Base columns (`id`, `first_name`, `email_address`, `created_at`) order by that subscriber attribute. `engagement__ ` orders by an engagement stat over the trailing 90 days: counts (`sent`, `opens`, `clicks`) and rates (`open_rate`, `click_rate`); subscribers with no sends order as 0. `location__distance` orders by great-circle distance and requires a `location` filter in the same request : its `latitude`/`longitude` supply the origin, and subscribers without a primary location are excluded. Distance defaults to nearest-first (`sort_order` defaults to `asc` for this field); pass `sort_order=desc` for farthest-first."
    • removedInput schema / properties / payload / properties / sort_field / enum
      Removed value: -[
      -  "id",
      -  "first_name",
      -  "email_address",
      -  "created_at",
      -  "engagement__sent",
      -  "engagement__opens",
      -  "engagement__clicks",
      -  "engagement__open_rate",
      -  "engagement__click_rate",
      -  "location__distance"
      -]
    • removedInput schema / properties / payload / properties / sort_field / type
      Removed value: -"string"
    • addedInput schema / properties / sort_field / $ref
      Added value: +"#/$defs/sort_field"
    • removedInput schema / properties / sort_field / default
      Removed value: -"created_at"
    • removedInput schema / properties / sort_field / description
      Removed value: -"Field to order results by. Base columns (`id`, `first_name`, `email_address`, `created_at`) order by that subscriber attribute. `engagement__ ` orders by an engagement stat over the trailing 90 days: counts (`sent`, `opens`, `clicks`) and rates (`open_rate`, `click_rate`); subscribers with no sends order as 0. `location__distance` orders by great-circle distance and requires a `location` filter in the same request : its `latitude`/`longitude` supply the origin, and subscribers without a primary location are excluded. Distance defaults to nearest-first (`sort_order` defaults to `asc` for this field); pass `sort_order=desc` for farthest-first."
    • removedInput schema / properties / sort_field / enum
      Removed value: -[
      -  "id",
      -  "first_name",
      -  "email_address",
      -  "created_at",
      -  "engagement__sent",
      -  "engagement__opens",
      -  "engagement__clicks",
      -  "engagement__open_rate",
      -  "engagement__click_rate",
      -  "location__distance"
      -]
    • removedInput schema / properties / sort_field / type
      Removed value: -"string"
  2. First observedv2.0.1

TDQS

C2.6/5.0
Behavior2/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false, and openWorldHint. The description's 'Reads account data' merely restates the read-only nature and adds no behavioral context about filtering complexity, rate limits, permissions, or result handling.

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

Conciseness3/5

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

The description is short and front-loaded, but for a tool this complex it is under-specified. The second sentence, 'Reads account data,' is largely redundant with the readOnlyHint annotation and does not earn its place.

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

Completeness2/5

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

This is a complex filtering tool with 8 parameters, nested objects, 0 required parameters, and no output schema. The description does not explain how to structure the nested filter conditions or mention key options like include, sort, or counting_mode, leaving it incomplete for correct invocation.

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

Parameters2/5

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

Schema description coverage is only 50%, and the description does not compensate. It names high-level categories ('engagement, sign-up date, state, and tags') but adds no meaning beyond the schema for nested filters, payload/payload_file, include, sort, or counting_mode.

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

Purpose4/5

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

The description states a specific verb and resource: 'Filter subscribers,' and lists the main filter categories. It is clear what the tool does, but it does not distinguish itself from siblings like search_subscribers or list_subscribers.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives such as search_subscribers or list_subscribers. It only states what can be filtered, not when this filtering approach is appropriate or what exclusions apply.

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

Deploy Server

Other Tools