Skip to main content
Glama

get_customer

Retrieve a specific GoCardless customer's details using their unique customer ID to access payment information and manage account data.

Instructions

Get a specific customer by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
customer_idYesThe GoCardless customer ID (e.g., CU123)

Implementation Reference

  • Handler implementation for 'get_customer' tool: extracts customer_id, fetches customer using GoCardless client, formats response with customer details including address and metadata, returns as formatted JSON text.
    elif name == "get_customer":
        customer_id = arguments["customer_id"]
        customer = client.customers.get(customer_id)
        result = {
            "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,
            "address_line1": customer.address_line1,
            "address_line2": customer.address_line2,
            "city": customer.city,
            "postal_code": customer.postal_code,
            "country_code": customer.country_code,
            "metadata": customer.metadata if hasattr(customer, 'metadata') else {},
        }
        return [
            types.TextContent(type="text", text=_format_json(result))
        ]
  • Registration of the 'get_customer' tool in list_tools(), including name, description, and input schema requiring 'customer_id'.
    types.Tool(
        name="get_customer",
        description="Get a specific customer by ID",
        inputSchema={
            "type": "object",
            "properties": {
                "customer_id": {
                    "type": "string",
                    "description": "The GoCardless customer ID (e.g., CU123)",
                }
            },
            "required": ["customer_id"],
        },
    ),
  • Input schema for 'get_customer' tool: object with required 'customer_id' string.
    inputSchema={
        "type": "object",
        "properties": {
            "customer_id": {
                "type": "string",
                "description": "The GoCardless customer ID (e.g., CU123)",
            }
        },
        "required": ["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 but only states the basic action without disclosing behavioral traits. It doesn't mention whether this is a read-only operation, requires authentication, has rate limits, returns error handling for invalid IDs, or what data format to expect. This leaves significant gaps for an agent to understand tool behavior.

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, clear sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loaded with essential information, making it highly efficient.

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 the tool's simplicity (1 parameter, no output schema), the description is incomplete. It lacks details on return values, error conditions, or behavioral context, which are crucial for an agent to use it effectively. Without annotations or output schema, the description should compensate more to provide a complete picture.

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 description adds minimal meaning beyond the input schema, which has 100% coverage and documents the 'customer_id' parameter well. The description implies the ID is used for retrieval but doesn't provide additional context like ID format examples or validation rules. Baseline 3 is appropriate since the schema does the heavy lifting.

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 ('Get') and resource ('a specific customer by ID'), making the purpose immediately understandable. It distinguishes from siblings like 'list_customers' by specifying retrieval of a single customer. However, it doesn't explicitly mention what 'get' entails (e.g., retrieving full details vs. basic info), keeping it from a perfect score.

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

Usage Guidelines3/5

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

The description implies usage when you have a customer ID, suggesting it's for retrieving known customers rather than listing or creating them. However, it lacks explicit guidance on when to use this vs. alternatives like 'list_customers' for browsing or 'get_subscription' for related data, and doesn't mention prerequisites or exclusions.

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