Skip to main content
Glama

create_customer

Create a new customer record by providing a unique email or phone. Optionally add addresses, tags, and email marketing consent. Returns the customer ID for use in orders.

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.
Behavior5/5

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

No annotations provided, so description carries full burden. It discloses required fields (email/phone), uniqueness, default consent (NOT_SUBSCRIBED), legal requirement for opt-in, first address becomes default, and return value GID. This is comprehensive behavioral disclosure.

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

Conciseness4/5

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

Description is well-structured: starts with core purpose, then requirements, optional features, legal note, and return value. It is slightly lengthy but every sentence adds value. No wasted words.

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?

Given no output schema, the description explains return value (GID) and links to related tools. It covers all essential aspects (required inputs, uniqueness, addresses, consent) for effective usage, handling nested objects and 8 parameters well.

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?

Input schema has 75% description coverage. Description adds value beyond schema: explains why email/phone required, uniqueness, default shipping address, consent default, and returned GID usage. It also clarifies the consent field's default and legal implications.

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 'Create a new customer record' and details required and optional fields, distinguishing it from update_customer. It specifies the minimum inputs (email or phone) and uniqueness constraints, leaving no ambiguity about the tool's function.

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 conditions: supply email or phone, uniqueness requirements, default consent, and legal note for opted-in state. It also mentions using the returned GID for other tools. Lacks explicit 'when not to use' but context is 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