Skip to main content
Glama
hectortemich

@deonpay/mcp-server

by hectortemich

List payment links

deonpay_list_links

Retrieve paginated payment links for your account, filterable by status, type, date range, and name search. Each link includes revenue stats.

Instructions

List payment links for the authenticated merchant. Use this when the user asks 'show me my payment links', 'what links did I create last week', or wants to find a link by name. Supports filtering by status (active/paused/expired/deleted), type (single/recurring/unlimited), free-text search across name/short_code/reference, and a date range. Returns a paginated list — each item includes id, short_code, name, amount in centavos, status, type, url, and aggregated stats (total_payments, successful_payments, total_revenue). Note: amounts are always in centavos (1 MXN = 100).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based). Defaults to 1.
limitNoPage size. Maximum 100, default 20.
statusNoFilter by link status.
typeNoFilter by link type.
searchNoFree-text search across link name, short_code, or merchant_reference.
date_fromNoOnly links created on/after this date.
date_toNoOnly links created on/before this date.

Implementation Reference

  • The handler function for the deonpay_list_links tool. Makes a GET request to /links with filtered/compact query params (page, limit, status, type, search, date_from, date_to). Wrapped in safeHandler for error handling.
    safeHandler(async (args) => {
      return client.get("/links", compact(args));
    }),
  • Input schema for deonpay_list_links: page, limit, status (active/paused/expired/deleted), type (single/recurring/unlimited), search (free-text), date_from, date_to. All optional. Uses Zod schemas from common.ts.
    {
      title: "List payment links",
      description:
        "List payment links for the authenticated merchant. Use this when the user asks 'show me my payment links', 'what links did I create last week', or wants to find a link by name. Supports filtering by status (active/paused/expired/deleted), type (single/recurring/unlimited), free-text search across name/short_code/reference, and a date range. Returns a paginated list — each item includes id, short_code, name, amount in centavos, status, type, url, and aggregated stats (total_payments, successful_payments, total_revenue). Note: amounts are always in centavos (1 MXN = 100).",
      inputSchema: {
        page: PageSchema.optional(),
        limit: LimitSchema.optional(),
        status: LinkStatusSchema.optional().describe("Filter by link status."),
        type: LinkTypeSchema.optional().describe("Filter by link type."),
        search: z
          .string()
          .optional()
          .describe("Free-text search across link name, short_code, or merchant_reference."),
        date_from: IsoDateStringSchema.optional().describe("Only links created on/after this date."),
        date_to: IsoDateStringSchema.optional().describe("Only links created on/before this date."),
      },
  • Registration of the 'deonpay_list_links' tool via server.registerTool() inside registerLinkTools(). Also shows the wrapping registration function that registers all link tools.
    export function registerLinkTools(server: McpServer, client: DeonpayClient): void {
      // -------------------------------------------------------------------------
      // deonpay_list_links
      // -------------------------------------------------------------------------
      server.registerTool(
        "deonpay_list_links",
        {
          title: "List payment links",
          description:
            "List payment links for the authenticated merchant. Use this when the user asks 'show me my payment links', 'what links did I create last week', or wants to find a link by name. Supports filtering by status (active/paused/expired/deleted), type (single/recurring/unlimited), free-text search across name/short_code/reference, and a date range. Returns a paginated list — each item includes id, short_code, name, amount in centavos, status, type, url, and aggregated stats (total_payments, successful_payments, total_revenue). Note: amounts are always in centavos (1 MXN = 100).",
          inputSchema: {
            page: PageSchema.optional(),
            limit: LimitSchema.optional(),
            status: LinkStatusSchema.optional().describe("Filter by link status."),
            type: LinkTypeSchema.optional().describe("Filter by link type."),
            search: z
              .string()
              .optional()
              .describe("Free-text search across link name, short_code, or merchant_reference."),
            date_from: IsoDateStringSchema.optional().describe("Only links created on/after this date."),
            date_to: IsoDateStringSchema.optional().describe("Only links created on/before this date."),
          },
        },
        safeHandler(async (args) => {
          return client.get("/links", compact(args));
        }),
      );
  • The safeHandler helper that wraps the handler with try/catch, converting results to jsonResult and errors to errorResult.
    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);
        }
      };
    }
  • The compact helper used by the handler to strip undefined/null/empty values from the args before sending to the API.
    export function compact<T extends Record<string, unknown>>(obj: T): Partial<T> {
      const out: Record<string, unknown> = {};
      for (const [key, value] of Object.entries(obj)) {
        if (value === undefined || value === null) continue;
        if (typeof value === "string" && value.trim() === "") continue;
        out[key] = value;
      }
      return out as Partial<T>;
Behavior4/5

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

Despite no annotations, the description discloses return structure (fields like id, short_code, amount in centavos, status, type, url, stats) and notes that amounts are in centavos. It implies a read-only operation but does not explicitly state it. The description adds value beyond the schema.

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 compact (four sentences) with the main action upfront ('List payment links for the authenticated merchant'), followed by usage examples and filter details. Every sentence adds value with no redundancy.

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?

The description compensates for the missing output schema by listing return fields and noting the centavos unit. It covers pagination implicitly via 'paginated list' but does not mention sorting order or response metadata. Sufficient for a typical list endpoint.

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 all 7 parameters with clear descriptions. The tool description does not add new parameter-level meaning; it merely summarizes filter options (status, type, search, date range) which are already in the schema. Baseline score is appropriate.

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 lists payment links for the authenticated merchant, provides example user requests, and distinguishes from siblings like deonpay_get_link (single retrieval) and deonpay_create_link (creation).

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 gives concrete use cases ('show me my payment links', 'what links did I create last week') and lists supported filters, effectively guiding when to use the tool. However, it does not explicitly state when not to use it or mention alternatives.

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