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)",
            }
        },
    },
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. It states it's a list operation but doesn't mention whether it's paginated, sorted, filtered, or has rate limits. For a list tool with zero annotation coverage, this leaves significant behavioral gaps about how the operation actually works.

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 waste. It's appropriately sized for a simple list tool and front-loads the essential information 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?

Given no annotations, no output schema, and a simple parameter with full schema coverage, the description is incomplete. It doesn't explain what the return format looks like (e.g., array of customer objects), pagination behavior, or error conditions, which are important for a list operation.

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?

Schema description coverage is 100%, so the schema already documents the single 'limit' parameter with its type and default. The description adds no additional parameter information beyond what's in the schema, meeting the baseline for high schema coverage.

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 verb ('List') and resource ('all customers from GoCardless'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'get_customer' or other list tools, which would require explicit scope clarification to earn a 5.

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_customer' for individual retrieval or other list tools for different resources. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage from the tool name alone.

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