Skip to main content
Glama
visaacceptance

Visa Acceptance

get_payment_link

Retrieve a specific payment link from Visa Acceptance using its unique ID to access payment details and transaction information.

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 tool logic: retrieves a specific payment link by ID using the CyberSource REST API PaymentLinksApi.
    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';
      }
    };
  • Zod schema defining the input parameters for the tool: a required string 'id' for the payment link ID.
    export const getPaymentLinkParameters = (
      context: VisaContext = {} as VisaContext
    ) => {
      return z.object({
        id: z.string().describe('Payment link ID (required)')
      });
    };
  • Tool registration object definition, exporting a function that returns the Tool config with method 'get_payment_link', linking to schema, description, and 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;
  • Inclusion of the get_payment_link tool in the central createTools function that aggregates all tools.
    getPaymentLinkToolModule(context),
  • Import of the getPaymentLink tool module for registration in the tools list.
    import getPaymentLinkToolModule from './paymentLinks/getPaymentLink';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'will get a specific payment link,' implying a read operation, but does not specify if it's safe, requires authentication, has rate limits, or what the output includes (e.g., link details, status). This leaves significant gaps in understanding the tool's behavior.

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

Conciseness4/5

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

The description is a single, straightforward sentence with no wasted words, making it appropriately concise. However, it could be more front-loaded with critical details, such as specifying it retrieves details by ID, to improve structure slightly.

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 tool has no annotations and no output schema, the description is incomplete. It fails to explain what 'get' returns (e.g., payment link data, status) or any behavioral traits like error handling. For a tool with one parameter but missing structured context, this leaves too many gaps for effective use.

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?

The input schema has 100% description coverage, with the 'id' parameter documented as 'Payment link ID (required).' The description does not add any meaning beyond this, as it only mentions 'a specific payment link' without elaborating on the ID format or usage. Baseline 3 is appropriate since the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'will get a specific payment link from Visa Acceptance,' which provides a basic verb ('get') and resource ('payment link'). However, it lacks specificity about what 'get' entails (e.g., retrieve details, fetch status) and does not distinguish it from sibling tools like 'list_payment_links' or 'get_invoice,' making it vague in comparison.

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?

The description offers no guidance on when to use this tool versus alternatives. It does not mention prerequisites, such as needing a payment link ID, or compare it to siblings like 'list_payment_links' for broader queries or 'get_invoice' for related resources, leaving usage unclear.

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