Skip to main content
Glama

get_mandate

Retrieve specific GoCardless mandate details by providing the mandate ID to access payment authorization information.

Instructions

Get a specific mandate by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mandate_idYesThe GoCardless mandate ID (e.g., MD123)

Implementation Reference

  • Handler for the 'get_mandate' tool. Fetches the mandate by ID from GoCardless API, extracts key fields including ID, status, scheme, dates, reference, metadata, and customer link, then returns formatted JSON text content.
    elif name == "get_mandate": mandate_id = arguments["mandate_id"] mandate = client.mandates.get(mandate_id) result = { "id": mandate.id, "status": mandate.status, "scheme": mandate.scheme, "created_at": mandate.created_at, "reference": mandate.reference, "metadata": mandate.metadata if hasattr(mandate, 'metadata') else {}, "links": { "customer": mandate.links.customer if hasattr(mandate, 'links') else None, }, } return [ types.TextContent(type="text", text=_format_json(result)) ]
  • Registration of the 'get_mandate' tool in the list_tools handler, including name, description, and input schema requiring 'mandate_id'.
    types.Tool( name="get_mandate", description="Get a specific mandate by ID", inputSchema={ "type": "object", "properties": { "mandate_id": { "type": "string", "description": "The GoCardless mandate ID (e.g., MD123)", } }, "required": ["mandate_id"], }, ),
  • Input schema definition for 'get_mandate' tool: object with required 'mandate_id' string property.
    types.Tool( name="get_mandate", description="Get a specific mandate by ID", inputSchema={ "type": "object", "properties": { "mandate_id": { "type": "string", "description": "The GoCardless mandate ID (e.g., MD123)", } }, "required": ["mandate_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