List campaigns
sm_list_campaignsList a project's campaigns with performance metrics. Use to map a member's lastActivityAt onto a real send, or to find the latest house send by send_time.
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": {
"projectId": "<projectId>"
},
"name": "sm_list_campaigns"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Opaque keyset pagination cursor returned as `nextCursor` by the previous page. Must be replayed with identical query filters. | |
| search | No | Filter campaigns by a case-insensitive partial match on the subject line or specific internal campaign IDs. Omit to skip text filtering. | |
| sortBy | No | The field used to order the campaigns list. Defaults to sorting by the most recent send time first. | send_time |
| endDate | No | Inclusive ISO-8601 calendar date (UTC) upper bound for the time range in YYYY-MM-DD format. Omit to leave the end of the time window unbounded or use the endpoint's default. | |
| sortDir | No | The direction to sort the campaign results. Can be 'asc' for ascending or 'desc' for descending. Defaults to "desc" when omitted. | desc |
| pageSize | No | Maximum number of rows to return per page. Omit to use the default page size of 100. MCP tool calls are capped at 100 rows per page to protect the model's context window. | |
| projectId | Yes | Required. The opaque alphanumeric project identifier of 8 or more characters to scope this request to. Call GET /_api/public/v1/enterprise/projects to list the project IDs available to your API key. Omitting it returns 400 VALIDATION_ERROR. | |
| startDate | No | Inclusive ISO-8601 calendar date (UTC) lower bound for the time range in YYYY-MM-DD format. Omit to leave the start of the time window unbounded. | |
| maxSendVolume | No | Maximum number of emails sent to include the campaign in the results. Omit to impose no upper bound. | |
| minSendVolume | No | Minimum number of emails sent to include the campaign in the results. Omit to use the system default threshold. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | A machine-readable identifier for the error type. For the full code taxonomy, see the sm_get_schema tool or the Enterprise API OpenAPI ErrorResponse component. | |
| error | No | A human-readable error message detailing what went wrong. | |
| hasMore | No | True if additional results exist beyond this page. | |
| pageSize | No | The maximum number of items returned in this page. | |
| campaigns | No | Campaign rows with performance metrics. | |
| projectId | No | An opaque alphanumeric project identifier of 8 or more characters identifying a Space Monkey Project. Treat this value as entirely opaque; do not parse, sequentialize, or auto-generate it. | |
| nextCursor | No | A keyset cursor marking the continuation point. Contract: this value is non-null if and only if `hasMore` is true. Clients MUST echo this token verbatim on the subsequent request and MUST NEVER attempt to parse or manually construct it. |