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",
                },
            },
        },
    ),
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states it's a list operation but doesn't describe pagination behavior, rate limits, authentication requirements, or what happens when no mandates exist. For a list tool with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a simple list operation and gets straight to the point without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a list tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the mandates are returned in, whether results are paginated, what authentication is required, or how errors are handled. The combination of missing structured data and minimal description leaves the agent with significant uncertainty about tool behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so both parameters are fully documented in the schema itself. The description adds no additional parameter information beyond what's already in the structured fields. This meets the baseline expectation when the schema does the heavy lifting, but doesn't provide extra context about parameter interactions or usage patterns.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List') and resource ('mandates from GoCardless'), making the tool's purpose immediately understandable. It doesn't differentiate from sibling tools like 'list_customers' or 'list_payments' beyond the resource name, but the verb+resource combination is specific enough for basic understanding.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'get_mandate' (for a single mandate) or other list tools. There's no mention of prerequisites, typical use cases, or contextual factors that would help an agent choose between this and sibling list operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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