list_suppression_groups
Retrieve all unsubscribe groups to manage email recipients who opt out of specific email categories in SendGrid.
Instructions
List all unsubscribe groups in your SendGrid account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/index.ts:485-492 (handler)Tool handler for 'list_suppression_groups' that calls the service to fetch groups and returns them as JSON text.
case 'list_suppression_groups': const groups = await service.getSuppressionGroups(); return { content: [{ type: 'text', text: JSON.stringify(groups, null, 2) }] }; - src/tools/index.ts:276-284 (registration)Registration of the 'list_suppression_groups' tool in getToolDefinitions, including name, description, and empty input schema.
{ name: 'list_suppression_groups', description: 'List all unsubscribe groups in your SendGrid account', inputSchema: { type: 'object', properties: {}, required: [] } }, - src/services/sendgrid.ts:304-309 (helper)Service helper method getSuppressionGroups() that performs the API call to SendGrid's /v3/asm/groups endpoint to retrieve suppression groups.
const [response] = await this.client.request({ method: 'GET', url: '/v3/asm/groups' }); return response.body; } - src/tools/index.ts:279-283 (schema)Input schema for the tool: empty object with no required properties.
inputSchema: { type: 'object', properties: {}, required: [] }