Skip to main content
Glama

list_mandates

Retrieve and manage customer payment mandates from GoCardless to view authorization details, filter by customer, and control data retrieval limits.

Instructions

List mandates from GoCardless

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of mandates to retrieve (default: 50)
customerNoFilter by customer ID

Implementation Reference

  • Handler for the 'list_mandates' tool call. Retrieves mandates from GoCardless API using client.mandates.list(), filters by limit and optional customer ID, formats results into a list of dicts with id, status, scheme, created_at, and returns formatted text content.
    elif name == "list_mandates": params = {"limit": arguments.get("limit", 50)} if "customer" in arguments: params["customer"] = arguments["customer"] mandates = client.mandates.list(params=params) result = [] for mandate in mandates.records: result.append( { "id": mandate.id, "status": mandate.status, "scheme": mandate.scheme, "created_at": mandate.created_at, } ) return [ types.TextContent( type="text", text=f"Found {len(result)} mandates:\n{_format_json(result)}", ) ]
  • Registration of the 'list_mandates' tool in the list_tools() function, defining its name, description, and input schema for parameters limit (optional integer) and customer (optional string filter).
    types.Tool( name="list_mandates", description="List mandates from GoCardless", inputSchema={ "type": "object", "properties": { "limit": { "type": "integer", "description": "Number of mandates to retrieve (default: 50)", }, "customer": { "type": "string", "description": "Filter by 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