Skip to main content
Glama
bquigley1

Finix MCP Server

by bquigley1

search_finix_docs

Search Finix documentation to find API references and guides using queries, with filters for category and result limits.

Instructions

This tool searches the Finix documentation for relevant information.

It takes the following arguments:

  • query (str): The search query to find relevant Finix documentation.

  • limit (int, optional): Maximum number of results to return (default: 10).

  • category (str, optional): Filter by document category - "api" for API Reference, "docs" for Documentation, or "all" for both (default: "all").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query to find relevant Finix documentation
limitNo
categoryNoall

Implementation Reference

  • The main handler function that executes the tool logic: destructures params, builds filters based on category, calls client.searchDocs, parses and formats results.
    const searchDocs = async (client: FinixClient, context: FinixContext, params: any): Promise<any> => {
      try {
        const { query, limit = 10, category = 'all' } = params;
    
        // Build filters based on category selection
        const filters: any[] = [];
        if (category === 'api') {
          filters.push({
            field: 'redocly_category',
            values: ['API Reference'],
            isQuickFilter: true
          });
        } else if (category === 'docs') {
          filters.push({
            field: 'redocly_category',
            values: ['Documentation'],
            isQuickFilter: true
          });
        } else if (category === 'all') {
          filters.push({
            field: 'redocly_category',
            values: ['API Reference', 'Documentation'],
            isQuickFilter: true
          });
        }
    
        const response = await client.searchDocs(query, filters);
        
        if (response.error) {
          return `Error searching Finix docs: ${response.error.message}`;
        }
    
        const results = parseSearchResults(response.data, limit);
        return formatSearchResults(results, query);
    
      } catch (error) {
        return `Error searching Finix docs: ${error instanceof Error ? error.message : 'Unknown error'}`;
      }
    };
  • Tool schema: prompt description, Zod input parameters schema, and annotations (idempotent, read-only, etc.).
    const searchDocsPrompt = (context: FinixContext = {}) => `
    This tool searches the Finix documentation for relevant information.
    
    It takes the following arguments:
    - query (str): The search query to find relevant Finix documentation.
    - limit (int, optional): Maximum number of results to return (default: 10).
    - category (str, optional): Filter by document category - "api" for API Reference, "docs" for Documentation, or "all" for both (default: "all").
    `;
    
    const searchDocsParameters = (context: FinixContext = {}) => z.object({
      query: z.string().describe('The search query to find relevant Finix documentation'),
      limit: z.number().int().min(1).max(50).optional().default(10).describe('Maximum number of results to return'),
      category: z.enum(['api', 'docs', 'all']).optional().default('all').describe('Filter by document category')
    });
    
    const searchDocsAnnotations = () => ({
      destructiveHint: false,
      idempotentHint: true,
      openWorldHint: true,
      readOnlyHint: true,
      title: 'Search Finix Documentation'
    });
  • Local tool factory registration defining method name 'search_finix_docs', bindings to schema/handler, and default export.
    const tool: ToolFactory = (context) => ({
      method: 'search_finix_docs',
      name: 'Search Finix Documentation',
      description: searchDocsPrompt(context),
      parameters: searchDocsParameters(context),
      annotations: searchDocsAnnotations(),
      actions: {
        documentation: {
          read: true
        }
      },
      execute: searchDocs
    });
    
    export default tool;
  • Global tool registry: allTools array including the searchDocs tool factory (imported from ./search/searchDocs.js).
    export const allTools: ToolFactory[] = [
      // Search & Documentation
      searchDocs,
      
      // Identities (Buyers/Sellers)
      createBuyer,
      createSeller,
      listBuyers,
      listSellers,
      
      // Payment Links
      createPaymentLink,
    ];
  • Helper function to parse raw search response data into structured SearchResult[] for API Reference and Documentation categories.
    function parseSearchResults(data: any, limit: number): SearchResult[] {
      if (!data || !data.documents) {
        return [];
      }
    
      const results: SearchResult[] = [];
    
      // Process API Reference documents
      if (data.documents['API Reference'] && Array.isArray(data.documents['API Reference'])) {
        const apiDocs = data.documents['API Reference'].slice(0, limit);
        
        for (const item of apiDocs) {
          if (item.document) {
            const doc = item.document;
            const title = `${doc.httpMethod?.toUpperCase() || 'API'} ${doc.httpPath || doc.apiTitle || 'Finix API'}`;
            const deepLink = doc.parameters?.[0]?.deepLink || '';
            const baseUrl = 'https://docs.finix.com/api';
            const url = deepLink ? `${baseUrl}${deepLink}` : baseUrl;
            
            // Create snippet from parameters descriptions
            let snippet = doc.apiTitle || 'Finix API documentation';
            if (doc.parameters && doc.parameters.length > 0) {
              const paramDesc = doc.parameters
                .filter((p: any) => p.description)
                .slice(0, 2)
                .map((p: any) => p.description)
                .join('. ');
              if (paramDesc) {
                snippet = paramDesc.substring(0, 200);
              }
            }
            
            results.push({
              title,
              url,
              snippet,
              score: item.score
            });
          }
        }
      }
      
      // Process Documentation documents if present
      if (data.documents['Documentation'] && Array.isArray(data.documents['Documentation'])) {
        const remainingLimit = limit - results.length;
        const docs = data.documents['Documentation'].slice(0, remainingLimit);
        
        for (const item of docs) {
          if (item.document) {
            const doc = item.document;
            results.push({
              title: doc.title || 'Finix Documentation',
              url: doc.url || 'https://docs.finix.com',
              snippet: doc.description || doc.snippet || 'Finix documentation page',
              score: item.score
            });
          }
        }
      }
      
      return results;
    }
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 mentions the tool 'searches' but doesn't disclose behavioral traits like authentication needs, rate limits, response format, or error handling. For a search tool with no annotation coverage, this leaves significant gaps in understanding how it behaves.

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 sized and front-loaded with the core purpose. The parameter explanations are clear and necessary given low schema coverage. It could be slightly more concise by integrating the purpose and parameters more fluidly, but overall it's efficient with minimal waste.

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 no annotations and no output schema, the description covers the basic purpose and parameters well. However, it lacks details on return values, error cases, or operational constraints, which are important for a search tool. It's adequate but has clear gaps in providing a complete context for the agent.

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?

Schema description coverage is low at 33% (only the 'query' parameter has a description in the schema). The description compensates by explaining all three parameters: 'query' as the search term, 'limit' as maximum results with default, and 'category' with enum values and default. This adds meaningful semantics beyond the sparse 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?

The description clearly states the tool's purpose as 'searches the Finix documentation for relevant information,' which is a specific verb+resource combination. However, it doesn't distinguish this search tool from potential documentation-related siblings (none exist in the provided sibling list, but the description doesn't address this explicitly).

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 prerequisites, context for searching documentation, or how it differs from other tools (like general web search tools not in the sibling list). Usage is implied but not explicitly stated.

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