Skip to content

feat: Design API support + suppression group create/delete tools#8

Open
zaferdurkut wants to merge 2 commits into
Garoth:mainfrom
zaferdurkut:feat/design-api-support
Open

feat: Design API support + suppression group create/delete tools#8
zaferdurkut wants to merge 2 commits into
Garoth:mainfrom
zaferdurkut:feat/design-api-support

Conversation

@zaferdurkut

@zaferdurkut zaferdurkut commented Apr 17, 2026

Copy link
Copy Markdown

Summary

Adds support for SendGrid's Design API (/v3/designs). Designs are the building blocks used by the Marketing Campaigns UI; this exposes them to MCP clients alongside the existing Template support.

What changed

Six new tools in src/tools/index.ts, backed by service methods in src/services/sendgrid.ts, with a SendGridDesign type in src/types/index.ts:

  • list_designs — lists all designs; auto-paginates via _metadata.next
  • get_design — retrieves a design by ID, including full HTML/plain content
  • create_design — creates a new design (name, html_content required; optional plain_content, subject, editor, generate_plain_content, categories)
  • update_design — PATCHes any subset of design fields
  • delete_design — deletes a design
  • duplicate_design — duplicates an existing design (optional override name and editor)

Why

Template-only coverage makes it hard to manage the full email content lifecycle through MCP. Designs are often where teams author content before promoting it into a template or single send, and having them available enables workflows like "list all designs", "copy design X and tweak", or "export design HTML" without leaving the assistant.

Notes for reviewers

  • listDesigns() paginates by reading _metadata.next and extracting page_token. Default page_size is 100.
  • No new dependencies; uses the existing @sendgrid/client.
  • Build passes: npm run build.
  • No tests added for the new methods (the existing service has minimal test coverage; happy to add them if desired).

🤖 Generated with Claude Code


Update: suppression group management (40e03d9)

This branch now also adds ASM unsubscribe-group tools:

  • create_suppression_group — creates an unsubscribe group and returns the numeric group id (the value sends reference via asm.group_id). Groups could previously only be listed; creating one still meant a trip to the SendGrid UI, which breaks agent-driven flows that need a working unsubscribe link before sending.
  • delete_suppression_group — removes a group by id.

Same structure as the rest: service methods in services/sendgrid.ts, tool definitions + handlers in tools/index.ts, README updated. Exercised live against a real account: created a group, referenced it from a dynamic-template send via asm.group_id, verified via list_suppression_groups, and confirmed the unsubscribe link renders.

zaferdurkut and others added 2 commits April 17, 2026 16:07
Adds 6 new tools for SendGrid's Design API (v3/designs), enabling
management of email designs alongside existing template support.

New tools:
- list_designs: list all designs (auto-paginates)
- get_design: retrieve full design with HTML content
- create_design: create a new design
- update_design: PATCH an existing design
- delete_design: delete a design
- duplicate_design: duplicate an existing design

Includes SendGridDesign type and matching service methods.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
ASM unsubscribe groups could only be listed; creating one still meant a
trip to the SendGrid UI. create_suppression_group returns the numeric
group id (the value mail sends reference via asm.group_id) and
delete_suppression_group removes a group by id.

Co-Authored-By: Claude Fable 5 <[email protected]>
@zaferdurkut zaferdurkut changed the title feat: add Design API support (list/get/create/update/delete/duplicate) feat: Design API support + suppression group create/delete tools Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant