Skip to main content
Glama

whmcs_create_quote

Create a new quote in WHMCS with subject, stage, validity date, client details, and notes for proposals and administration.

Instructions

Create a new quote

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subjectYesQuote subject
stageYesQuote stage
validuntilYesValid until date (YYYY-MM-DD)
useridNoClient ID
firstnameNoFirst name
lastnameNoLast name
companynameNoCompany name
emailNoEmail
proposalNoProposal text
customernotesNoCustomer notes
adminnotesNoAdmin notes

Implementation Reference

  • The handler function that executes the whmcs_create_quote tool logic by invoking the WHMCS client's createQuote method and returning a formatted JSON response.
    async (params) => { const result = await whmcsClient.createQuote(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; }
  • Zod input schema for the whmcs_create_quote tool, defining required and optional parameters like subject, stage, validuntil, and client details.
    subject: z.string().describe('Quote subject'), stage: z.enum(['Draft', 'Delivered', 'On Hold', 'Accepted', 'Lost', 'Dead']).describe('Quote stage'), validuntil: z.string().describe('Valid until date (YYYY-MM-DD)'), userid: z.number().optional().describe('Client ID'), firstname: z.string().optional().describe('First name'), lastname: z.string().optional().describe('Last name'), companyname: z.string().optional().describe('Company name'), email: z.string().optional().describe('Email'), proposal: z.string().optional().describe('Proposal text'), customernotes: z.string().optional().describe('Customer notes'), adminnotes: z.string().optional().describe('Admin notes'), },
  • src/index.ts:1228-1253 (registration)
    Registration of the whmcs_create_quote tool with the MCP server, including title, description, input schema, and handler reference.
    server.registerTool( 'whmcs_create_quote', { title: 'Create Quote', description: 'Create a new quote', inputSchema: { subject: z.string().describe('Quote subject'), stage: z.enum(['Draft', 'Delivered', 'On Hold', 'Accepted', 'Lost', 'Dead']).describe('Quote stage'), validuntil: z.string().describe('Valid until date (YYYY-MM-DD)'), userid: z.number().optional().describe('Client ID'), firstname: z.string().optional().describe('First name'), lastname: z.string().optional().describe('Last name'), companyname: z.string().optional().describe('Company name'), email: z.string().optional().describe('Email'), proposal: z.string().optional().describe('Proposal text'), customernotes: z.string().optional().describe('Customer notes'), adminnotes: z.string().optional().describe('Admin notes'), }, }, async (params) => { const result = await whmcsClient.createQuote(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } );
  • Supporting method in WhmcsApiClient class that performs the actual WHMCS API call to the 'CreateQuote' action using the generic call method with parameter flattening.
    async createQuote(params: { subject: string; stage: 'Draft' | 'Delivered' | 'On Hold' | 'Accepted' | 'Lost' | 'Dead'; validuntil: string; userid?: number; firstname?: string; lastname?: string; companyname?: string; email?: string; address1?: string; address2?: string; city?: string; state?: string; postcode?: string; country?: string; phonenumber?: string; currency?: number; proposal?: string; customernotes?: string; adminnotes?: string; lineitems?: Array<{ desc: string; qty: number; up: number; discount: number; taxable: boolean; }>; }) { return this.call<WhmcsApiResponse & { quoteid: number }>('CreateQuote', params); }

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-server'

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