Build a shopping plan
build_planBuild a shopping plan for one of the user's lists: find stores near them, work out which stores actually carry which items, and recommend a single-stop or split trip. Use for 'where should I shop for this', 'plan my trip', 'can I get all of this at one store'. This is about routing a trip, not ranking prices — describe the result as where to go and what each stop covers.
Items must be REFINED first (the shopper picking which milk, what size). Items added through these tools are not, so a list you built here needs the user to open it in LastList once, which lands on the Suggestions page and walks them through it. This tool will tell you when that is needed, and refine_items is how you resolve it in conversation.
Location: if the user has planned this list in the app before, their saved location is reused and you don't need to ask. Otherwise pass a zip (or lat/lng); without one the tool will tell you to ask the user where they're shopping.
A big list can take a few minutes. If the plan isn't ready when this returns, you get a jobId — tell the user it's building and call get_plan to check.
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": "build_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lat | No | Latitude, if the user gave coordinates. | |
| lng | No | Longitude, if the user gave coordinates. | |
| zip | No | ZIP code to shop near. Overrides the list's saved location. | |
| listId | No | List to plan. Defaults to the user's active shopping list. | |
| radiusMiles | No | How far the user is willing to travel. Defaults to their saved radius. |