Skip to main content
Glama

get_portals

Retrieve available payment portals to process transactions through the Bayarcash payment gateway API.

Instructions

Get list of available payment portals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_portals' that calls bayarcash.getPortals() and returns the JSON-stringified list of portals.
    case 'get_portals': {
      const result = await bayarcash.getPortals();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • src/index.ts:182-188 (registration)
    Registration of the 'get_portals' tool in the ListTools response, including name, description, and empty input schema.
      name: 'get_portals',
      description: 'Get list of available payment portals',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • Core helper method in BayarcashClient that performs the API request to fetch available portals and handles errors.
    async getPortals(): Promise<Portal[]> {
      try {
        const response = await this.axiosInstance.get('/portals');
        return response.data.data || response.data;
      } catch (error) {
        this.handleError(error);
      }
    }
  • TypeScript interface defining the structure of a Portal object returned by getPortals.
    export interface Portal {
      id: string;
      name: string;
      channels: PaymentChannel[];
  • Alternative tool registration and inline handler for 'get_portals' using Smithery server.tool API.
    // Tool: Get portals
    server.tool(
      'get_portals',
      'Get list of available payment portals',
      {},
      async () => {
        const result = await bayarcash.getPortals();
        return {
          content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
        };
      }
    );

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/khairulimran-97/bayarcash-mcp-server'

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