siigo_create_product
Create new products in Siigo accounting software by providing product code, name, account group, and other product details for inventory and financial management.
Instructions
Create a new product
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product | Yes | Product data |
Implementation Reference
- src/index.ts:806-816 (handler)MCP tool handler for siigo_create_product that calls SiigoClient.createProduct and returns JSON response.private async handleCreateProduct(args: any) { const result = await this.siigoClient.createProduct(args.product); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:220-248 (schema)Tool schema definition including input schema for creating a product.{ name: 'siigo_create_product', description: 'Create a new product', inputSchema: { type: 'object', properties: { product: { type: 'object', description: 'Product data', properties: { code: { type: 'string', description: 'Product code' }, name: { type: 'string', description: 'Product name' }, account_group: { type: 'number', description: 'Account group ID' }, type: { type: 'string', enum: ['Product', 'Service', 'ConsumerGood'] }, stock_control: { type: 'boolean' }, active: { type: 'boolean' }, tax_classification: { type: 'string', enum: ['Taxed', 'Exempt', 'Excluded'] }, tax_included: { type: 'boolean' }, unit: { type: 'string' }, unit_label: { type: 'string' }, reference: { type: 'string' }, description: { type: 'string' }, }, required: ['code', 'name', 'account_group'], }, }, required: ['product'], }, },
- src/index.ts:65-66 (registration)Switch case registration dispatching to the create product handler.case 'siigo_create_product': return await this.handleCreateProduct(args);
- src/siigo-client.ts:70-72 (helper)SiigoClient method that performs the actual POST API request to create a product.async createProduct(product: SiigoProduct): Promise<SiigoApiResponse<SiigoProduct>> { return this.makeRequest<SiigoProduct>('POST', '/v1/products', product); }
- src/types.ts:59-92 (schema)TypeScript interface defining the SiigoProduct type used in the create product operation.export interface SiigoProduct { id?: string; code: string; name: string; account_group: number; type?: 'Product' | 'Service' | 'ConsumerGood'; stock_control?: boolean; active?: boolean; tax_classification?: 'Taxed' | 'Exempt' | 'Excluded'; tax_included?: boolean; tax_consumption_value?: number; taxes?: Array<{ id: number; milliliters?: number; rate?: number; }>; prices?: Array<{ currency_code: string; price_list: Array<{ position: number; value: number; }>; }>; unit?: string; unit_label?: string; reference?: string; description?: string; additional_fields?: { barcode?: string; brand?: string; tariff?: string; model?: string; }; }