Skip to main content
Glama
The-Focus-AI

Buttondown MCP Server

by The-Focus-AI

create_draft

Create email drafts in Buttondown with content and optional titles. Requires user confirmation before drafting to ensure intentional newsletter creation.

Instructions

Create a new email draft in Buttondown with the specified content and optional title. This tool requires explicit user confirmation before proceeding as it will create a new draft in your Buttondown account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe main content/body of the email draft
titleNoOptional title/subject for the email draft
confirmedYesMust be true to confirm the draft creation

Implementation Reference

  • The handler function for the MCP 'create_draft' tool. It checks for user confirmation, ensures the API key is set, calls the ButtondownAPI.createDraft method, and returns a JSON-formatted response.
    async ({ content, title, confirmed }) => {
      if (!confirmed) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(
                {
                  error: "User confirmation required",
                  message:
                    "Please ask the user if they want to create this draft and set confirmed=true if they agree",
                  preview: {
                    title: title || "Untitled",
                    content_length: content.length,
                  },
                },
                null,
                2
              ),
            },
          ],
        };
      }
      await this.ensureApiKey();
      const response = await this.api.createDraft(content, title);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response, null, 2),
          },
        ],
      };
    }
  • Zod input schema defining parameters for the 'create_draft' tool: required content (string), optional title (string), and confirmed (boolean).
      content: z
        .string()
        .describe("The main content/body of the email draft"),
      title: z
        .string()
        .optional()
        .describe("Optional title/subject for the email draft"),
      confirmed: z
        .boolean()
        .describe("Must be true to confirm the draft creation"),
    },
  • Registration of the 'create_draft' MCP tool on the McpServer instance, specifying the tool name and description.
    this.server.tool(
      "create_draft",
      "Create a new email draft in Buttondown with the specified content and optional title. This tool requires explicit user confirmation before proceeding as it will create a new draft in your Buttondown account.",
      {
  • Supporting helper method in ButtondownAPI class that performs the HTTP POST request to create a draft email in Buttondown via their API.
    async createDraft(content: string, title?: string): Promise<ButtondownEmail> {
      return this.request<ButtondownEmail>("/emails", {
        method: "POST",
        body: JSON.stringify({
          body: content,
          subject: title || "Untitled Draft",
          status: "draft",
        }),
      });
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It successfully communicates that this is a write operation ('create a new draft'), specifies the target system ('in your Buttondown account'), and importantly discloses the confirmation requirement. However, it doesn't mention potential side effects, error conditions, or what happens to existing drafts.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with two sentences: the first states the core functionality, the second adds the critical behavioral constraint. Every word earns its place, and the most important information (the confirmation requirement) is appropriately front-loaded in the second sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a creation tool with no annotations and no output schema, the description does well by specifying the action, target system, and confirmation requirement. However, it doesn't describe what the tool returns (e.g., draft ID, success status) or potential error scenarios. Given the 100% schema coverage, the parameter documentation is adequate.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents all three parameters. The description mentions 'content and optional title' which aligns with the schema, but adds no additional semantic context beyond what the schema provides. The confirmation requirement is behavioral rather than parameter-specific.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Create a new email draft'), the target resource ('in Buttondown'), and the key components ('with the specified content and optional title'). It distinguishes this creation tool from sibling tools like get_analytics (read-only), list_emails (listing), and schedule_draft (scheduling).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidance: 'This tool requires explicit user confirmation before proceeding.' This creates a clear when-to-use condition (only when user confirmation is available) and implies when-not-to-use (without confirmation). While it doesn't name alternatives, the confirmation requirement serves as a strong usage constraint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/The-Focus-AI/buttondown-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server