Skip to main content
Glama
bquigley1

Finix MCP Server

by bquigley1

list_buyers

Retrieve a list of buyers from Finix payment processing. Filter results by email or limit the number of records returned for efficient buyer management.

Instructions

This tool will fetch a list of Buyers from Finix.

It takes two arguments:

  • limit (int, optional): The number of buyers to return.

  • email (str, optional): A case-sensitive filter on the list based on the buyer's email field.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
emailNo

Implementation Reference

  • The main handler function that executes the tool logic: fetches identities from Finix API using provided limit and email filters, filters for buyers (those with identity_roles including 'BUYER'), and returns an array of buyer IDs.
    const listBuyers = 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 { limit, email } = params;
        
        // Build query parameters  
        const queryParams = new URLSearchParams();
        
        if (limit) queryParams.append('limit', limit.toString());
        if (email) queryParams.append('email', email);
    
        const response = await client.get(`/identities?${queryParams.toString()}`);
        
        if (response.error) {
          throw new Error(`Error listing buyers: ${response.error.message}`);
        }
        
        const data = response.data;
        const identities = data._embedded?.identities || [];
        
        // Filter for buyers only and return just IDs like Stripe
        const buyers = identities
          .filter((identity: any) => identity.identity_roles?.includes('BUYER'))
          .map((buyer: any) => ({ id: buyer.id }));
        
        return buyers;
    
      } catch (error) {
        throw error;
      }
    };
  • Zod input schema defining optional parameters: limit (integer 1-100) and email (string filter).
    const listBuyersParameters = () => z.object({
      limit: z.number().int().min(1).max(100).optional().describe(
        'A limit on the number of objects to be returned. Limit can range between 1 and 100.'
      ),
      email: z.string().optional().describe(
        'A case-sensitive filter on the list based on the buyer\'s email field. The value must be a string.'
      )
    });
  • ToolFactory registration defining the 'list_buyers' tool, including method name, name, description, parameters, annotations, actions, and reference to the execute handler. Exported as default.
    const tool: ToolFactory = () => ({
      method: 'list_buyers',
      name: 'List Buyers',
      description: listBuyersPrompt(),
      parameters: listBuyersParameters(),
      annotations: listBuyersAnnotations(),
      actions: {
        identities: {
          read: true
        }
      },
      execute: listBuyers
    });
    
    export default tool;
  • Central registration of all tools in the allTools array, including the listBuyers tool.
    export const allTools: ToolFactory[] = [
      // Search & Documentation
      searchDocs,
      
      // Identities (Buyers/Sellers)
      createBuyer,
      createSeller,
      listBuyers,
      listSellers,
      
      // Payment Links
      createPaymentLink,
    ];
  • Prompt/description generator for the list_buyers tool.
    const listBuyersPrompt = () => `
    This tool will fetch a list of Buyers from Finix.
    
    It takes two arguments:
    - limit (int, optional): The number of buyers to return.
    - email (str, optional): A case-sensitive filter on the list based on the buyer's email field.
    `;
  • Annotations for the list_buyers tool indicating it is read-only, idempotent, etc.
    const listBuyersAnnotations = () => ({
      destructiveHint: false,
      idempotentHint: true,
      openWorldHint: true,
      readOnlyHint: true,
      title: 'List buyers'
    });
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 mentions 'fetch a list' implying a read operation, but doesn't specify if it's paginated, requires authentication, has rate limits, or returns structured data. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by a clear bullet-point list of parameters with type hints and brief explanations. Every sentence earns its place with no redundant information, making it efficient and easy to parse.

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?

Given the tool's moderate complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameters but lacks details on return format, error handling, or integration with sibling tools. For a list operation with filtering, more context on result structure or limitations would improve completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaningful context beyond the input schema: it explains that 'email' is a 'case-sensitive filter on the list based on the buyer's email field' and clarifies both parameters are optional. With 0% schema description coverage, this compensates well by providing practical usage information that the schema alone doesn't offer, though it could detail default values or filtering logic more.

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: 'fetch a list of Buyers from Finix' with a specific verb ('fetch') and resource ('Buyers'). It distinguishes from siblings like 'create_buyer' (creation vs. listing) and 'list_sellers' (different resource type), though it doesn't explicitly differentiate from 'search_finix_docs' which might overlap in search functionality. The purpose is clear but could be more specific about scope.

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. It doesn't mention when to prefer 'list_buyers' over 'search_finix_docs' for buyer-related queries, or how it differs from 'create_buyer' in workflow context. There's no explicit when/when-not advice or prerequisite information, leaving usage decisions ambiguous.

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