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 {

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
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 for behavioral disclosure. While 'Get list' implies a read operation, it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the list takes. For a tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 that states exactly what the tool does with zero wasted words. It's appropriately sized for a simple retrieval tool and front-loads the essential information.

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?

For a parameterless read operation, the description is minimally adequate but could be more complete. Without annotations or output schema, it doesn't specify what the returned list contains (portal IDs, names, capabilities) or any behavioral constraints. The simplicity of the tool keeps it from being severely incomplete, but additional context would be helpful.

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 tool has zero parameters, and schema description coverage is 100% (though trivial since there are no parameters). The description appropriately doesn't discuss parameters since none exist. A baseline of 4 is appropriate for parameterless tools when the description doesn't incorrectly mention 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 doesn't explicitly differentiate from sibling tools like 'get_payment_channels' or 'get_fpx_banks', but the resource specificity (portals vs channels/banks) provides some implicit distinction.

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. With siblings like 'get_payment_channels' and 'get_fpx_banks' that likely return related payment information, there's no indication of when this specific portal list is needed versus other payment data tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.