get_quotes
Retrieve sales quotes from Simplicate business data to access pricing information and proposal details for customer transactions.
Instructions
Retrieve sales quotes
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"type": "number"
},
"offset": {
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- Type definition (schema) for SimplicateQuote objects returned by getQuotesexport interface SimplicateQuote { id: string; quote_number: string; subject: string; organization?: { id: string; name: string }; status: string; total: number; created_at: string; }
- Handler function that executes the get_quotes tool logic by calling the Simplicate API endpoint '/sales/quote' and returning the list of quotesasync getQuotes(params?: { limit?: number; offset?: number }): Promise<SimplicateQuote[]> { const response = await this.client.get('/sales/quote', params); return response.data || []; }
- src/http-mcp-server.ts:25-54 (helper)Dynamic helper/dispatcher in HTTP MCP server that maps tool name 'get_quotes' to service.getQuotes() executionasync function dispatchTool(toolName: string, args: any) { const method = toMethodName(toolName); // heuristic param extraction const params: any[] = []; if (args && typeof args === 'object') { // common id patterns const idKeys = ['project_id','organization_id','person_id','task_id','service_id','invoice_id','id']; let foundId = false; for (const k of idKeys) { if (k in args) { params.push(args[k]); foundId = true; break; } } if (args.data) params.push(args.data); if (!foundId && params.length === 0) params.push(args); } else if (args !== undefined) { params.push(args); } // @ts-ignore - dynamic call if (typeof (service as any)[method] === 'function') { // call and return // Some methods expect a single primitive id; spread params return await (service as any)[method](...params); } throw new Error(`Unknown tool/method: ${toolName} -> ${method}`); }