Skip to main content
Glama

get_mandate

Retrieve a specific payment authorization (mandate) by its unique ID to access details for managing recurring payments through GoCardless.

Instructions

Get a specific mandate by ID

Input Schema

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

Implementation Reference

  • The handler logic for the 'get_mandate' tool within the @server.call_tool() function. It retrieves the mandate using the GoCardless client API and formats the response as 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 @server.list_tools() function, defining its name, description, and input schema.
    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 the 'get_mandate' tool, specifying the required 'mandate_id' parameter.
    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