Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

List customers

deonpay_list_customers

List merchants' customers with completed transactions, sorted by recent, revenue, or activity. Search by email, name, or phone to identify top or recurring buyers.

Instructions

List the merchant's customers (people who have completed at least one non-validation transaction). Use this for questions like 'who are my top customers', 'how many recurring buyers do I have', 'find customers with email containing X'. Sort by 'recent' (last transaction, default), 'revenue' (most spent), or 'transactions' (most active). Each row includes email, name, phone, first_seen_at, last_seen_at, total_transactions, total_spent in centavos, active_subscriptions and saved_cards_count.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based). Defaults to 1.
limitNoPage size. Maximum 100, default 20.
searchNoFree-text search across email, name, phone.
sortNoSort order. Default 'recent'.
environmentNoOverride the environment to query. The DeonPay API only honors this if it matches the environment baked into the API token; otherwise it is silently ignored. Useful when the same dashboard exposes both envs.

Implementation Reference

  • Handler function for deonpay_list_customers — calls the DeonPay API GET /customers endpoint with pagination, search, sort, and environment params via the client.
    safeHandler(async (args) => {
      return client.get("/customers", compact(args));
    }),
  • Input schema for deonpay_list_customers — accepts optional page, limit, search, sort (recent/revenue/transactions), and environment.
    inputSchema: {
      page: PageSchema.optional(),
      limit: LimitSchema.optional(),
      search: z.string().optional().describe("Free-text search across email, name, phone."),
      sort: z
        .enum(["recent", "revenue", "transactions"])
        .optional()
        .describe("Sort order. Default 'recent'."),
      environment: EnvironmentSchema.optional(),
    },
  • Registration of deonpay_list_customers via server.registerTool with name, metadata, and handler.
    server.registerTool(
      "deonpay_list_customers",
      {
        title: "List customers",
        description:
          "List the merchant's customers (people who have completed at least one non-validation transaction). Use this for questions like 'who are my top customers', 'how many recurring buyers do I have', 'find customers with email containing X'. Sort by 'recent' (last transaction, default), 'revenue' (most spent), or 'transactions' (most active). Each row includes email, name, phone, first_seen_at, last_seen_at, total_transactions, total_spent in centavos, active_subscriptions and saved_cards_count.",
        inputSchema: {
          page: PageSchema.optional(),
          limit: LimitSchema.optional(),
          search: z.string().optional().describe("Free-text search across email, name, phone."),
          sort: z
            .enum(["recent", "revenue", "transactions"])
            .optional()
            .describe("Sort order. Default 'recent'."),
          environment: EnvironmentSchema.optional(),
        },
      },
      safeHandler(async (args) => {
        return client.get("/customers", compact(args));
      }),
    );
  • Registration entry point — registerCustomerTools is called from registerAllTools in the tool index.
      registerCustomerTools(server, client);
      registerMetricsTools(server, client);
    }
  • safeHandler wraps the tool's handler function with try/catch, converting errors to MCP error results.
    export function safeHandler<TArgs>(
      fn: (args: TArgs) => Promise<unknown>,
    ): (args: TArgs) => Promise<CallToolResult> {
      return async (args: TArgs) => {
        try {
          const value = await fn(args);
          return jsonResult(value);
        } catch (err) {
          return errorResult(err);
        }
      };
    }
Behavior5/5

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

With no annotations, the description fully carries the behavioral disclosure burden. It explains that customers are defined as having at least one non-validation transaction, details sort options with meanings, lists returned fields, and describes the environment parameter's silent override behavior. This covers safety, scope, and return format comprehensively.

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

Conciseness4/5

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

The description is a single paragraph but achieves clarity without wasted words. It front-loads the core purpose and then details parameters. While a bulleted list could improve scannability, the current structure is acceptable and not overly verbose.

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

Completeness5/5

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

Despite lacking an output schema, the description lists all returned fields (email, name, phone, first_seen_at, etc.), covers pagination (page, limit), sorting, search, and environment override. For a list endpoint, this provides complete context without missing crucial details.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3. The description adds value beyond the schema by explaining the search parameter covers email/name/phone, defining sort option semantics ('recent' = last transaction, 'revenue' = most spent, 'transactions' = most active), and clarifying environment override behavior. This enriches parameter understanding.

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

Purpose5/5

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

The description explicitly states the tool lists customers who have completed at least one non-validation transaction, distinguishing it from sibling tools like deonpay_get_customer (single customer) or deonpay_list_customer_subscriptions. The verb 'list' and resource 'customers' are clear, with no ambiguity.

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

Usage Guidelines4/5

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

The description provides example questions that the tool can answer (e.g., 'who are my top customers', 'find customers with email containing X'), giving clear guidance on when to use it. However, it lacks explicit guidance on when not to use it or alternatives, though sibling names hint at other tools.

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/hectortemich/deonpay-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server