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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:314-324 (handler)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: {} } },
- src/bayarcash-client.ts:219-226 (helper)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); } }
- src/bayarcash-client.ts:9-12 (schema)TypeScript interface defining the structure of a Portal object returned by getPortals.export interface Portal { id: string; name: string; channels: PaymentChannel[];
- src/smithery.ts:125-136 (registration)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) }] }; } );