Skip to main content
Glama

create_customer

Create a customer record in Shopify with email or phone (required). Optionally add addresses, tags, and set email marketing consent. Returns the customer ID for use in orders and draft orders. Ensure email and phone are unique.

Instructions

Create a new customer record. At minimum, supply email or phone (one is required for the customer to be reachable; both is fine). Email and phone must each be unique across the store — duplicates trigger validation errors. Optionally seed addresses (the first becomes the default shipping address), apply tags for segmentation, and set email-marketing consent. Default consent is NOT_SUBSCRIBED — only set SUBSCRIBED when you have documented opt-in (legal requirement in many jurisdictions). Returns the new customer's GID for use as customerId in create_order, create_draft_order, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNoCustomer email. At minimum email or phone is required for the customer to be useful. Must be unique across the store.
firstNameNo
lastNameNo
phoneNoPhone in E.164 format (+15551234567). Must be unique across the store.
tagsNoTags to apply to the new customer for segmentation/automation. Used by smart collections, marketing automations, and Flow triggers.
noteNoInternal staff-only note about the customer.
addressesNoInitial address(es). The first becomes the default shipping address; the rest are additional saved addresses. Customers can be created without addresses.
emailMarketingConsentNoEmail marketing consent state. Set marketingState=SUBSCRIBED only with documented customer opt-in. NOT_SUBSCRIBED is the default and the safe choice when in doubt.
Behavior4/5

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

With no annotations, the description discloses critical behaviors: uniqueness validation, default consent state, first address as default shipping, and return of GID. It does not cover permissions or rate limits, which are less critical for this tool.

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 concise with 4 sentences, no unnecessary words, and front-loaded with the core purpose. Each sentence contributes essential information without repetition.

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

Completeness5/5

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

Despite no output schema, the description explains the return value (GID) and its usage in other tools. It covers all key aspects: required fields, optional features, constraints, and legal notes. No obvious gaps for an AI agent.

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

Parameters4/5

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

Schema coverage is high (75%), but the description adds significant value by explaining the email/phone requirement, uniqueness, default address behavior, consent defaults, and return value usage. This goes beyond the schema descriptions.

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?

Clearly states the tool creates a customer record, specifies the core action ('Create a new customer record'), and distinguishes from sibling tools like update_customer. It also details required fields and constraints.

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?

Provides explicit guidance on required fields (email or phone), uniqueness constraints, and legal requirements for consent. However, it does not explicitly contrast with alternatives like update_customer, though the context makes it clear.

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/miller-joe/shopify-mcp'

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