build_entree
Create a custom Chipotle entree by selecting your preferred type, protein, rice, beans, and toppings to build a personalized order.
Instructions
Build a Chipotle entree with your preferred ingredients. This is the core of any order.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entree | Yes | Type of entree | |
| protein | Yes | Choice of protein | |
| rice | Yes | Choice of rice | |
| beans | Yes | Choice of beans | |
| toppings | Yes | List of toppings | |
| double_protein | No | Double the protein (extra charge) |
Implementation Reference
- index.js:122-174 (handler)The 'build_entree' tool is registered and implemented in index.js. It accepts entree specifications (protein, rice, beans, toppings, etc.) and returns a formatted receipt with price calculations and a random quip.
server.tool( "build_entree", "Build a Chipotle entree with your preferred ingredients. This is the core of any order.", { entree: z.enum(ENTREES).describe("Type of entree"), protein: z.enum(PROTEINS).describe("Choice of protein"), rice: z.enum(RICES).describe("Choice of rice"), beans: z.enum(BEANS).describe("Choice of beans"), toppings: z .array(z.enum(TOPPINGS)) .min(0) .max(TOPPINGS.length) .describe("List of toppings"), double_protein: z .boolean() .default(false) .describe("Double the protein (extra charge)"), }, async ({ entree, protein, rice, beans, toppings, double_protein }) => { // Price calculation (very scientific) let price = { Burrito: 10.75, Bowl: 10.75, "Tacos (3)": 10.75, Salad: 10.75, Quesadilla: 11.5, "Kid's Meal": 6.25 }[entree] || 10.75; if (double_protein) price += 3.75; if (toppings.includes("Guacamole")) price += 2.95; if (toppings.includes("Queso Blanco")) price += 1.65; const item = { entree, protein: double_protein ? `Double ${protein}` : protein, rice, beans, toppings, price: price.toFixed(2), }; const receipt = [ `## Your ${entree}`, "", `Protein: ${item.protein}`, `Rice: ${rice}`, `Beans: ${beans}`, `Toppings: ${toppings.length > 0 ? toppings.join(", ") : "None (you monster)"}`, "", `Price: $${item.price}`, "", `> ${getRandomQuip()}`, ]; return { content: [{ type: "text", text: receipt.join("\n") }], _item: item, }; } );