Skip to main content
Glama
visaacceptance

Visa Acceptance

get_payment_link

Retrieve details of a specific payment link from Visa Acceptance by providing its ID. Access payment link information for processing or verification.

Instructions

This tool will get a specific payment link from Visa Acceptance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPayment link ID (required)

Implementation Reference

  • The main handler function that executes the 'get_payment_link' tool logic. It calls the Cybersource PaymentLinksApi.getPaymentLink API with the provided ID parameter.
    export const getPaymentLink = async (
      visaClient: any,
      context: VisaContext,
      params: z.infer<ReturnType<typeof getPaymentLinkParameters>>
    ) => {
      try {
        const paymentLinkApiInstance = new cybersourceRestApi.PaymentLinksApi(visaClient.configuration, visaClient.visaApiClient);
        
        const result = await new Promise((resolve, reject) => {
          paymentLinkApiInstance.getPaymentLink(params.id, (error: any, data: any) => {
            if (error) {
              reject(error);
            } else {
              resolve(data);
            }
          });
        });
        
        return result;
      } catch (error) {
        return 'Failed to get payment link';
      }
    };
  • Input parameter schema for the 'get_payment_link' tool, defining the 'id' field as a required string using Zod.
    export const getPaymentLinkParameters = (
      context: VisaContext = {} as VisaContext
    ) => {
      return z.object({
        id: z.string().describe('Payment link ID (required)')
      });
    };
  • Registration of the tool as a Tool object with method 'get_payment_link', name, description, parameters, actions, and execute handler.
    const tool = (context: VisaContext): Tool => ({
      method: 'get_payment_link',
      name: 'Get Payment Link',
      description: getPaymentLinkPrompt(context),
      parameters: getPaymentLinkParameters(context),
      actions: {
        paymentLinks: {
          read: true,
        },
      },
      execute: getPaymentLink,
    });
    
    export default tool;
  • The 'createTools' function that aggregates all tools, including getPaymentLinkToolModule, into a Tool array for the MCP server.
    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)
      ];
    }
  • Helper function that returns the prompt/description string for the 'get_payment_link' tool.
    export const getPaymentLinkPrompt = (context: VisaContext = {} as VisaContext) => `
    This tool will get a specific payment link from Visa Acceptance.
    `;
Behavior2/5

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

No annotations provided, so description carries full burden. Only states 'get', implying read-only, but no disclosure of auth, side effects, or behavior.

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 sentence, no superfluous words. Perfectly concise.

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

Completeness3/5

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

Adequate for a simple retrieval tool, but no description of return value or output format, which is needed since there is no output schema.

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% with one parameter described. Description adds no additional meaning beyond the schema.

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?

Clearly states the verb 'get' and resource 'payment link' from Visa Acceptance. Distinguishes from siblings like list_payment_links and create_payment_link.

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 on when to use this tool versus alternatives. Does not mention context or prerequisites.

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