Scaffold a Mailbuttons integration
mailbuttons_scaffold_integrationGenerates a governed send wrapper and inbound webhook handler for a chosen stack, wired to an existing sandbox inbox. Keeps API keys in env vars; handles blocked or draft_pending_approval responses.
Instructions
Build-time, sandbox-only. Writes a governed send wrapper and an inbound webhook handler for the chosen stack, wired to an existing sandbox inbox. Generated code reads MAILBUTTONS_API_KEY from the env (never inlined), handles blocked / draft_pending_approval as expected outcomes, and never reconstructs quarantined bodies. Grants nothing.
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": {
"stack": "<stack>",
"inbox_id": "<inbox_id>"
},
"name": "mailbuttons_scaffold_integration"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stack | Yes | Target framework. Detect it from the repo; ask the user if ambiguous. | |
| outDir | No | Directory to write example files into. Defaults to ./mailbuttons. | |
| inbox_id | Yes | The existing SANDBOX inbox id to wire the example code to. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| files | Yes | Absolute paths of the files written. | |
| notes | Yes | ||
| stack | Yes | ||
| reference | Yes | The references/*.md consulted for idioms (or a note that it was missing). |