Skip to main content
Glama
visaacceptance

Visa Acceptance

list_payment_links

Retrieve paginated payment links from Visa Acceptance. Optionally filter by status to organize and review payment links for management.

Instructions

This tool will list payment links from Visa Acceptance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetYesPagination offset (required)
limitYesPagination limit (required)
statusNoFilter by status (optional)

Implementation Reference

  • The main handler function that executes the 'list_payment_links' tool. It uses the CyberSource PaymentLinksApi.getAllPaymentLinks to fetch payment links with pagination (offset, limit) and an optional status filter.
    export const listPaymentLinks = async (
      visaClient: any,
      context: VisaContext,
      params: z.infer<ReturnType<typeof listPaymentLinksParameters>>
    ) => {
      try {
        const paymentLinkApiInstance = new cybersourceRestApi.PaymentLinksApi(visaClient.configuration, visaClient.visaApiClient);
        
        const opts: { status?: string } = {};
        if (params.status) {
          opts.status = params.status;
        }
        
        const result = await new Promise((resolve, reject) => {
          paymentLinkApiInstance.getAllPaymentLinks(
            params.offset,
            params.limit,
            opts,
            (error: any, data: any) => {
              if (error) {
                reject(error);
              } else {
                resolve(data);
              }
            }
          );
        });
        
        return result;
      } catch (error) {
        return 'Failed to list payment links';
      }
    };
  • Input parameter schema for the 'list_payment_links' tool, defined using Zod. Parameters: offset (number, required), limit (number, required), status (string, optional).
    export const listPaymentLinksParameters = (
      context: VisaContext = {} as VisaContext
    ) => {
      return z.object({
        offset: z.number().describe('Pagination offset (required)'),
        limit: z.number().describe('Pagination limit (required)'),
        status: z.string().optional().describe('Filter by status (optional)')
      });
    };
  • Registration of the tool as a Tool object with method 'list_payment_links', name 'List Payment Links', description, parameters, actions (paymentLinks with read permission), and the execute handler.
    const tool = (context: VisaContext): Tool => ({
      method: 'list_payment_links',
      name: 'List Payment Links',
      description: listPaymentLinksPrompt(context),
      parameters: listPaymentLinksParameters(context),
      actions: {
        paymentLinks: {
          read: true,
        },
      },
      execute: listPaymentLinks,
    });
  • The createTools function that collects all tools into an array, including listPaymentLinkToolModule(context) which creates the 'list_payment_links' tool.
    export function createTools(context: VisaContext): Tool[] {
      return [
        createInvoiceToolModule(context),
        updateInvoiceToolModule(context),
        getInvoiceToolModule(context),
        listInvoicesToolModule(context),
        sendInvoiceToolModule(context),
        cancelInvoiceToolModule(context),
        createPaymentLinkToolModule(context),
        updatePaymentLinkToolModule(context),
        getPaymentLinkToolModule(context),
        listPaymentLinkToolModule(context)
  • The maskPII utility function imported by listPaymentLinks.ts (though not used directly in the handler, it is imported).
    export const maskPII = (
Behavior2/5

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

With no annotations provided, the description should explicitly state behavioral traits. It only says 'list', implying read-only, but does not confirm safety, idempotency, or whether any side effects occur. This is minimal transparency for a tool with no annotations.

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

Conciseness3/5

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

The description is a single concise sentence, but it lacks structure (e.g., bullet points) and is overly minimal. While front-loaded, it does not earn its place with sufficient detail.

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 existence of sibling list tools and the absence of an output schema, the description should explain return format, pagination behavior, and scope. It only mentions the source (Visa Acceptance), leaving significant gaps for an agent.

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 coverage is 100%, so the schema already documents parameters. The description adds no extra meaning beyond what the schema provides (e.g., offset/limit usage, status filtering details). Baseline 3 is appropriate.

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 it lists payment links from Visa Acceptance, distinguishing it from sibling tools like get_payment_link (single) and create_payment_link (create). However, it could be more specific about the scope (e.g., 'all' or 'paginated').

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

Usage Guidelines2/5

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

No guidance is given on when to use this tool versus alternatives like get_payment_link or list_invoices. The description does not indicate prerequisites, filtering nuances, or when to prefer this over single retrieval.

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/visaacceptance/agent-toolkit'

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