Skip to main content
Glama

Get Payment Methods

whmcs_get_payment_methods

Retrieve all available payment methods configured in your WHMCS system.

Instructions

Get available payment methods

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:1032-1045 (registration)
    Registration of the 'whmcs_get_payment_methods' tool with MCP server. Uses empty inputSchema and calls whmcsClient.getPaymentMethods().
    server.registerTool(
        'whmcs_get_payment_methods',
        {
            title: 'Get Payment Methods',
            description: 'Get available payment methods',
            inputSchema: {},
        },
        async () => {
            const result = await whmcsClient.getPaymentMethods();
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Actual implementation of getPaymentMethods() method on WhmcsApiClient. Calls WHMCS API action 'GetPaymentMethods' and returns typed response with paymentmethods array containing module and displayname fields.
     * Get payment methods
     */
    async getPaymentMethods() {
        return this.call<WhmcsApiResponse & {
            totalresults: number;
            paymentmethods: { paymentmethod: Array<{
                module: string;
                displayname: string;
            }> };
        }>('GetPaymentMethods');
    }
  • Input schema for the tool - empty object (no input parameters required).
    inputSchema: {},
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits such as read-only nature, authorization requirements, or side effects. The description carries the full burden but fails to convey that this is a safe, read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with one sentence, but it lacks structure and additional context that could be added in the same length, such as mentioning the output format or that no parameters are required.

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?

Given the tool's simplicity (no parameters, no output schema), the description is barely complete. It does not describe what the returned payment methods look like, how to interpret the response, or any prerequisites. A more complete description would add value.

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 zero parameters with 100% coverage, so the description is not required to add parameter details. However, the description does not explicitly state that no parameters are needed, but it is not misleading.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get available payment methods' clearly states the verb and resource, but it is essentially a tautology with the tool name, adding no new information. It does not differentiate the tool from sibling getter tools like whmcs_get_currencies or whmcs_get_invoices.

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?

No guidance is provided on when to use this tool versus alternatives. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer its usage.

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/scarecr0w12/whmcs-mcp-tool'

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