feat: Design API support + suppression group create/delete tools#8
Open
zaferdurkut wants to merge 2 commits into
Open
feat: Design API support + suppression group create/delete tools#8zaferdurkut wants to merge 2 commits into
zaferdurkut wants to merge 2 commits into
Conversation
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 insrc/services/sendgrid.ts, with aSendGridDesigntype insrc/types/index.ts:list_designs— lists all designs; auto-paginates via_metadata.nextget_design— retrieves a design by ID, including full HTML/plain contentcreate_design— creates a new design (name,html_contentrequired; optionalplain_content,subject,editor,generate_plain_content,categories)update_design— PATCHes any subset of design fieldsdelete_design— deletes a designduplicate_design— duplicates an existing design (optional overridenameandeditor)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.nextand extractingpage_token. Defaultpage_sizeis 100.@sendgrid/client.npm run build.🤖 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 viaasm.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 intools/index.ts, README updated. Exercised live against a real account: created a group, referenced it from a dynamic-template send viaasm.group_id, verified vialist_suppression_groups, and confirmed the unsubscribe link renders.