Skip to main content
Glama

create_quote

Generate new quotes in Autotask PSA by specifying company details, contact information, opportunity associations, and validity dates for professional service agreements.

Instructions

Create a new quote

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoQuote name
descriptionNoQuote description
companyIdYesCompany ID for the quote
contactIdNoContact ID for the quote
opportunityIdNoAssociated opportunity ID
effectiveDateNoEffective date (YYYY-MM-DD format)
expirationDateNoExpiration date (YYYY-MM-DD format)

Implementation Reference

  • MCP tool definition including schema for 'create_quote' - specifies inputSchema with required companyId and optional fields like name, description, contactId, etc. This is returned by listTools() for tool registration.
    { name: 'create_quote', description: 'Create a new quote', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Quote name' }, description: { type: 'string', description: 'Quote description' }, companyId: { type: 'number', description: 'Company ID for the quote' }, contactId: { type: 'number', description: 'Contact ID for the quote' }, opportunityId: { type: 'number', description: 'Associated opportunity ID' }, effectiveDate: { type: 'string', description: 'Effective date (YYYY-MM-DD format)' }, expirationDate: { type: 'string', description: 'Expiration date (YYYY-MM-DD format)' } }, required: ['companyId'] } },
  • TypeScript interface defining the structure of AutotaskQuote objects used as input/output for quote operations.
    export interface AutotaskQuote { id?: number; companyID?: number; contactID?: number; quoteNumber?: string; quoteDate?: string; title?: string; description?: string; totalAmount?: number; status?: number; [key: string]: any; }
  • Handler dispatch in AutotaskToolHandler.callTool() - maps tool arguments to service call and formats result for MCP response.
    case 'create_quote': result = await this.autotaskService.createQuote({ name: args.name, description: args.description, companyID: args.companyId, contactID: args.contactId, opportunityID: args.opportunityId, effectiveDate: args.effectiveDate, expirationDate: args.expirationDate }); message = `Successfully created quote with ID: ${result}`; break;
  • Core implementation in AutotaskService.createQuote() - initializes client if needed and calls autotask-node client.quotes.create() to perform the API operation.
    async createQuote(quote: Partial<AutotaskQuote>): Promise<number> { const client = await this.ensureClient(); try { this.logger.debug('Creating quote:', quote); const result = await client.quotes.create(quote as any); const quoteId = (result.data as any)?.id; this.logger.info(`Quote created with ID: ${quoteId}`); return quoteId; } catch (error) { this.logger.error('Failed to create quote:', error); throw error; } }

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/asachs01/autotask-mcp'

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