create_customer
Add new customers to your GoCardless account by providing their email, name, and optional company details for payment processing.
Instructions
Create a new customer in GoCardless
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| Yes | Customer email address | ||
| given_name | No | Customer first name | |
| family_name | No | Customer last name | |
| company_name | No | Customer company name (optional) |
Implementation Reference
- src/gocardless_mcp/server.py:300-317 (handler)Handler function for the 'create_customer' tool. Constructs parameters from input arguments and calls client.customers.create() to create a new customer in GoCardless.elif name == "create_customer": params = { "email": arguments["email"], } if "given_name" in arguments: params["given_name"] = arguments["given_name"] if "family_name" in arguments: params["family_name"] = arguments["family_name"] if "company_name" in arguments: params["company_name"] = arguments["company_name"] customer = client.customers.create(params=params) return [ types.TextContent( type="text", text=f"Customer created successfully:\n{_format_json({'id': customer.id, 'email': customer.email})}", ) ]
- src/gocardless_mcp/server.py:66-91 (registration)Registration of the 'create_customer' tool in list_tools(), including its name, description, and input schema definition.types.Tool( name="create_customer", description="Create a new customer in GoCardless", inputSchema={ "type": "object", "properties": { "email": { "type": "string", "description": "Customer email address", }, "given_name": { "type": "string", "description": "Customer first name", }, "family_name": { "type": "string", "description": "Customer last name", }, "company_name": { "type": "string", "description": "Customer company name (optional)", }, }, "required": ["email"], }, ),
- src/gocardless_mcp/server.py:69-90 (schema)Input schema definition for the 'create_customer' tool, specifying required 'email' and optional name fields.inputSchema={ "type": "object", "properties": { "email": { "type": "string", "description": "Customer email address", }, "given_name": { "type": "string", "description": "Customer first name", }, "family_name": { "type": "string", "description": "Customer last name", }, "company_name": { "type": "string", "description": "Customer company name (optional)", }, }, "required": ["email"], },