Skip to main content
Glama

get_customer

Retrieve a specific GoCardless customer's details using their unique customer ID to access payment information and manage account data.

Instructions

Get a specific customer by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYesThe GoCardless customer ID (e.g., CU123)

Implementation Reference

  • Handler implementation for 'get_customer' tool: extracts customer_id, fetches customer using GoCardless client, formats response with customer details including address and metadata, returns as formatted JSON text.
    elif name == "get_customer": customer_id = arguments["customer_id"] customer = client.customers.get(customer_id) result = { "id": customer.id, "email": customer.email, "given_name": customer.given_name, "family_name": customer.family_name, "company_name": customer.company_name, "created_at": customer.created_at, "address_line1": customer.address_line1, "address_line2": customer.address_line2, "city": customer.city, "postal_code": customer.postal_code, "country_code": customer.country_code, "metadata": customer.metadata if hasattr(customer, 'metadata') else {}, } return [ types.TextContent(type="text", text=_format_json(result)) ]
  • Registration of the 'get_customer' tool in list_tools(), including name, description, and input schema requiring 'customer_id'.
    types.Tool( name="get_customer", description="Get a specific customer by ID", inputSchema={ "type": "object", "properties": { "customer_id": { "type": "string", "description": "The GoCardless customer ID (e.g., CU123)", } }, "required": ["customer_id"], }, ),
  • Input schema for 'get_customer' tool: object with required 'customer_id' string.
    inputSchema={ "type": "object", "properties": { "customer_id": { "type": "string", "description": "The GoCardless customer ID (e.g., CU123)", } }, "required": ["customer_id"], },

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/jmceleney/gocardless-mcp'

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