Skip to main content
Glama

list_customers

Retrieve customer records from GoCardless to manage payment relationships and view account details.

Instructions

List all customers from GoCardless

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of customers to retrieve (default: 50)

Implementation Reference

  • Handler implementation for the 'list_customers' tool. Retrieves customers using the GoCardless client with an optional limit, formats the results into a list of dictionaries, and returns a formatted text content response.
    if name == "list_customers": limit = arguments.get("limit", 50) customers = client.customers.list(params={"limit": limit}) result = [] for customer in customers.records: result.append( { "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, } ) return [ types.TextContent( type="text", text=f"Found {len(result)} customers:\n{_format_json(result)}", ) ]
  • Registration of the 'list_customers' tool within the handle_list_tools() function, decorated with @server.list_tools(). Includes tool name, description, and input schema.
    types.Tool( name="list_customers", description="List all customers from GoCardless", inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of customers to retrieve (default: 50)", } }, }, ),
  • Input schema for the 'list_customers' tool, defining an optional 'limit' parameter of type integer.
    inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of customers to retrieve (default: 50)", } }, },

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