Skip to main content
Glama
damientilman

Mailchimp MCP

create_promo_code

Create a redeemable discount code for customers to enter at checkout. Attach the code to an existing promo rule.

Instructions

Create a redeemable code under an existing promo rule.

Customers type the code string at checkout to apply the rule's discount. Code matching is case-insensitive on the Mailchimp side. Use list_promo_codes to discover existing codes before creating duplicates.

Returns 400 if promo_rule_id does not exist; returns 409 if promo_code_id already exists.

Args: store_id: E-commerce store ID. promo_rule_id: Rule ID to attach the code to. Obtain from list_promo_rules. promo_code_id: Client-supplied unique ID for the code. code: The actual code string customers type at checkout (e.g. 'SUMMER20'). redemption_url: URL where the code can be applied (your checkout page). enabled: Whether the code is active. Default true.

Returns: JSON with id, code, redemption_url, usage_count (0 at creation), enabled, created_at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
accountNo
enabledNo
store_idYes
promo_code_idYes
promo_rule_idYes
redemption_urlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations are sparse (non-readonly, non-idempotent, non-destructive). The description adds value by noting case-insensitive matching, default enabled=true, and that usage_count starts at 0. It also describes the return JSON structure, which annotations lack.

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 compact yet comprehensive: a one-line summary, behavioral notes, error codes, bullet-arg descriptions, and return format. No fluff; every sentence earns its place.

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 7 parameters, output schema, and known error states, the description covers the essential usage context. It omits rate limits or auth details, but these are not critical given the sibling context and annotations.

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

Parameters5/5

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

Schema has 0% description coverage; the description compensates fully with an Args section that explains each parameter's meaning and purpose (e.g., 'code' as the string customers type, 'promo_rule_id' sourced from list_promo_rules, 'promo_code_id' as client-supplied unique ID).

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 starts with a clear verb and resource: 'Create a redeemable code under an existing promo rule.' It explains the tool's purpose, distinguishes it from siblings like list_promo_codes and delete_promo_code, and provides the shopping context.

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

Usage Guidelines4/5

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

The description advises using list_promo_codes to avoid duplicates and mentions error codes (400/409) for missing rule or duplicate ID. It implicitly requires an existing promo rule, but does not explicitly contrast with update_promo_code.

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/damientilman/mailchimp-mcp-server'

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