Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

List customer subscriptions

deonpay_list_customer_subscriptions

List individual customer subscriptions filtered by plan, email, or status. Returns charges, billing periods, and next charge date.

Instructions

List individual customer subscriptions (the per-customer rows, NOT the plans). Use this to answer 'who is currently subscribed to plan X', 'how many trialing subscribers do I have', or 'find subscribers on past_due'. Filter by subscription_id (the plan), customer_email (exact, case-insensitive), and status (active/paused/cancelled/past_due/completed/trialing). Each item includes the plan denormalized as a subscription sub-object, charges_count, total_charged in centavos, current_period_start/end, next_charge_at, and cancel_at_period_end.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based). Defaults to 1.
limitNoPage size. Maximum 100, default 20.
subscription_idNoFilter by plan UUID.
customer_emailNoExact email match (case-insensitive).
statusNo
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 that executes the tool logic. It calls client.get('/customer-subscriptions', compact(args)) to fetch the list of customer subscriptions from the DeonPay API.
    safeHandler(async (args) => {
      return client.get(
        "/customer-subscriptions",
        compact(args),
      );
    }),
  • Input schema for the tool, defining optional parameters: page, limit, subscription_id (UUID), customer_email (exact match), status (active/paused/cancelled/past_due/completed/trialing), and environment.
    {
      title: "List customer subscriptions",
      description:
        "List individual customer subscriptions (the per-customer rows, NOT the plans). Use this to answer 'who is currently subscribed to plan X', 'how many trialing subscribers do I have', or 'find subscribers on past_due'. Filter by subscription_id (the plan), customer_email (exact, case-insensitive), and status (active/paused/cancelled/past_due/completed/trialing). Each item includes the plan denormalized as a `subscription` sub-object, charges_count, total_charged in centavos, current_period_start/end, next_charge_at, and cancel_at_period_end.",
      inputSchema: {
        page: PageSchema.optional(),
        limit: LimitSchema.optional(),
        subscription_id: z.string().uuid().optional().describe("Filter by plan UUID."),
        customer_email: z.string().email().optional().describe("Exact email match (case-insensitive)."),
        status: CustomerSubscriptionStatusSchema.optional(),
        environment: EnvironmentSchema.optional(),
      },
    },
  • Zod enum schema validating subscription status values: active, paused, cancelled, past_due, completed, trialing.
    const CustomerSubscriptionStatusSchema = z.enum([
      "active",
      "paused",
      "cancelled",
      "past_due",
      "completed",
      "trialing",
    ]);
  • The registerCustomerSubscriptionTools function that registers the tool on the McpServer with the name 'deonpay_list_customer_subscriptions'.
    export function registerCustomerSubscriptionTools(
      server: McpServer,
      client: DeonpayClient,
    ): void {
      // -------------------------------------------------------------------------
      // deonpay_list_customer_subscriptions
      // -------------------------------------------------------------------------
      server.registerTool(
        "deonpay_list_customer_subscriptions",
        {
          title: "List customer subscriptions",
          description:
            "List individual customer subscriptions (the per-customer rows, NOT the plans). Use this to answer 'who is currently subscribed to plan X', 'how many trialing subscribers do I have', or 'find subscribers on past_due'. Filter by subscription_id (the plan), customer_email (exact, case-insensitive), and status (active/paused/cancelled/past_due/completed/trialing). Each item includes the plan denormalized as a `subscription` sub-object, charges_count, total_charged in centavos, current_period_start/end, next_charge_at, and cancel_at_period_end.",
          inputSchema: {
            page: PageSchema.optional(),
            limit: LimitSchema.optional(),
            subscription_id: z.string().uuid().optional().describe("Filter by plan UUID."),
            customer_email: z.string().email().optional().describe("Exact email match (case-insensitive)."),
            status: CustomerSubscriptionStatusSchema.optional(),
            environment: EnvironmentSchema.optional(),
          },
        },
        safeHandler(async (args) => {
          return client.get(
            "/customer-subscriptions",
            compact(args),
          );
        }),
      );
  • Top-level registration: registerAllTools calls registerCustomerSubscriptionTools to wire up all customer subscription tools on the MCP server.
    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);
    }
Behavior4/5

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

No annotations provided, so description must cover behavioral traits. It discloses the list operation (read-only implied), filter behavior for each parameter, and the environment override quirk (silently ignored if mismatch). Missing explicit read-only statement but still informative.

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?

Single lean paragraph, front-loaded with purpose and use cases, then detailed filter options and return fields. No fluff, every sentence adds value.

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 description covers key return fields (plan, charges, period dates, etc.). Pagination parameters are in schema but not described in detail; otherwise complete for listing tool.

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?

With 83% schema coverage baseline, description adds significant meaning: explains subscription_id as plan filter, customer_email case-insensitivity, status enum values, environment override behavior, and return fields (plan sub-object, charges, etc.). Goes beyond schema definitions.

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?

Description clearly states it lists per-customer subscriptions (not plans), provides specific use cases like 'who is currently subscribed to plan X', and distinguishes from sibling tools that list plans or single subscriptions.

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?

Explicitly tells when to use the tool (answering questions about subscribers, trialing, etc.) and differentiates from plans. Lacks explicit 'when not to use' or alternatives but provides sufficient context for typical use.

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