add_customer
ChatGPTCreate a new customer in Btoo. Uniqueness is enforced on phone number, not name.
add_product
ChatGPTCreate a new product in Btoo catalog. SECTIONS : 1. PRODUCT TYPE: Standard (single product) or Variant (multiple options like Color/Size). 2. GENERAL DETAILS: Product Name (required, max 200), SKU (auto-generated if omitted), Barcode (max 25), Sales/Purchase Price, Category, Unit (defaults to business default_unit), GST, Shelf Life (expire_days). 3. INVENTORY: allow_decimal, current_stock, min_stock_level (both default to 0). 4. CUSTOMIZE / ATTRIBUTES: Standard products use attributes or customization_fields. Variant products use the variants array. Call get_business_settings if you need default units or GST settings.
add_product_category
ChatGPTCreate a new product category in Btoo. Duplicate category names are rejected.
add_supplier
ChatGPTCreate a new supplier in Btoo. Suppliers are used when creating purchase orders. Uniqueness is enforced on phone number.
add_vendor
ChatGPTCreate a new vendor in Btoo. Uniqueness is enforced on phone number.
adjust_product_batch
ChatGPTAdjust or write off inventory quantity from a specific batch (e.g. for expired items, damage, wastage, or lost stock). Use get_product_batches first to verify available stock. Adjustment quantity cannot exceed available batch stock.
adjust_stock
ChatGPTAdjust stock or record a stock movement for a single product (or multiple products). For multi-product batch adjustments, you can also use 'bulk_adjust_stock'. STOCK MOVEMENT TYPES: 1. 'stock_in': Inward stock (adds to inventory). Auto-defaults unit_price to purchase_price and paid_amount to total. Supports Supplier, discounts, payment method, and mfg/expiry dates. 2. 'stock_out': Outward stock (deducts from inventory). Auto-defaults unit_price to sales_price and paid_amount to total. Requires Vendor (entity_id). 3. 'gap_check': Physical inventory count audit / reconciliation. Directly sets product stock to the specified count (non-financial). 4. 'wastage': Scrap, spoilage, damage, or loss write-off (deducts from inventory, non-financial). Quantity cannot exceed available stock. MANDATORY BATCH WORKFLOW (for 'stock_out', 'gap_check', 'wastage'): If enable_expiry_tracking is true, you MUST call get_product_batches first, present available batches (Batch #, Stock, Expiry Date) to the user, and ask them which batch to deduct from / reconcile (or confirm FEFO) before calling this tool. Pass selected_batch_id or batch_allocations.
bulk_add_customers
ChatGPTImport multiple customers at once into Btoo. DUPLICATE HANDLING: - In-batch duplicates (same phone across rows) are rejected immediately. - If a customer with same phone already exists, tool rejects until user confirms update. Set allow_update: true only after explicit user approval.
bulk_add_products
ChatGPTBulk import multiple products into Btoo. IMPORT RULES: 1. Required: name, sales_price, unit, category. purchase_price required for trading businesses. 2. SKU auto-generated if omitted. Duplicate SKUs rejected. 3. Upsert: If a product with same name+type exists, it's UPDATED; otherwise created with initial stock movement. 4. gst_percentage (0, 5, 12, 18, 28), gst_inclusive, expire_days are optional.
bulk_add_suppliers
ChatGPTImport multiple suppliers at once into Btoo. If a supplier with the same name already exists, the backend updates their record. State can be provided as a name (e.g. 'Gujarat') or state reference token.
bulk_add_vendors
ChatGPTImport multiple vendors at once into Btoo. DUPLICATE HANDLING: - In-batch duplicates (same phone across rows) are rejected immediately. - If a vendor with same phone already exists, tool rejects until user confirms update. Set allow_update: true only after explicit user approval.
bulk_adjust_stock
ChatGPTPerform multi-product stock adjustments in a single bulk adjustment transaction. STOCK MOVEMENT TYPES: 1. 'stock_in': Inward bulk stock from Supplier (adds stock). Auto-defaults unit_price to purchase_price and paid_amount to full total. 2. 'stock_out': Outward bulk stock to Vendor (deducts stock). Auto-defaults unit_price to sales_price and paid_amount to full total. Requires Vendor (entity_id). 3. 'gap_check': Physical inventory count reconciliation across multiple products (directly sets physical stock count, non-financial). 4. 'wastage': Bulk scrap, damage, or loss write-off across multiple products (deducts stock, non-financial). MANDATORY BATCH WORKFLOW (for 'stock_out', 'gap_check', 'wastage'): If enable_expiry_tracking is true, you MUST query get_product_batches first for each item, present available batches to the user, and ask them which batch(es) to deduct/reconcile before calling this tool. Pass selected_batch_id or batch_allocations per item.
cancel_purchase_order
ChatGPTCancel a pending purchase order. Only 'pending' purchase orders can be cancelled ('confirmed' or 'received' cannot). If initial payment was made (paid_amount > 0), ask the user for a refund payment_method.
cancel_sales_order
ChatGPTCancel a pending sales order. Only 'pending' orders can be cancelled (confirmed/delivered cannot). If advance payment was received (advance_paid > 0), ask the user for a refund payment method before cancelling.
create_expense
ChatGPTRecord a new business expense. Can be linked to a Product (entity_type='product'), Sales Order (entity_type='order'), or recorded as a general business overhead (entity_type='other').
create_purchase_order
ChatGPTCreate a new purchase order for a Supplier. PO WORKFLOW: 1. SUPPLIER: Search supplier via get_suppliers. (PO is strictly for suppliers, not customers/vendors). 2. ITEMS: At least 1 item with quantity > 0 and unit price >= 0. No stock check needed (buying stock). 3. GST & PAYMENT: Check gst_percentage and gst_inclusive from get_products. For fully paid orders, set paid_amount equal to the GST-inclusive Grand Total so balance due is 0.
create_sales_order
ChatGPTCreate a new sales order in Btoo for a Customer or a Vendor. MANDATORY PRE-ORDER WORKFLOW: 1. CHECK SETTINGS & BATCHES: Call get_business_settings. If enable_expiry_tracking is true, you MUST call get_product_batches for each item. If active batches exist, present available batches (Batch #, Stock, Expiry Date) and prompt the user to choose a batch (or confirm FEFO auto-allocation) BEFORE calling this tool. 2. PARTY LOOKUP: Orders can be for a Customer (entity_type: 'customer') or Vendor (entity_type: 'vendor'). Search customers first, then vendors if not found. 3. GST & PAYMENT: If enable_gst=true, compute GST breakdown. For fully paid orders, advance_paid must equal the GST-inclusive Grand Total. 4. Present order summary with selected batches, totals, and payment method for user approval before calling this tool.
generate_tax_invoice
ChatGPTGenerate a GST Tax Invoice PDF for a delivered sales order. Order must be in 'delivered' status. Ask the user if they want to provide optional dispatch details (delivery note, despatched through, destination, payment terms) or generate with defaults. Include the invoice number and [View Tax Invoice (Invoice Number)](pdf_url) link in your response.
get_business_settings
ChatGPTRetrieve general business configuration, default units, tax flags, and operational settings for the current business. KEY SETTINGS: - default_unit: (string) Default measurement unit for products (e.g. 'piece', 'kg', 'litres'). - self_manufacturing: (boolean) If true, business manufactures goods (purchase_price is optional). If false, trading/retail business (purchase_price is required for products). - enable_gst: (boolean) Whether GST tax calculations and tax invoices are enabled. - enable_variants: (boolean) Whether product variants (attributes like size, color) are enabled. - auto_sku: (boolean) Whether SKUs are auto-generated. - enable_expiry_tracking: (boolean) Whether batch and expiry date tracking is enabled. - expiry_duration: (number) Default shelf life in days if auto_expire_product is enabled. - order_flow: (boolean) Whether sales orders use the full approval workflow (pending -> confirmed -> delivered).
get_customers
ChatGPTRetrieve a paginated list of customers. Pass the returned customer_id reference to update_customer or other tools that need it.
get_expense_details
ChatGPTRetrieve detailed information for a single expense by its reference ID, including linked entity and attachments.
get_expenses
ChatGPTRetrieve a paginated list of business expenses with filtering options. Expenses can be linked to a specific Product, Order, or categorised as General/Other.
get_invoice_history
ChatGPTRetrieve a paginated list of all generated tax invoices. Include clickable [View PDF](pdf_url) links in your results table.
get_product_batches
ChatGPTRetrieve active, in-stock inventory batches for a product/variant via FEFO (earliest expiry first). Use when selecting batches for order items or checking batch stock and expiry dates.
get_product_categories
ChatGPTRetrieve all product categories with product counts and category IDs. Keep category_id references in context for use with add_product, update_product, or category management tools.
get_product_details
ChatGPTRetrieve full details of a product by its product_id, including variants, batches, custom fields, gst_percentage, and gst_inclusive status. Use when you need variant_id, batch_id, or field_id references before placing an order.
get_products
ChatGPTRetrieve a paginated list of products or search by name, SKU, barcode, or description. PRODUCT-SPECIFIC RULES: 1. PRODUCT TYPE FILTERING: For Sales Orders, set productType: "finished_product" so raw materials are excluded. Omit for full catalog. 2. MULTI-ITEM LOOKUP: When looking up multiple products (by SKU, barcode, or name), NEVER call get_products repeatedly per item. Call get_products ONCE with a larger limit (e.g. limit: 50 or 100) without search to fetch and match all items locally in a single tool call. 3. BATCH LOOKUP: If business settings have enable_expiry_tracking: true, always call get_product_batches for ordered items to retrieve active batches.
get_purchase_order_details
ChatGPTRetrieve comprehensive details for a purchase order including items, supplier info, payment history, balance due, and status timeline.
get_purchase_orders
ChatGPTRetrieve a paginated list of purchase orders, with optional filtering by supplier, status, or date range. Pass purchase_order_id to detail/status/cancel/payment/return tools.
get_sales_order_details
ChatGPTRetrieve comprehensive details for a sales order including items, prices, quantities, taxes, payment history, balance due, and status timeline.
get_sales_orders
ChatGPTRetrieve a paginated list of sales orders, filterable by customer, status, date range, or search keyword. Pass order_id to detail/status/cancel/payment/invoice tools.
get_states
ChatGPTRetrieve a list of states for dropdown selection. CRITICAL: When presenting this list to the user, NEVER show the state_id references. Only show the state names as a bulleted list. Keep the state_id references in your context memory to use if the user asks to add or update a customer/vendor.
get_stock_adjustment_details
ChatGPTRetrieve comprehensive details of a specific stock adjustment, including all adjusted items/movements, batch allocations, party details (supplier/vendor), financial summary, recorded payment transactions, and return history.
get_stock_adjustments
ChatGPTRetrieve a paginated list of past stock adjustments with totals, payment status, adjustment number, and movement types.
get_stock_movements
ChatGPTRetrieve a paginated log of granular stock movements and audit records across products.
get_suppliers
ChatGPTRetrieve a paginated list of suppliers. Pass the returned supplier_id reference to create_purchase_order or update_supplier.
get_vendors
ChatGPTRetrieve a paginated list of vendors. Pass the returned vendor_id reference to update_vendor or create_sales_order.
ping
ChatGPTTests whether the Btoo MCP server is available. This tool does not access any user data.
record_order_payment
ChatGPTRecord a payment against an existing sales order (customer payments only, NOT purchase orders). Payment amount cannot exceed remaining balance due. Cannot record on fully-paid or cancelled orders.
record_purchase_order_payment
ChatGPTRecord a payment made to a supplier against an existing purchase order (supplier payments only, NOT sales orders). Payment amount cannot exceed remaining balance due. Cannot record on fully-paid or cancelled POs.
record_purchase_order_return
ChatGPTReturn goods from a received purchase order back to the supplier. RETURN RULES: - Only POs with status 'received' and received > 24 hours ago are eligible. - Each item needs purchase_order_item_id (from get_purchase_order_details). return_quantity cannot exceed remaining quantity or current stock. - If refund_amount > 0, payment_method is required.
record_stock_adjustment_payment
ChatGPTRecord a payment against a financial stock adjustment (stock_in / stock_out) with an outstanding balance due. Amount cannot exceed remaining balance due.
return_stock_adjustment
ChatGPTReturn items from a previous stock adjustment back to the supplier (for stock_in) or from the vendor (for stock_out). RETURN RULES: 1. Only financial adjustments ('stock_in' or 'stock_out') can be returned. 2. If returning from 'stock_in', items are removed from warehouse stock (stock_in_return). 3. If returning from 'stock_out', items are added back into warehouse stock (stock_out_return). 4. The return value first offsets any remaining balance_due on the parent adjustment. If the return value exceeds the balance due, the excess is refunded (requiring payment_method).
send_order_invoice
ChatGPTSend the invoice PDF for a sales order directly to the customer or vendor via email. Recipient must have a valid email address on file.
update_customer
ChatGPTUpdate an existing customer in Btoo. Uniqueness is enforced on phone number, not name.
update_expense
ChatGPTUpdate an existing expense record by its reference ID.
update_product
ChatGPTUpdate an existing product in Btoo catalog. The backend PUT /products/:id is a full-replacement update (not PATCH). This tool fetches the current product first and merges your changes on top, so unchanged fields are preserved.
update_product_category
ChatGPTUpdate the name of an existing product category.
update_purchase_order
ChatGPTUpdate the items, pricing, discounts, terms, or delivery date of an existing purchase order. EDIT RULES: - Cancelled POs cannot be updated. 'received' POs received > 24 hours ago cannot be updated. - At least one item required with quantity > 0 and unit price >= 0.
update_purchase_order_status
ChatGPTUpdate the status of a purchase order. Forward-only transitions: pending → confirmed → received (no reversals). Marking 'received' automatically adds product quantities to inventory stock.
update_sales_order
ChatGPTUpdate the items, pricing, discounts, terms, or delivery date of an existing sales order. EDIT RULES: - Cancelled orders cannot be updated. Delivered orders only editable within 24 hours of delivery. - At least 1 item required with quantity > 0. - If modifications decrease the order total below the already-paid amount, a refund is required; ask the user for a refund payment_method.
update_sales_order_status
ChatGPTUpdate the status of a sales order. Forward-only transitions: pending → confirmed → delivered (no reversals). Marking 'delivered' deducts inventory. When setting to 'delivered', ask the user if they want to email the invoice (send_email).
update_supplier
ChatGPTUpdate an existing supplier in Btoo. Uniqueness is enforced on phone number.
update_vendor
ChatGPTUpdate an existing vendor in Btoo. Uniqueness is enforced on phone number, not name.