Write products
product_setWrite the product list. what=save: code (an existing product to change; left out with a new name, a code is made from the name) and any of name, description, unit, sales_price (the standard price from today), revenue_account and sales_tax_code, purchase_price, purchase_account and purchase_tax_code, kind (good or service, new products), the packing: piece_gross_g (a piece with its packaging, grams), units_per_case, case_gross_kg, cases_per_pallet, pallet_gross_kg; product_type (a new product, or one moved to another type, takes the type's accounts), barcode (EAN-8, UPC-A, EAN-13 or GTIN-14, check digit checked, one product per barcode), purchase_unit with purchase_per (bought in cases of 12: case, 12; a purchase order line is then in cases and its receipt puts 12 units each into stock at the cost of one unit), stock_account and cogs_account (none: the chart's); a field left out stays, an empty text clears it; tax rates by code, name or rate (20%). what=archive or restore: code. what=delete: code, a product no invoice, quote or stock movement names (one that is named is archived). what=import: rows (objects keyed by those field names) or csv (an export of Xero, QuickBooks, Zoho, Shopify, Unleashed; columns recognised by their headers) or document_id (an uploaded CSV or Excel file); a product of the same code, else name, is updated; a product type not on file is made. what=export: every product in the import's fields. what=types: the product types (Finished good, Raw material, Packaging, Service and the company's own) with their accounts. what=type: name, kind (good or service), revenue_account, purchase_account, stock_account, cogs_account (empty: the company's usual one), active=false archives an own type. Invoice and bill lines then pick the product by any part of its code or name, or its barcode. Books nothing.
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": "product_set"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv | No | ||
| code | No | ||
| kind | No | ||
| name | No | ||
| rows | No | ||
| unit | No | ||
| what | No | save | |
| active | No | ||
| barcode | No | ||
| company | No | ||
| description | No | ||
| document_id | No | ||
| sales_price | No | ||
| cogs_account | No | ||
| product_type | No | ||
| purchase_per | No | ||
| case_gross_kg | No | ||
| piece_gross_g | No | ||
| purchase_unit | No | ||
| stock_account | No | ||
| purchase_price | No | ||
| sales_tax_code | No | ||
| units_per_case | No | ||
| pallet_gross_kg | No | ||
| revenue_account | No | ||
| cases_per_pallet | No | ||
| purchase_account | No | ||
| purchase_tax_code | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||