Skip to main content
Glama

Get Ticket Details

whmcs_get_ticket

Retrieve full details and reply history for a WHMCS support ticket by providing its ID.

Instructions

Get detailed information about a specific ticket including replies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ticketidYesTicket ID

Implementation Reference

  • src/index.ts:437-452 (registration)
    Registration of the 'whmcs_get_ticket' tool on the MCP server, including input schema (ticketid: number) and the handler that calls whmcsClient.getTicket(params).
    server.registerTool(
        'whmcs_get_ticket',
        {
            title: 'Get Ticket Details',
            description: 'Get detailed information about a specific ticket including replies',
            inputSchema: {
                ticketid: z.number().describe('Ticket ID'),
            },
        },
        async (params) => {
            const result = await whmcsClient.getTicket(params);
            return {
                content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
            };
        }
    );
  • Input schema for whmcs_get_ticket: requires ticketid (number) to identify the ticket.
    {
        title: 'Get Ticket Details',
        description: 'Get detailed information about a specific ticket including replies',
        inputSchema: {
            ticketid: z.number().describe('Ticket ID'),
        },
  • Handler function for whmcs_get_ticket: calls whmcsClient.getTicket(params) and returns the result as JSON text.
    async (params) => {
        const result = await whmcsClient.getTicket(params);
        return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],
        };
    }
  • WhmcsApiClient.getTicket() implementation: calls WHMCS API action 'GetTicket' with ticketid parameter, returns detailed ticket info including replies and notes.
    async getTicket(params: { ticketid: number }) {
        return this.call<WhmcsApiResponse & {
            ticketid: number;
            tid: string;
            c: string;
            deptid: number;
            deptname: string;
            userid: number;
            contactid: number;
            name: string;
            email: string;
            cc: string;
            date: string;
            subject: string;
            status: string;
            priority: string;
            admin: string;
            lastreply: string;
            flag: number;
            service: string;
            replies: { reply: Array<{
                replyid: number;
                userid: number;
                contactid: number;
                name: string;
                email: string;
                requestor_name: string;
                requestor_email: string;
                requestor_type: string;
                admin: string;
                date: string;
                message: string;
                attachment: string;
                attachments_removed: boolean;
                rating: number;
            }> };
            notes: { note: Array<{
                noteid: number;
                admin: string;
                date: string;
                message: string;
                attachments: string[];
                attachments_removed: boolean;
            }> };
        }>('GetTicket', params);
    }
Behavior2/5

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

No annotations are provided, so the description bears full responsibility for behavioral transparency. It only states that the tool returns 'detailed information including replies', but it does not disclose authentication requirements, error handling, or any side effects (though it is a read operation). The description lacks depth on behavior beyond the basic output.

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, front-loaded sentence that conveys the core purpose without any extraneous words. Every part earns its place.

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?

The tool has one parameter and no output schema. The description mentions 'including replies' which adds value, but it does not explain the return structure, error conditions, or pagination/limits (if any). For a simple retrieval tool, the description is minimally adequate but could be more detailed.

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?

Input schema covers the single parameter (ticketid) with 100% description coverage, so the schema already defines it. The description adds no additional semantics about ticketid, such as format or constraints. Baseline score of 3 is appropriate since 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?

Description states 'Get detailed information about a specific ticket including replies', which is a clear verb+resource combination. It implies a read operation and specifies 'including replies', distinguishing it from a basic ticket listing. However, it does not explicitly contrast with sibling tools like whmcs_get_tickets (list) or whmcs_get_support_statuses.

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. Sibling tools include modify operations (e.g., whmcs_add_ticket_reply) and list operations (whmcs_get_tickets), but the description does not specify when to use get vs. list or that it is read-only.

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