save_item
Save a product or service in the catalog, or update a saved one.
Without item_id it creates, or updates the item with the same external_reference (else the same code): sending it twice never makes two. Nothing fiscal is required to save; an NF-e still needs ncm and cfop when issued. It issues nothing. Confirm the data with the user when any of it was inferred.
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": "save_item"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nbs | No | Service: nine-digit NBS. Only from the user or a suggest_nbs row they confirmed. | |
| ncm | No | Product: 8 digits. Only from the user or classify_item once confirmed; never inferred. | |
| cest | No | Product: 7 digits. | |
| cfop | No | Product: 4 digits, e.g. 5102. | |
| code | No | SKU, unique in the company. | |
| gtin | No | Product: 8, 12, 13 or 14 digits, checked. | |
| kind | No | product (NF-e) or service (NFS-e). Required to create; a field of the other kind is refused. | |
| unit | No | UN, KG, CX... | |
| notes | No | Free text kept with it. | |
| origin | No | Product: 0 to 8; needs tax_situation. | |
| source | No | Set on creation only; manual by default. | |
| item_id | No | Update this saved item instead of creating one. Only the fields sent change. | |
| company_id | No | UUID of the company acted for. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| net_weight | No | Product: kg per unit, NF-e only. | |
| unit_price | No | Price per unit in BRL. | |
| description | No | What is sold: at most 120 characters for a product (NF-e), 2000 for a service. Required to create. | |
| ibs_cbs_cst | No | IBS/CBS CST, 3 digits. | |
| gross_weight | No | Product: kg per unit, NF-e only. | |
| iss_retained | No | Service: ISS retained by the customer. | |
| service_code | No | Service: LC 116 code, e.g. 1.07. | |
| ibs_cbs_class | No | IBS/CBS cClassTrib, 6 digits. | |
| internal_code | No | Service: own code, up to 20 letters or digits. | |
| tax_situation | No | Product: ICMS CST (2 digits) or CSOSN (3). | |
| company_tax_id | No | CNPJ or CPF of the company acted for, never the recipient or a taxpayer looked up. Omit for a single company; else see list_authorized_companies. Send one, never both. | |
| external_reference | No | Another system's id, unique in the company. | |
| municipal_service_code | No | Service: municipal tax code, 3 digits. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Pass it as item_id to issue_invoice or save_item. | |
| ncm | No | ||
| cest | No | ||
| cfop | No | ||
| code | No | ||
| gtin | No | ||
| kind | No | product or service. | |
| unit | No | ||
| source | No | ||
| is_active | No | ||
| unit_price | No | ||
| uses_count | No | ||
| description | No | ||
| iss_retained | No | ||
| last_used_at | No | ||
| service_code | No | ||
| tax_situation | No | ||
| external_reference | No |