Get Quotes
whmcs_get_quotesRetrieve a list of quotes from your WHMCS installation with optional filters for specific client, subject, or stage.
Instructions
Get list of quotes
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "whmcs_get_quotes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limitstart | No | Starting offset | |
| limitnum | No | Number of results | |
| quoteid | No | Specific quote ID | |
| userid | No | Filter by client ID | |
| subject | No | Filter by subject | |
| stage | No | Filter by stage |
Implementation Reference
- src/index.ts:1225-1245 (registration)Registration of the 'whmcs_get_quotes' tool with the MCP server, defining its input schema and delegating to whmcsClient.getQuotes().
server.registerTool( 'whmcs_get_quotes', { title: 'Get Quotes', description: 'Get list of quotes', inputSchema: { limitstart: z.number().optional().describe('Starting offset'), limitnum: z.number().optional().describe('Number of results'), quoteid: z.number().optional().describe('Specific quote ID'), userid: z.number().optional().describe('Filter by client ID'), subject: z.string().optional().describe('Filter by subject'), stage: z.string().optional().describe('Filter by stage'), }, }, async (params) => { const result = await whmcsClient.getQuotes(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } ); - src/index.ts:1239-1244 (handler)Handler function that executes when the 'whmcs_get_quotes' tool is called; invokes whmcsClient.getQuotes() and returns the result.
async (params) => { const result = await whmcsClient.getQuotes(params); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }], }; } - src/index.ts:1231-1237 (schema)Input schema for whmcs_get_quotes defining optional parameters: limitstart, limitnum, quoteid, userid, subject, and stage.
limitstart: z.number().optional().describe('Starting offset'), limitnum: z.number().optional().describe('Number of results'), quoteid: z.number().optional().describe('Specific quote ID'), userid: z.number().optional().describe('Filter by client ID'), subject: z.string().optional().describe('Filter by subject'), stage: z.string().optional().describe('Filter by stage'), }, - src/whmcs-client.ts:1421-1453 (helper)The getQuotes() method on the WhmcsApiClient class that calls the WHMCS API 'GetQuotes' action and returns typed response data.
async getQuotes(params: { limitstart?: number; limitnum?: number; quoteid?: number; userid?: number; subject?: string; stage?: string; datecreated?: string; lastmodified?: string; validuntil?: string; } = {}) { return this.call<WhmcsApiResponse & { totalresults: number; startnumber: number; numreturned: number; quotes: { quote: Array<{ id: number; subject: string; stage: string; validuntil: string; userid: number; firstname: string; lastname: string; companyname: string; email: string; datecreated: string; lastmodified: string; datesent: string; dateaccepted: string; total: string; }> }; }>('GetQuotes', params); }