Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

Get customer details by email

deonpay_get_customer

Retrieve a customer's complete profile by email: basic info, saved cards, active subscriptions, and the last 20 transactions.

Instructions

Fetch a customer's full profile by email. Returns basic info, saved_cards (safe metadata only — never the vault token), active_subscriptions (status active/trialing/past_due/paused), and the last 20 transactions (excluding $10 MXN card-validation charges). Use this when the user asks 'show me everything about cliente@x.com' or 'what cards does this customer have on file'. The email is URL-encoded automatically — pass the plain email.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailYesCustomer email (plain — encoding is handled internally).
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

  • The handler function for deonpay_get_customer. It takes email (and optional environment), URL-encodes the email, and makes a GET request to /customers/{email}.
      safeHandler(async ({ email, environment }) => {
        const path = `/customers/${encodePathSegment(email)}`;
        return client.get(path, compact({ environment }));
      }),
    );
  • Input schema for deonpay_get_customer: requires an email string (validated as email) and optional environment enum (sandbox/production).
    {
      title: "Get customer details by email",
      description:
        "Fetch a customer's full profile by email. Returns basic info, saved_cards (safe metadata only — never the vault token), active_subscriptions (status active/trialing/past_due/paused), and the last 20 transactions (excluding $10 MXN card-validation charges). Use this when the user asks 'show me everything about cliente@x.com' or 'what cards does this customer have on file'. The email is URL-encoded automatically — pass the plain email.",
      inputSchema: {
        email: z.string().email().describe("Customer email (plain — encoding is handled internally)."),
        environment: EnvironmentSchema.optional(),
      },
    },
  • Registration of deonpay_get_customer via server.registerTool with name, title, description, inputSchema, and the handler callback.
    server.registerTool(
      "deonpay_get_customer",
      {
        title: "Get customer details by email",
        description:
          "Fetch a customer's full profile by email. Returns basic info, saved_cards (safe metadata only — never the vault token), active_subscriptions (status active/trialing/past_due/paused), and the last 20 transactions (excluding $10 MXN card-validation charges). Use this when the user asks 'show me everything about cliente@x.com' or 'what cards does this customer have on file'. The email is URL-encoded automatically — pass the plain email.",
        inputSchema: {
          email: z.string().email().describe("Customer email (plain — encoding is handled internally)."),
          environment: EnvironmentSchema.optional(),
        },
      },
      safeHandler(async ({ email, environment }) => {
        const path = `/customers/${encodePathSegment(email)}`;
        return client.get(path, compact({ environment }));
      }),
    );
  • registerAllTools calls registerCustomerTools which registers the deonpay_get_customer tool (among others).
    export function registerAllTools(server: McpServer, client: DeonpayClient): void {
      registerLinkTools(server, client);
      registerCheckoutTools(server, client);
      registerTransactionTools(server, client);
      registerProductTools(server, client);
      registerSubscriptionTools(server, client);
      registerCustomerSubscriptionTools(server, client);
      registerCustomerTools(server, client);
      registerMetricsTools(server, client);
    }
  • encodePathSegment wraps encodeURIComponent to safely URL-encode the email for the path segment.
    export function encodePathSegment(value: string): string {
      return encodeURIComponent(value);
    }
Behavior4/5

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

No annotations provided, but the description compensates by detailing what is returned (safe metadata for cards, active subscription statuses, last 20 transactions excluding certain charges) and the silent behavior of the environment parameter. It could mention authentication requirements, but overall transparent.

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?

Four sentences with a clear front-loaded purpose. Each sentence adds essential information without redundancy. Efficient and well-structured.

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

Completeness4/5

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

No output schema, but the description thoroughly explains the return fields (basic info, saved_cards, subscriptions, last 20 transactions). It covers the tool's key behavior and constraints. Could mention transaction ordering or pagination, but sufficient for the parameter set.

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 by noting automatic URL encoding for email and the environment parameter's behavior (silently ignored on mismatch). This enriches understanding beyond the schema descriptions.

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 clearly states the tool fetches a customer's full profile by email, listing specific data returned (saved_cards, subscriptions, transactions). It distinguishes itself from siblings like deonpay_list_customers or deonpay_get_customer_subscription by focusing on a complete profile retrieval via email.

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

Usage Guidelines5/5

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

Provides explicit usage examples ('show me everything about cliente@x.com' or 'what cards does this customer have on file'), and explains that email is URL-encoded automatically, reducing user effort. This gives clear guidance on when to invoke the tool.

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