Skip to main content
Glama
webimpianteam

Bayarcash MCP Server

get_portals

Retrieve available payment portals to manage Malaysian payment methods like FPX, DuitNow, and e-wallets for Bayarcash transactions.

Instructions

Get list of available payment portals

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that makes the API request to Bayarcash /portals endpoint to retrieve available portals.
    async getPortals(): Promise<Portal[]> {
      try {
        const response = await this.axiosInstance.get('/portals');
        return response.data.data || response.data;
      } catch (error) {
        this.handleError(error);
      }
    }
  • MCP tool handler in the main index.ts server that dispatches the get_portals tool call by invoking bayarcash.getPortals() and formatting response.
    case 'get_portals': {
      const result = await bayarcash.getPortals();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
  • src/index.ts:182-188 (registration)
    Tool registration and schema definition in the ListTools response for the MCP server.
      name: 'get_portals',
      description: 'Get list of available payment portals',
      inputSchema: {
        type: 'object',
        properties: {}
      }
    },
  • Complete tool registration using Smithery server.tool(), including schema (empty), description, and inline handler.
    // 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) }]
        };
      }
    );
  • Helper resource that also uses getPortals() for bayarcash://portals.
    server.resource(
      'portals',
      'bayarcash://portals',
      async () => {
        const portals = await bayarcash.getPortals();
        return {
          contents: [{
            uri: 'bayarcash://portals',
            text: JSON.stringify(portals, null, 2),
            mimeType: 'application/json'
          }]
        };
      }
    );
    
    // Resource: Channels
    server.resource(
      'channels',
      'bayarcash://channels',
      async () => {
        const channels = await bayarcash.getChannels();
        return {
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 states this is a 'Get' operation, implying read-only behavior, but doesn't clarify if it requires authentication, has rate limits, returns paginated results, or what format the list takes. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence with zero waste—it directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple list-retrieval tool and front-loaded with the key action.

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 simplicity (0 parameters, no output schema), the description is adequate but has clear gaps. It doesn't explain what a 'payment portal' entails or the structure of the returned list, which could be important for an agent to use it effectively. With no annotations, it should provide more behavioral context to be fully complete.

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 input schema has 0 parameters with 100% description coverage, so there are no parameters to document. The description doesn't need to add parameter semantics, and it correctly avoids mentioning any. A baseline of 4 is appropriate since the schema fully handles the lack of parameters.

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 verb ('Get') and resource ('list of available payment portals'), making the purpose immediately understandable. It distinguishes this from siblings like 'get_transaction' or 'get_payment_intent' by focusing on portals rather than transactions or intents. However, it doesn't specify if this returns all portals or filtered ones, keeping it from a perfect score.

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 like 'get_payment_channels' or 'get_fpx_banks', which might also relate to payment methods. There's no mention of prerequisites, context, or exclusions, leaving the agent to infer usage based on tool names 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/webimpianteam/bayarcash-mcp-server'

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