Skip to main content
Glama
bquigley1

Finix MCP Server

by bquigley1

create_payment_link

Generate payment links for merchants by specifying price in cents and quantity, enabling secure online transactions through the Finix payment processing system.

Instructions

This tool will create a payment link in Finix.

It takes three arguments:

  • merchant_id (str): The ID of the merchant the payment link is created under.

  • price (int): The unit price in cents.

  • quantity (int): The quantity of the product to include in the payment link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
merchant_idYesThe ID of the merchant the payment link is created under
priceYesThe unit price in cents
quantityYesThe quantity of the product to include in the payment link

Implementation Reference

  • The main handler function that executes the tool's core logic: validates credentials, constructs payload from merchant_id, price, quantity, posts to /payment_links endpoint, and returns the link id and url.
    const createPaymentLink = async (client: FinixClient, _context: FinixContext, params: any): Promise<any> => {
      try {
        if (!client.hasCredentials()) {
          throw new Error('Finix username and password are required for this operation. Please configure FINIX_USERNAME and FINIX_PASSWORD in your environment.');
        }
    
        const { merchant_id, price, quantity } = params;
    
        const total_price = price * quantity;
    
        const payload = {
          merchant_id,
          payment_frequency: 'ONE_TIME',
          allowed_payment_methods: ['PAYMENT_CARD', 'ACH'],
          nickname: `Payment Link`,
          items: [{
            name: 'Payment',
            quantity,
            unit_price: price,
            total_price
          }]
        };
    
        const response = await client.post('/payment_links', payload);
        
        if (response.error) {
          throw new Error(`Error creating payment link: ${response.error.message}`);
        }
        
        // Return ID and URL so users can actually use the payment link
        return { 
          id: response.data.id, 
          url: response.data.url 
        };
    
      } catch (error) {
        throw error;
      }
    };
  • Zod schema for input parameters: merchant_id (string), price (positive integer in cents), quantity (positive integer).
    const createPaymentLinkParameters = () => z.object({
      merchant_id: z.string().describe('The ID of the merchant the payment link is created under'),
      price: z.number().int().min(1).describe('The unit price in cents'),
      quantity: z.number().int().min(1).describe('The quantity of the product to include in the payment link')
    });
  • Tool factory object defining the tool with method name 'create_payment_link', description, parameters schema, annotations, actions, and linking to the execute handler.
    const tool: ToolFactory = () => ({
      method: 'create_payment_link',
      name: 'Create Payment Link',
      description: createPaymentLinkPrompt(),
      parameters: createPaymentLinkParameters(),
      annotations: createPaymentLinkAnnotations(),
      actions: {
        payment_links: {
          create: true
        }
      },
      execute: createPaymentLink
    });
  • Inclusion of the createPaymentLink tool in the exported allTools array for global tool registration.
      // Payment Links
      createPaymentLink,
    ];
  • Prompt string providing natural language description of the tool's purpose and parameters.
    const createPaymentLinkPrompt = () => `
    This tool will create a payment link in Finix.
    
    It takes three arguments:
    - merchant_id (str): The ID of the merchant the payment link is created under.
    - price (int): The unit price in cents.
    - quantity (int): The quantity of the product to include in the payment link.
    `;
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a creation operation but doesn't disclose behavioral traits like required permissions, whether this is a mutating operation, what happens on success/failure, rate limits, or what the created payment link enables. For a payment-related creation tool with zero annotation coverage, this is insufficient.

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 appropriately concise with three sentences: purpose statement followed by parameter listing. It's front-loaded with the core functionality. No wasted words, though the parameter section could be more integrated rather than a bullet-like list.

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?

For a payment link creation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what a payment link is, what it's used for, what the response contains, or any behavioral implications. The agent lacks crucial context about this financial operation's nature and consequences.

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 fully documents all three parameters. The description repeats the parameter names and types but adds no additional semantic context beyond what's in the schema (e.g., format expectations, business rules, or examples). Baseline 3 is appropriate when schema does the heavy lifting.

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 the tool's purpose: 'create a payment link in Finix' with a specific verb (create) and resource (payment link). It distinguishes from sibling tools like create_buyer/create_seller by specifying the resource type, though it doesn't explicitly contrast with them.

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 provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when-not-to-use scenarios, or how this differs from potential sibling tools beyond the resource name. The agent must infer usage context from the tool name alone.

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/bquigley1/finix-mcp'

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