Skip to main content
Glama

Open Ticket

whmcs_open_ticket

Create a new support ticket in WHMCS by specifying department, subject, and message, with optional client, priority, and related services.

Instructions

Create a new support ticket

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deptidYesDepartment ID
subjectYesTicket subject
messageYesTicket message/description
clientidNoClient ID
contactidNoContact ID
nameNoName (if not a client)
emailNoEmail (if not a client)
priorityNoTicket priority
serviceidNoRelated service ID
domainidNoRelated domain ID
adminNoOpened by admin
markdownNoMessage contains markdown

Implementation Reference

  • src/index.ts:454-480 (registration)
    Registration of the 'whmcs_open_ticket' MCP tool with input schema and handler that delegates to whmcsClient.openTicket()
    server.registerTool(
        'whmcs_open_ticket',
        {
            title: 'Open Ticket',
            description: 'Create a new support ticket',
            inputSchema: {
                deptid: z.number().describe('Department ID'),
                subject: z.string().describe('Ticket subject'),
                message: z.string().describe('Ticket message/description'),
                clientid: z.number().optional().describe('Client ID'),
                contactid: z.number().optional().describe('Contact ID'),
                name: z.string().optional().describe('Name (if not a client)'),
                email: z.string().optional().describe('Email (if not a client)'),
                priority: z.enum(['Low', 'Medium', 'High']).optional().describe('Ticket priority'),
                serviceid: z.number().optional().describe('Related service ID'),
                domainid: z.number().optional().describe('Related domain ID'),
                admin: z.boolean().optional().describe('Opened by admin'),
                markdown: z.boolean().optional().describe('Message contains markdown'),
            },
        },
        async (params) => {
            const result = await whmcsClient.openTicket(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Zod input schema for whmcs_open_ticket: requires deptid, subject, message; optional clientid, contactid, name, email, priority, serviceid, domainid, admin, markdown
        inputSchema: {
            deptid: z.number().describe('Department ID'),
            subject: z.string().describe('Ticket subject'),
            message: z.string().describe('Ticket message/description'),
            clientid: z.number().optional().describe('Client ID'),
            contactid: z.number().optional().describe('Contact ID'),
            name: z.string().optional().describe('Name (if not a client)'),
            email: z.string().optional().describe('Email (if not a client)'),
            priority: z.enum(['Low', 'Medium', 'High']).optional().describe('Ticket priority'),
            serviceid: z.number().optional().describe('Related service ID'),
            domainid: z.number().optional().describe('Related domain ID'),
            admin: z.boolean().optional().describe('Opened by admin'),
            markdown: z.boolean().optional().describe('Message contains markdown'),
        },
    },
  • Handler function that calls whmcsClient.openTicket(params) and returns JSON result
    async (params) => {
        const result = await whmcsClient.openTicket(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • WhmcsApiClient.openTicket() - helper method that calls the WHMCS 'OpenTicket' API action, returning id, tid, and c fields on success
    async openTicket(params: {
        deptid: number;
        subject: string;
        message: string;
        clientid?: number;
        contactid?: number;
        name?: string;
        email?: string;
        priority?: 'Low' | 'Medium' | 'High';
        serviceid?: number;
        domainid?: number;
        admin?: boolean;
        markdown?: boolean;
        attachments?: Array<{ name: string; data: string }>;
        customfields?: string;
    }) {
        return this.call<WhmcsApiResponse & {
            id: number;
            tid: string;
            c: string;
        }>('OpenTicket', 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 but only states creation. Missing details on side effects, permissions, or return values.

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?

One direct sentence with no unnecessary words; front-loaded and concise.

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 12 parameters, no output schema, and no annotations, the description lacks completeness about behavior, return format, and prerequisites.

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%, baseline 3. The description adds no additional parameter information beyond what the schema provides.

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

Purpose5/5

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

The description 'Create a new support ticket' clearly states the action and resource, distinguishing it from sibling tools like replies and notes.

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 on when to use this tool versus alternatives; e.g., missing comparisons to whmcs_add_ticket_note or whmcs_add_ticket_reply.

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