Skip to main content
Glama
webimpianteam

Bayarcash MCP Server

get_payment_channels

Retrieve available payment channels for processing transactions through the Bayarcash MCP Server, with optional filtering by portal key.

Instructions

Get list of available payment channels

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portal_keyNoOptional portal key to filter channels

Implementation Reference

  • MCP tool handler for get_payment_channels: validates optional portal_key and delegates to bayarcash.getChannels()
    case 'get_payment_channels': {
      // Validate input
      const validation = validateInput(portalKeySchema, args);
      if (!validation.success) {
        throw new McpError(ErrorCode.InvalidParams, `Validation error: ${validation.error}`);
      }
    
      const result = await bayarcash.getChannels(validation.data.portal_key);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • src/index.ts:189-201 (registration)
    Registration of get_payment_channels tool in ListToolsRequestHandler, defining name, description, and input schema
    {
      name: 'get_payment_channels',
      description: 'Get list of available payment channels',
      inputSchema: {
        type: 'object',
        properties: {
          portal_key: {
            type: 'string',
            description: 'Optional portal key to filter channels'
          }
        }
      }
    },
  • Core helper method getChannels() that returns a hardcoded list of available payment channels (portal_key parameter is unused)
    async getChannels(portalKey?: string): Promise<PaymentChannel[]> {
      // Return hardcoded payment channels
      return [
        { id: '1', name: 'FPX', code: 'fpx' },
        { id: '2', name: 'DuitNow', code: 'duitnow' },
        { id: '3', name: 'Boost', code: 'boost' },
        { id: '4', name: 'GrabPay', code: 'grabpay' },
        { id: '5', name: 'Touch n Go', code: 'tng' },
        { id: '6', name: 'ShopeePay', code: 'shopeepay' },
        { id: '7', name: 'SPayLater', code: 'spaylater' },
        { id: '8', name: 'Boost PayFlex', code: 'boostpayflex' },
        { id: '9', name: 'QRIS', code: 'qris' },
        { id: '10', name: 'NETS', code: 'nets' }
      ];
    }
  • Zod schema for validating the input to get_payment_channels tool (optional portal_key)
    // Portal key schema
    export const portalKeySchema = z.object({
      portal_key: z.string().optional()
    });
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 but only states what the tool does at a high level. It doesn't describe whether this is a read-only operation, what permissions might be required, whether results are paginated, what format the list returns in, or any rate limits or constraints. For a tool with zero annotation coverage, this leaves significant behavioral gaps.

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 extremely concise - a single sentence that directly states the tool's purpose with zero wasted words. It's front-loaded with the core functionality and doesn't include any unnecessary elaboration or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations and no output schema, the description is insufficiently complete. While it states what the tool does at a high level, it doesn't provide enough context about the behavior, return format, or practical usage scenarios. Users would need to guess about the structure of the returned payment channels list and how to effectively use this tool in context with the sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the parameter 'portal_key' is already documented in the schema as 'Optional portal key to filter channels.' The description doesn't add any additional meaning beyond what the schema provides, such as explaining what a portal key represents or providing examples of when filtering would be useful. The baseline of 3 is appropriate when the schema does the heavy lifting.

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 with a specific verb ('Get') and resource ('list of available payment channels'), making it immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'get_portals' or 'get_fpx_banks' that might also retrieve lists of related resources.

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 sibling tools like 'get_portals' and 'get_fpx_banks' that might retrieve related payment information, there's no indication of when this specific tool is appropriate or what distinguishes it from those other list-retrieval tools.

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