Refine quote
refine_quoteNarrow an existing quote with new constraints (destination ZIP the user just provided, deadline, outdoor/waterproof/heat/food-safety requirements, budget, vendor reliability, verbatim requirements terms, drawing callouts, a process filter — "no, I meant in sheet metal" → processes — a ship-from country filter — "only US vendors" → ships_from — or a vendor filter — "only show A3D Manufacturing" → vendors) — or CHANGE its spec: material, color, or quantities. Changing material/quantity is a spec change, not a narrowing — pass it via the material/color/quantities args, NOT as a requirements term; the affected lanes re-price with the new spec through warm vendor sessions. For side-by-side comparisons ("how does carbon steel compare?"), add a scenario label — labeled refines coexist instead of replacing each other (max 4). "Organize by" ("sort by cheapest", "soonest arrival on top", "most green first") is also this tool: sort_by for objective orders, sort_order + sort_label for orders you judged yourself from the previews — presentation only, instant, nothing re-prices. GOING BACK is also this tool: undo_last_step ALONE takes back exactly one refine step (the quote's steps[] names each step, newest first — the network restores the previous stored state exactly); clear removes whole constraints ("drop the deadline" → clear ["deadline"]); remove_requirements takes back individual requirements terms. Call with ONLY quote_id to re-read the quote (e.g. to pick up preview images that finished rendering). TO PLACE EXACTLY ONE ORDER WITH NO MISTAKES: (1) on get_fabrication_quote list only that shop in vendors and state the pick in selection — the shop, plus the material, finish and shipping speed wanted; (2) read selection_match on the quote: status "one" means exactly one option answers the pick, "many" means say more in the pick (color, thickness, quantity), "none" means nothing on the quote answers it; (3) call create_checkout with quote_id and selection true — it orders that one option at the picked shipping speed, or refuses and creates nothing (selection_not_unique: the pick is not exactly one option; selection_speed_unavailable: the option does not show the picked speed now — an order never takes another speed in its place). It returns the selected checkout result: a hosted payment link by default, or the saved-card outcome when pay is saved on a keyed connection. On a quote you already have, step (1) is this tool: refine_quote with vendors and selection. CHOOSING STARTS THAT SHOP'S CHECK: storing a pick that comes to exactly one option has that ONE shop asked to confirm it when its answer is more than 15 minutes old or was never given — only when the pick is all this call carries, or the pick now comes to a different option than before. The answer's selection_match.check says "running", "fresh" (nobody needed asking) or "not_started" with why. You do not have to wait: call create_checkout with quote_id and selection true next — it waits for that answer.
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": {
"quote_id": "<quote_id>"
},
"name": "refine_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bends | No | New bend records for this part — a spec change: sheet lanes requote with exactly these bends (the list REPLACES the previous one, never patches it). Same shape as on get_fabrication_quote: each bend is two points in the part's own mm frame (flat DXF parts use z=0) plus angle_deg, direction up|down, and an optional requested radius_mm. Pass null to REMOVE every articulated bend | |
| clear | No | REMOVE constraints entirely ("drop the deadline", "forget the budget", "no more food-safe requirement"): list the constraints to clear and each is removed from the quote — the one deliberate widening besides undo. Clearing a deadline or budget answers instantly from held offers (near-misses convert back); clearing an attribute/reliability/requirements demand re-prices honestly. Same effect as ["any"] on the three filter args, extended to every constraint | |
| color | No | New color for this part (spec change — lanes requote). Colour WORDS only ('black', 'green', 'clear'); the network resolves them to each maker's stocked shades, dyes, filaments or coatings — a family word ('blue') brings back EVERY stocked shade of it, and the quote's color_shades_available lists them — never pass a material or a shade you invented. Pass null to REMOVE a previously asked color — back to vendor defaults | |
| scale | No | Rescale the DESIGN ITSELF before re-quoting: per-axis stretch factors over the file's current geometry ("make it 2x bigger" = {"x":2,"y":2,"z":2}). Mesh designs are genuinely converted — the child quote prices a rescaled file; STEP/IGES designs keep their original file with the dimensions riding as callouts (pass those too). {1,1,1} is a no-op | |
| finish | No | New surface finish ("powder coat", "anodized", "bead blasted") — a spec change: finish-capable lanes (sheet metal, CNC, metal print) requote WITH it; 3D-print lanes have no coating step, so they ignore the finish but keep the COLOR. A colored finish ask ("black powder coat") should set BOTH finish and color, so every lane lands on the buyer's color. Pass null to REMOVE a previously asked finish | |
| inserts | No | New hardware-insert records for this part — a spec change: sheet lanes requote with exactly these inserts (the list REPLACES the previous one, never patches it). Same shape as on get_fabrication_quote: species (nut|flush_nut|standoff|blind_standoff|stud) and thread required, hole geometry optional. Pass null to REMOVE every insert | |
| sort_by | No | "Organize by": re-order the quote's offer cards ("sort by cheapest" → "price"; "soonest arrival first" → "arrival"; "best rated" → "rating"; "total_price" = part + cheapest shipping; "recommended" restores the default price+speed rank). PURE PRESENTATION — answers instantly on the same quote, never re-prices or drops offers, and the ordering sticks across re-reads, streaming, and later refines until changed | |
| tapping | No | New tapped-hole records for this part — a spec change: sheet lanes requote with exactly these taps (the list REPLACES the previous one, never patches it). Same shape as on get_fabrication_quote: thread callout ("M6", "1/4-20") required, hole geometry optional. Pass null to REMOVE every tap | |
| vendors | No | Only these specific vendors/makers ("only show A3D Manufacturing", "just Slant 3D and Fictiv") — an INCLUDE list of vendor names as they appear on offers. A CONSTRAINT like processes: other vendors' offers drop instantly (nothing re-prices), further refines inherit the filter, and ["any"] clears it to show every vendor again. Friendly names accepted ("A3D", "slant 3d"); unmatched names are reported, never an error. Use it only when the user asks to SEE only that vendor; a question about what a vendor offers is answered with get_shop_offerings and leaves the board alone | |
| callouts | No | Dimensions you read off the user's drawing that matter ("hole_diameter 6.5mm ±0.1"). The tightest tolerance prunes vendors that cannot hold it. | |
| deadline | No | Latest acceptable delivery date, ISO YYYY-MM-DD | |
| material | No | New material for this part ("I need it in PLA" → "pla"). A spec change: lanes requote with this material through warm vendor sessions; an explicit material here replaces the quote's material fan-out. Free-form — unstocked asks resolve to the closest stocked material with a substitution note. Do NOT pass material changes as requirements terms. Pass null to REMOVE a previously asked material ("forget the aluminum ask") — the ask comes off the record and the process-default material fan returns | |
| quote_id | Yes | ||
| scenario | No | Comparison lane label. A labeled refine sits SIDE BY SIDE with the quote's other offers instead of replacing them: refines with the same label replace that scenario, different labels coexist (max 4 per quote), and a refine WITHOUT a scenario resets the baseline and supersedes every lane. "How does X compare to Y?" = one labeled refine per scenario (e.g. scenario "carbon steel" + material "carbon steel", then scenario "aluminum" + material "aluminum"). Keep labels short and human, like "carbon steel" | |
| food_safe | No | ||
| high_temp | No | ||
| materials | No | The materials the user will accept, when they name SEVERAL or a family rather than one ("plastic or metal", "delrin or PLA", "any aluminum") — each word a family ("plastic", "metal", "wood") or a specific material ("pla", "delrin", "aluminum_6061"). Only options in a listed material are shown; which shops are asked does not change. For ONE specific material use material instead: a stated material rules and this list is set aside (the quote says so). Usually OMIT: pass it only when the user names the materials they accept. On a refine: any list — narrower, wider, or clear ["materials"] to remove it — answers at once from what the quote holds (no shop is asked and nothing is priced again) | |
| processes | No | Narrow this quote to specific fabrication processes ("no, I meant in sheet metal" → ["sheet metal"]). A CONSTRAINT, not a new quote: excluded lanes drop while warm vendor sessions survive, and further refines inherit the filter. Friendly terms accepted ("sheet metal", "3d printing", "cnc", "laser"); pass ["any"] to clear the filter and show every process again. When comparison scenarios are open and the user narrows the process, re-refine EVERY active scenario label with this same arg so all columns prune together. One exception, for a flat part: a sheet-metal shop that laser-cuts flat stock is still returned under ["laser"] — its offer keeps process "sheetmetal" and carries also_processes ["laser_cut"] (one offer, listed under both; never two) | |
| selection | No | The pick: the ONE option to order, named by what it is rather than by an offer id (ids change when a quote is priced again). vendor = the shop as it appears on offers (friendly names accepted); spec = the resolved options the option must carry, each optional — material, color, finish, thickness_in (leave one out, or null, and it does not narrow the pick); process and quantity likewise optional; shipping_speed = the word the shipping option itself goes by ("standard", "express", "ground"), omitted = the cheapest speed; confirmed = true once the user has settled on this option (added it to a cart, or is paying) — a pick without it is only the option being looked at, and a cart shared by a link carries a part's pick only when it is confirmed. Storing a pick changes no price and never asks every shop. CHOOSING STARTS THAT ONE SHOP'S CHECK: on a quote you already have, a pick that comes to exactly one option whose shop answered more than 15 minutes ago (or was never asked) has that one shop asked to confirm it, and the answer already says so. Every quote read then carries selection and selection_match { status "one" | "none" | "many", matched, offer_id, shipping_option_id, speed_fallback, confirmed_until, check { state "running" | "fresh" | "not_started", code, retry_after_s }, price_changed }: check "fresh" = the shop's answer is under 15 minutes old; "running" = that shop is being asked now; "not_started" = nobody is being asked and code says why ("ask_limited" = the pick is kept and the shop is asked when the user pays; "quote_expired" = these answers are over 24 hours old: call reopen_quote, the pick is kept). Usually OMIT: pass it when the user has settled on one option, or to order by create_checkout with selection true. On refine_quote: an object stores the pick, null clears it, omitted keeps the one the quote has. Sent alone it is stored on the SAME quote at once (the same quote id comes back, nothing re-prices, no shop is asked); sent with other changes it rides onto the new quote | |
| bend_count | No | How many bends this part has, when the user names a COUNT but not where the bends go ("it has 2 bends" → 2) — a spec change: sheet-metal lanes requote the part formed with that many bends (0 = cut it flat, on the record). The cheap acknowledgment for a flat design whose bends are not articulated: when a bends list is on the quote (or passed here), the list wins and this count follows it — change articulated bends through bends, not this. An earlier "cut it flat" (bends: null) does not pin the count: a later bend_count > 0 re-prices the part formed. Pass null to REMOVE a previously asked bend count — the part prices as if no count was ever stated | |
| quantities | No | New quantities the user wants (spec change — lanes requote at the new quantity). Same rules as on get_fabrication_quote: pass the real ask, never inflate it. Pass null to REMOVE a previously asked quantity — the quote returns to single-part pricing | |
| ships_from | No | Only vendors that ship from these countries/regions ("only US vendors", "just European shops", "keep it domestic") — an INCLUDE list naming where the user DOES want vendors from. A CONSTRAINT like processes: non-matching vendors drop instantly (nothing re-prices), further refines inherit the filter, and ["any"] clears it to show vendors everywhere again. Friendly terms accepted ("US", "Europe", "Germany", "China", "UK"). Vendors whose origin is unknown or whose network is worldwide (a specific origin cannot be guaranteed) are excluded, each with an honest note. For "nothing from X" asks, pass the regions the user does want instead | |
| sort_label | No | Short human wording for a sort_order, displayed on the board ("most green first") — required with sort_order, since only you know what your order means | |
| sort_order | No | EXPLICIT card order for asks only you can judge ("sort the most green to the top"): look at the offers' preview images, decide the order yourself, and pass the offer ids first-on-top. Offers you leave out (including ones that stream in later) land below the listed ones in the default rank. Pass sort_label with it | |
| ship_to_zip | No | Destination US ZIP code, exactly as the user stated it — use this when the user provides their ZIP after a quote priced to the assumed central-US destination (routing.ship_to); the refined prices become theirs. NEVER guess or invent a ZIP | |
| submersible | No | ||
| within_days | No | Arrival within this many calendar days from today ("within 10 days", "in two weeks" → 14). Counted from the day the quote is READ, so it keeps meaning "within N days of now" — the day is the UTC date, the one arrival dates on offers (eta_date) are written in, so compare against those dates rather than a local calendar; an option keeps only the shipping speeds that arrive in time. With deadline as well, the earlier date rules. Use deadline instead when the user names a date. On a refine it answers at once from what the quote holds, tighter or looser; clear ["within_days"] removes it | |
| cart_item_id | No | When the quote being changed is a part in a cart: that part's item_id from the cart. The cart then follows the part to the quote this call answers with, by itself. It changes nothing else about the call | |
| color_shades | No | Narrow the board to these color SHADES exactly as the quote lists them (color_shades_available / "Colors on this board") — instant, nothing re-prices, the same quote id comes back with only those shades; pass null to show every shade again. Never invent a shade name. | |
| on_behalf_of | No | Your own opaque name for the person you are acting for (a visitor id; never an email or a name), when you serve many people from one address: each then has their own count of the shop asks their choices start. It changes nothing else. Usually OMIT | |
| requirements | No | Verbatim context terms from the user — materials, finishes, certifications, tolerances ("UV resistant", "anodized: red", "iso 13485", "tolerance: 0.1mm"). UFP applies what it can and reports what it could not; unresolvable terms are logged for vendor sourcing. Do not interrogate the user to fill this — pass what they said. | |
| thickness_in | No | New sheet thickness in INCHES ("make it in 1/8" → 0.125) — a spec change: sheet lanes requote at the nearest stocked gauge, flagging the substitution when the match isn't close. Pass null to REMOVE a previously asked thickness — back to the material's default gauge | |
| outdoor_rated | No | ||
| vendors_exact | No | How the names in vendors and vendors_exclude are read. Usually OMIT: a name then reaches every connector of the shop it names ("SendCutSend" covers its sheet, laser and CNC connectors), which is what a person means by a shop. Pass true only when the lists hold offer `vendor` slugs copied from this network's own answers and each must mean that one connector: a term that is exactly a connector slug is then that connector alone (["sendcutsend", "sendcutsend-laser"] leaves "sendcutsend-cnc" out), while any other word still resolves as a name. The answer's constraints_asked.vendors / vendors_exclude are the connectors the lists came to, and listed_vendors names each of them | |
| max_budget_usd | No | ||
| sort_direction | No | Flip a sort_by ordering: "desc" reverses the key's natural direction ("most expensive first" = sort_by "price" + "desc"). Only meaningful with sort_by | |
| undo_last_step | No | GO BACK EXACTLY ONE STEP ("undo that", "go back", "put it back how it was"): the network restores the previous quote's stored spec and constraints EXACTLY — never reconstructed from conversation — and re-prices where needed. Send it ALONE (no other args besides quote_id); combining it with changes is rejected. The quote's steps[] names what each undo would take back — steps[0] is the newest. Undo resets the baseline like any unlabeled refine, so open comparison scenarios close. Undoing the original quote is rejected with honest wording — relay it | |
| vendors_exclude | No | Shops to leave out ("anyone but Slant 3D", "not A3D or Fictiv") — shop names as they appear on offers; friendly names accepted ("A3D", "slant 3d"), and a name that matches no shop is reported, never an error. A shop on this list is never asked and never shown. Works beside vendors: the shops shown are the vendors list (or everyone) minus this list, so a shop named on both is left out. Usually OMIT: pass it only when the user names shops they do not want. On a refine: naming more shops answers at once from what the quote holds (no shop is asked); ["any"] or clear ["vendors_exclude"] removes the list, and the shops that come back are priced then | |
| min_vendor_stars | No | Only vendors whose displayed review rating is at least this many stars (1-5); vendors with no reviews yet are excluded | |
| min_vendor_reviews | No | Only vendors with at least this many verified-purchase reviews | |
| proven_spec_orders | No | Only vendors with at least N completed orders for this exact process+material — "a vendor that prints PC reliably" | |
| remove_requirements | No | Take back INDIVIDUAL requirements terms ("drop the anodized ask, keep the rest"): each listed term is removed from the quote's requirements by normalized match, the others stay. Unknown terms are ignored, never an error. Re-stating the requirements list can never drop a term (terms merge as a union) — this is the removal channel |