Optional: Suggest substitutes
suggest_substitutesFind product substitutes when an item cannot be ordered, matched to intended use, allergens, and purpose. Review each option's compromises before requesting a quote.
Instructions
Good / better / best substitutes for a product that can't be ordered (or for any product).
purpose: what the buyer uses the product for ('coffee', 'recipe: lasagne', 'allergy menu'); substitution exact | ask | allowed. A product the buyer needs exactly (by purpose or the mandate's product_purposes) has no substitutes; for 'ask', any substitute needs the buyer's yes. Pass the same purpose on request_quote items.
Same category, measure and temperature class; keeps the original's dietary claims and the mandate's allergen rules (never relaxed). Each option lists its compromises in plain language and has a live offer. Tell the buyer the compromises, then request_quote for the chosen one with substitute_for=. Another kind of product is never offered: with nothing acceptable, no_safe_substitute says to ask a human and not_offered lists what was ruled out and why. delivery_date null = the next delivery day. With mandate_id it is read-scoped like get_mandate (send your Authorization: Bearer header or agent_token). use: what the product is used for (coffee, whipping, dessert, baking, cooking, drinking, melting, ingredient-in-recipe:). Whipping cream for a dessert needs the same product (another brand whips differently); for coffee any brand will do. Options then carry use_sensitivity, use_ok and use_reason.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"agent_id": "<agent_id>",
"product_id": "<product_id>",
"delivery_date": "<delivery_date>",
"amount": "<amount>"
},
"name": "suggest_substitutes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| use | No | ||
| unit | No | SALES_UNIT | |
| limit | No | ||
| amount | Yes | ||
| purpose | No | ||
| agent_id | Yes | ||
| mandate_id | No | ||
| product_id | Yes | ||
| agent_token | No | ||
| substitution | No | ||
| delivery_date | Yes | ||
| avoid_allergens | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| options | Yes | ||
| original | Yes | ||
| next_step | No | ||
| considered | Yes | ||
| constraints | Yes | ||
| no_safe_substitute | Yes |