Skip to main content
Glama

Accept Order

whmcs_accept_order

Accepts a pending WHMCS order and processes it, provisioning services and sending notifications as configured.

Instructions

Accept and process a pending order

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderidYesOrder ID
serveridNoServer to provision on
serviceusernameNoUsername for service
servicepasswordNoPassword for service
registrarNoDomain registrar module
autosetupNoAuto setup products
sendemailNoSend setup email

Implementation Reference

  • src/index.ts:792-813 (registration)
    Registration of the 'whmcs_accept_order' tool on the MCP server, including its Zod input schema (orderid, serverid, serviceusername, servicepassword, registrar, autosetup, sendemail) and the handler that calls whmcsClient.acceptOrder(params).
    server.registerTool(
        'whmcs_accept_order',
        {
            title: 'Accept Order',
            description: 'Accept and process a pending order',
            inputSchema: {
                orderid: z.number().describe('Order ID'),
                serverid: z.number().optional().describe('Server to provision on'),
                serviceusername: z.string().optional().describe('Username for service'),
                servicepassword: z.string().optional().describe('Password for service'),
                registrar: z.string().optional().describe('Domain registrar module'),
                autosetup: z.boolean().optional().describe('Auto setup products'),
                sendemail: z.boolean().optional().describe('Send setup email'),
            },
        },
        async (params) => {
            const result = await whmcsClient.acceptOrder(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • The handler function for 'whmcs_accept_order' that receives the validated params, calls whmcsClient.acceptOrder(params), and returns the JSON-stringified result.
    async (params) => {
        const result = await whmcsClient.acceptOrder(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • Zod input schema for 'whmcs_accept_order' defining required orderid (number) and optional fields: serverid, serviceusername, servicepassword, registrar, autosetup, sendemail.
        inputSchema: {
            orderid: z.number().describe('Order ID'),
            serverid: z.number().optional().describe('Server to provision on'),
            serviceusername: z.string().optional().describe('Username for service'),
            servicepassword: z.string().optional().describe('Password for service'),
            registrar: z.string().optional().describe('Domain registrar module'),
            autosetup: z.boolean().optional().describe('Auto setup products'),
            sendemail: z.boolean().optional().describe('Send setup email'),
        },
    },
  • The acceptOrder method on the WhmcsApiClient class that maps typed parameters to the WHMCS API 'AcceptOrder' call via this.call().
    async acceptOrder(params: {
        orderid: number;
        serverid?: number;
        serviceusername?: string;
        servicepassword?: string;
        registrar?: string;
        sendregistrar?: boolean;
        autosetup?: boolean;
        sendemail?: boolean;
    }) {
        return this.call<WhmcsApiResponse>('AcceptOrder', params);
    }
  • Full acceptOrder method including JSDoc comment, parameter type definition, and the API call delegation.
    /**
     * Accept an order
     */
    async acceptOrder(params: {
        orderid: number;
        serverid?: number;
        serviceusername?: string;
        servicepassword?: string;
        registrar?: string;
        sendregistrar?: boolean;
        autosetup?: boolean;
        sendemail?: boolean;
    }) {
        return this.call<WhmcsApiResponse>('AcceptOrder', params);
    }
Behavior2/5

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

With no annotations, the description must disclose behavioral traits. It only states acceptance and processing, omitting side effects like billing, provisioning, or irreversibility. The tool likely triggers significant actions but the description is silent.

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 a single short sentence, which is concise but may be too minimal for a tool with 7 parameters. It gets to the point but lacks structure or additional context.

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 7 parameters, no output schema, and no behavioral details, the description is incomplete. It does not explain return values, preconditions, or the impact of parameters like autosetup or sendemail.

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?

Schema coverage is 100%, so the schema documents all 7 parameters. The description does not add additional meaning beyond the schema. Baseline of 3 applies as description adds no extra semantic value.

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 'Accept and process a pending order' conveys the basic action but is vague and does not differentiate from sibling tools like whmcs_cancel_order or whmcs_fraud_order. The term 'process' lacks specificity.

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 (e.g., cancel, fraud, pending). There are no prerequisites or context for 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