Crayonz
Design custom apparel from chat.
Community: Submitted by a user or imported; check the owner before granting accessOnlineNo sign-inGlobalFreeCan modify data
What it can do
- List Garments: Browse the Crayonz catalog: every garment with slug, name, sizes (S/M/L/XL/XXL), INR price, every colour (name+hex+availability+thumbnail), supported placements. CALL FIRST if you don't
- Generate Design: Create a fresh AI design on a Crayonz garment. Returns a draft_id, signed preview URL (15-min TTL), thumbnail, price. ⚠️ PROMPT LIMIT: 3–500 chars. TIGHTLY SUMMARISE the user's ask be
- Modify Design: Edit a draft's ARTWORK with NL ('warmer colours' / 'add a sun' / 'more minimal'). Re-runs Gemini image-edit, returns same draft_id with new preview + version-history entry. COUNTS towar
What data it sees
Do you need an account
No: the server works without sign-in
Design custom apparel from chat. Describe an idea and Crayonz generates AI designs on real garments — classic tees, oversized tees, hoodies, zip-ups, polos — with live mockups, colourways, text and logo layers, on-model photo shots, and a version history you can roll back. When it's right, pick a size and mint a secure Cashfree checkout link (UPI / cards / wallets) without leaving the conversation. Printed and shipped by our print-and-fulfillment partners in India (5–7 days); international rollout in progress. 49 tools covering catalog, generation, editing, layers, marketplace publishing, and checkout.
Server tool list (49)
Raw names from tools/list. Only developers need these.
| list_garments | Browse the Crayonz catalog: every garment with slug, name, sizes (S/M/L/XL/XXL), INR price, every colour (name+hex+availability+thumbnail), supported placements. CALL FIRST if you don't have exact slugs (NEVER invent them — rejected at generate_design). Skip if already called this session. AFTER: confirm garment/colour with user (don't default silently); ASK placement (front-center/back-center/left-pocket/right-pocket — see `placements` per garment); then generate_design. POCKET CONVENTION: left-pocket = WEARER's left chest (viewer's right on the mockup). Standard apparel labelling. |
| generate_design | Create a fresh AI design on a Crayonz garment. Returns a draft_id, signed preview URL (15-min TTL), thumbnail, price. ⚠️ PROMPT LIMIT: 3–500 chars. TIGHTLY SUMMARISE the user's ask before calling — the design-api is a Gemini image model that responds better to concise briefs anyway. If the user's message is longer than ~400 chars, distil the visual intent (subject, style, palette, key details) and drop conversational padding. The tool WILL reject >500 chars with prompt_too_long. 🖼️ PHOTO WORKFLOW ('make a shirt of my dog / kid's art / wedding photo / band logo'): the user has attached a photo to the chat. Two paths: (a) EXACT photo on the shirt (pet portrait, kid's art, memorial merch, band logo) → pass the photo URL as `seed_image_url`. Background auto-removed; the photo becomes the print. Prompt can be short ('portrait of my dog', 'my son's drawing') — it just guides bg-removal. (b) INSPIRED-BY design (photo is a style / mood anchor, not the print) → pass the photo URL in `reference_image_urls`. Prompt describes what to create; the photo anchors palette + composition. Default to (a) for 'make a shirt of X' phrasings; (b) for 'design in the style of X'. In ChatGPT the file URL auto-fills via openai/fileParams; in Claude Desktop pass the file URL directly. PRE-FLIGHT: (1) Call list_garments first if you don't know exact garment/colour slugs — NEVER invent them. (2) ASK placement: front-center | back-center | left-pocket (wearer-left) | right-pocket. Don't silently default. (3) Coach vague prompts ('something cool' → ask for specifics). AFTER: modify_design (artwork tweaks, counts toward cap) · add_text (text overlay) · add_shape (decorative shape) · set_design_placement (move/resize/recolour/SWAP GARMENT, FREE) · analyze_design (describe) · get_design_suggestions (improvement ideas) · reset_layers (free — revert to last generate/modify) · set_purchase_options + create_checkout (buy). num_images: 2 (default — the user picks their favourite) or 1 for a single take, up to 4. PURCHASE INTENT RULE: when the user has already stated a size or said they're ready to buy, do NOT pause at the two takes to ask which they prefer — continue with the first draft (set_purchase_options → create_checkout), show the link next to both takes, and note that 'use the other one' re-mints the link for the alternate. reference_image_urls: up to 3 style anchors (use blend_references for true blend of 2+). seed_image_url: exact-image mode (skips prompt-based gen — best for photos). CAP: free tier = 3 AI tries per draft (generate + modify/add_text/add_shape combined). On 4th: returns express_cap_reached with a ₹199 Designer Pass URL (lifts to 30, refunded at checkout). Don't loop on the error — surface the choice to the user. |
| modify_design | Edit a draft's ARTWORK with NL ('warmer colours' / 'add a sun' / 'more minimal'). Re-runs Gemini image-edit, returns same draft_id with new preview + version-history entry. COUNTS toward cap. DON'T USE for: MOVING/resizing → set_design_placement (FREE); garment colour change → set_design_placement(garment_color); adding TEXT → add_text (cleaner letters); adding SHAPES → add_shape. Be SPECIFIC: 'replace the red triangle with a blue circle' beats 'change it'. Coach vague users. reference_image_urls: first URL used as external style anchor. region_hint: when the user points at ONE part ('fix his face', 'make the bottom text bigger'), pass that part here — the edit applies locally and the rest of the design is preserved exactly. Omit for whole-design restyles. MULTI-VIEW: pass view='back' to iterate the BACK print on a draft that was created with back_prompt. Errors with no_back_design if the draft has no back — the LLM should suggest running generate_design fresh with back_prompt to add one. Default view is 'front' (back-compat). CAP: 3 AI tries/draft free (generate + modify/add_text/add_shape combined). On express_cap_reached: STOP looping — surface choice (add to cart now OR ₹199 Pass for 30 more, refunded at checkout). |
| set_design_placement | Move / resize / recolour-garment / SWAP-GARMENT-TYPE WITHOUT re-generating artwork. FREE — no iteration cap, no AI cost. ~2s mockup recompose. YOU MUST CALL THIS TOOL whenever the user says any of: 'move it to X' · 'put it on the back/front/pocket' · 'try it on the back' · 'flip to the back side' · 'make it smaller' · 'make it bigger' · 'try the white version' · 'show me the back' · 'try it on a hoodie' · 'same design on a polo' · 'switch to tshirt'. Do NOT respond 'done' or 'placed' before firing this tool — the user can't see the new mockup until you call it and a new widget card renders. AFTER A SUCCESSFUL CALL, your reply to the user MUST explicitly point at the new mockup card, e.g. 'Moved to the back — the new preview is below.' Do NOT just say 'done'. USE WHEN: 'move to back' / 'try the left pocket' (position) · 'make it smaller / bigger' (scale 0.5-1.5) · 'try it on the white shirt' (garment_color) · 'try it on a hoodie' (garment_type). Combine any of them. GARMENT SWAP: pass `garment_type` to move the SAME design onto a different garment (e.g. tshirt → hoodie). No credit burn. Colour auto-matches by hex → name → first available on the new garment; pass `garment_color` to override. Price is recomputed from the new garment's template. Size is kept if valid on the new garment, otherwise cleared. DON'T USE for ARTWORK changes (subject, style, design colours, text content) → that's modify_design / add_text / add_shape. PLACEMENTS: front-center (default chest) · back-center · left-pocket (WEARER's left, viewer's right, ~4" — monograms/icons ONLY) · right-pocket (same). Not all garments support all — see `placements` from list_garments. Zipper hoodie has NO front-center (zipper runs down the middle) — only pockets + back. POCKET WARNING: ~4×4 inches. Big designs squash. If user wants their hero on a pocket, suggest front-center instead. |
| set_purchase_options | Set size and/or quantity on a draft. REQUIRED before create_checkout (checkout refuses if size is null). Metadata-only — no AI cost, no cap impact, no preview change. SIZES: S/M/L/XL/XXL (Indian sizing, ~US sizing for adults). Chest guide: 40"→M, 44"→L, 48"→XL. Don't invent XS/3XL. QUANTITY: 1-5. For >5 point user to crayonz.ai/bulk-orders. Both args optional — pass either or both; omitted fields keep current value. |
| get_draft | Look up a draft, OR list recent drafts. WITH draft_id: returns full state + 15-min signed preview URL + version history. Use to refresh stale ids or recover lost sessions. WITHOUT draft_id: returns user's 10 most recent drafts (id + garment + status + price + updated_at + public preview URL). Use for 'show me my drafts' / 'what was I working on'. To open one, call again with that draft_id. READ-ONLY, no cap impact, safe to repeat. |
| check_job | Look up a background generation job by its id and, if it has finished, return the result. Use this when a previous generate/mockup call came back saying the job was still running and gave you a job_id. The work keeps going in the background and has already been paid for, so collect it here — do NOT generate again, that charges the user a second time. If the job is still queued or running, wait a few seconds and call this again with the same id. |
| create_checkout | Final step — upscale design to print resolution and mint a single-use Cashfree URL (valid 30 min). User opens URL in browser for address + UPI/card/wallet payment. REQUIRES size set on the draft — pass `size` here directly, or call set_purchase_options first. Optional `quantity` (1-5) and `size` args persist to the draft before minting, saving a round-trip. Print-readiness is auto-guaranteed here — this tool runs the 2408×3408 upscale internally before minting the URL. AFTER: surface URL as clickable link; tell user it's 30-min single-use; if they want another draft, re-call for new draft_id. Production ships from India 5-7 biz days. Price includes design + garment + India taxes + shipping inside India. International shipping rolling out. |
| get_design_suggestions | Vision-analyse a draft, return prioritized improvement ideas (contrast, resolution, composition, colour harmony, printability). Read-only, no cap impact. Call on 'any suggestions?' / 'how can I improve this?' OR proactively after generate_design to surface 1-2 next-improvements the user didn't know to ask for. After: surface top items in plain language (errors → warnings → info), offer to ACT (call modify_design with suggestion text, or set_design_placement for size/positioning ones — free). |
| add_text | Stamp text onto an existing draft as a layer — NOT a re-generation. Renders the text as crisp SVG and bakes it on top of the current design before re-composing the mockup. Letterforms are exact (no Gemini warping), runs in ~1-2s, and doesn't burn an image-gen credit on the design service. **FREE — no cap impact.** Pure SVG rasterisation, zero Gemini spend. Stack as many text overlays as you want without eating into the 3 AI tries on the draft. (2026-07-05: deterministic layer ops are free forever — that's `add_text`, `add_shape`, `place_design`, `set_design_placement`, `reset_layers`. Only generate/modify/apply_suggestion/apply_style/blend touch the cap.) STYLES: bold / outlined / script / vintage / modern / graffiti / minimal / retro — these map to font weight, family, and an optional stroke. Pick 'bold' or 'outlined' for max readability on busy art. COLORS: any hex (#RRGGBB) or CSS name. Defaults to white. Pair with strokeColor/strokeWidth for an outlined-text effect. POSITION: 'overlay' (default, lower-third on the design), 'above' / 'below' (text strip top/bottom), 'left' / 'right' (text strip side), 'replace' (text only, no underlying design). For richer effects (curved text, multiple text blocks per design) open the design in the Studio via view_in_studio_url. |
| add_shape | Stamp a vector shape (circle, star, heart, triangle, rectangle, and a few aliases) onto an existing draft as a layer. Renders via in-Worker SVG → PNG; no Gemini regeneration, no image-gen credit, deterministic geometry, ~1-2s. SHAPES: circle / square / rectangle / star / heart / triangle (primitives) · badge / burst (≈ circle) · frame / banner (≈ rect) · arrow / diamond (approximated to triangle/rect). POSITION: around / behind (wrap or backdrop the design) · top / bottom / left / right (adjacent strip) · center (overlap centre). FILL vs OUTLINE: set `fill` for solid colour, set `stroke` + `strokeWidth` for outlined. Omit fill → outlined-only. **FREE — no cap impact.** Pure SVG rasterisation, zero Gemini spend. Stack as many shapes as you want without eating into the 3 AI tries on the draft. (2026-07-05: deterministic layer ops are free forever.) For paint-splatter / freeform shapes, use modify_design instead — that one is Gemini-backed and counts. |
| analyze_reference_image | Vision-analyse a USER-UPLOADED image URL (not a draft). Returns palette + style + mood + composition + extracted text. Read-only. Use BEFORE generate_design when user attached a reference and wants to discuss it ('use this style', 'something like this'). Then call generate_design with the URL in reference_image_urls, OR blend_references for multiple refs. Skip if user already described what they want — go straight to generate_design. For analysing an EXISTING DRAFT use analyze_design instead. Gemini treats refs as STYLE anchors, not tracing templates. |
| analyze_design | Read the palette + style + mood + composition + text extracted from an EXISTING draft's current design. Fully read-only — does NOT modify the draft, does NOT consume the iteration cap. CALL WHEN the user EXPLICITLY asks you to describe, summarise, explain, or recap what was generated (e.g. 'describe what you made', 'what does the design look like?', 'tell me about this draft', 'change the BLUE part' on a draft you haven't seen so you first need to confirm there IS blue). ALSO call before a modify step on a draft you didn't generate yourself. DO NOT call as an UNPROMPTED 'review' step right after a successful generate_design — print quality, colour suitability, and scale fit are already guaranteed by the system, so an unsolicited analyze is just friction. HOST-SIDE CONSENT NOTE: some clients (past claude.ai sessions) showed a one-time 'approve access?' prompt on the first call and returned 'No approval received' when the user hadn't clicked it. If you see that error, tell the user 'the client is asking for permission — accept the prompt and I'll try again' rather than looping. get_design_suggestions covers 90% of what a user actually needs and doesn't hit this gate. For improvement ideas → get_design_suggestions. For a fresh URL (not a draft) → analyze_reference_image. |
| list_colors | Browse every COLOUR in the Crayonz catalog (deduplicated across garments, sorted by hue when rendered visually). Returns the same data as list_garments but optimised for the 'what colours do you have?' question — Claude apps that render the colour-palette widget will show a hue-sorted grid of every unique hex with 'available on' badges. WHEN TO CALL: • 'What colours do you offer?' / 'show me your palette' / 'I want to see the colours first' • User cares about colour before garment (e.g. 'I want something forest green — what can I get it on?'). • Use list_garments instead when the user is garment-first ('show me your hoodies'). READ-ONLY. Same underlying Supabase query as list_garments — no extra cost. Safe to call repeatedly. |
| list_community_designs | Browse the Crayonz community feed — paginated. Unifies raw studio generations (source='feed', anonymous) and marketplace listings (source='listing', creator-attributed). Read-only. Call on 'show me what people are making' / 'inspire me' / 'trending?'. Pagination: limit 1-30 (default 12, keep ≤15 to summarise). sort: 'newest' (default) or 'popular'. After: SUMMARISE 2-3 noteworthy items (don't dump the list); offer remix_listing on a picked id (reference or clone mode), or analyze_reference_image to study one first. |
| remix_listing | Turn a community feed or marketplace item into a fresh draft. REQUIRES valid item_id from list_community_designs (NEVER invent). MODES: 'reference' (DEFAULT) anchors on item style + uses user's prompt for their twist (REQUIRES prompt). 'clone' reuses artwork as-is on chosen garment/colour/placement (no AI regen, prompt ignored). Confirm mode with user — 'love it, no changes' = clone; 'love the vibe, make it about X' = reference. Defaults: tshirt/black/front-center. Marketplace remixes preserve creator credit (original creator earns royalty on purchase). |
| blend_references | Generate a fresh design that FUSES 2-4 reference images. Returns one new draft (fresh cap). Use when user has multiple refs and wants their fusion. For ONE ref → generate_design(reference_image_urls). For exact-copy of one image → generate_design seed mode. For single marketplace remix → remix_listing. PROMPT: tell Gemini WHAT to take from each ('palette from #1, shapes from #2'). Vague 'just mix them' produces drift. Same garment/colour/placement params as generate_design. |
| publish_to_marketplace | List a finished draft on the public Crayonz marketplace. Creator earns royalty per sale + on remixes. Returns listing_id + public URL. Confirm with user first (publish is visible to everyone). REQUIRE: title (3-120 chars, marketable — coach away from 'cool design'/'my logo' to 'Catan Champion Crest 2026'). RECOMMENDED: description (1-2 sentences for discoverability), tags (3-5 lowercase keywords). OPTIONAL: price (defaults to draft.price_inr, override to add creator premium markup). Draft must be 'ready' status. After: share the public URL with user, note it now appears in list_community_designs. |
| import_external_design | Use an EXISTING image (from ChatGPT image-gen, Gemini image-gen, a Pinterest pin, a Supabase upload, anywhere) as the design — skips Crayonz's own AI generation. Faster + cheaper than generate_design when the user already has art they like. WHEN: user provides a URL or says 'use the image you just made', 'put this on a tee', etc. NEVER use for prompts like 'design me a rocket' — that's generate_design. FLOW: download → re-host on Supabase (so the URL outlives source TTL) → bg-remove → compose mockup → return draft preview. AFTER: surface the preview, ask about size + quantity, offer create_checkout. Same conversational pattern as generate_design. |
| import_svg_design | When YOU (the LLM) author SVG markup, pass it here to use as the design — no AI generation round-trip needed. Faster than generate_design and gives pixel-perfect output for icon/text/geometric work. WHEN: user wants typography, simple icons, monogram logos, geometric patterns, single-colour line art — any case where SVG expresses the intent better than a raster prompt. WRITE: emit a complete SVG document (`<svg ...>...</svg>`) with an explicit viewBox. Use transparent fill (no background rect) — the printable area sits the design on the garment directly. Stick to colours that contrast the garment. RASTERISED to PNG at the printable-area's native pixel resolution via resvg-wasm running inside the Worker. Skips bg-removal (SVG is transparent natively). |
| create_vector_design | Build a NEW draft from a structured layer stack — image + text + shape primitives — composited via resvg-wasm in-Worker. Server builds the SVG from your JSON, so ChatGPT's host safety accepts the call (raw SVG strings via import_svg_design get blocked upstream in ChatGPT — this tool is the cross-host equivalent). **FREE — no cap impact.** Pure SVG rasterisation, zero Gemini spend. Same free-forever policy as add_text / add_shape / place_design. WHEN: user wants typography-driven merch, monograms, iconography, geometric patterns, or any composition better expressed as layers than as a Gemini prompt. Also the escape hatch for ChatGPT users because import_svg_design is host-blocked there. COORDINATES: printable-area-relative (origin = top-left of the printable area, NOT the garment canvas). Layers stack in array order — layers[0] is the bottom of the stack. STACK ORDER example — 'graffiti tag with a spraypaint splatter': layers[0] = shape circle (splatter backdrop) layers[1] = text 'CRAYONZ' (main tag) layers[2] = shape star (accent above the text) PAIR WITH get_canvas_state — call FIRST to read the printable bounds (pixels + inches), then position your layers inside those bounds. Layers that spill outside the printable area clip at the edges. |
| create_shirt_from_photo | The ONE tool for 'make a shirt of this photo'. User attached a photo to chat → call this. Two modes via `style`: • **as-is** (DEFAULT): background auto-removed, photo composited directly on the garment. Your photo IS the print. Zero Gemini spend, FREE — no cap impact. ~4-6s. Use for pet portraits, kid's art, memorial merch, band logos, family photos, wedding photos, event photos — anywhere the customer wants THEIR image on the shirt, not an AI reinterpretation. • **artistic**: photo becomes a Gemini seed; the AI creates an illustration inspired by it. Counts as 1 iteration credit. Use when the customer says 'make it in Studio Ghibli style' or 'as a graphic tee poster' — they want the SUBJECT of the photo but in a different visual language. In ChatGPT, `photo_url` auto-fills from user file uploads via openai/fileParams. In Claude Desktop, pass the photo URL directly. If the user hasn't attached a photo, tell them to drop it into the chat first — don't invent a photo_url. Prefer this tool over generate_design(seed_image_url=...) when the user's clear intent is 'this photo on a shirt' — the single-purpose signature makes the routing unambiguous and the two style modes make the AI-vs-literal choice explicit. |
| get_canvas_state | Returns the printable canvas geometry for every view of a draft's garment, plus the current placement and the live mockup URL. Use BEFORE proposing a new placement, scale, or rotation — gives you a coordinate system to reason in instead of guessing. RESPONSE: each view carries `printable_area_px` (the bounding rectangle in canvas pixels — origin top-left) and `design_areas` (named sub-regions like 'Front', 'Left Pocket' with their pixel rect AND their physical inches when the admin set them on the template). Convert px→inch via the design_area ratio if you need printable_area in inches. WHEN: 'put the rocket lower-right of centre' / 'make it 30% smaller' / any prompt that implies spatial precision. SKIP for named-slot picks ('left pocket', 'back centre') — those don't need geometry. Read-only. No cap. Safe to call repeatedly. |
| place_design | Re-compose a draft's mockup with explicit pixel-precise geometry. TWO MODES: 1. SINGLE (back-compat): pass `area` and the draft's existing design is placed into that rect on the garment's printable canvas. 2. MULTI-LAYER: pass `layers` — an ordered array of image/text/shape layers, each with its own area in PRINTABLE-AREA-RELATIVE coords (origin = top-left of printable area). Layers stack in array order (layers[0] = bottom). This is the equivalent of stacking objects on the Studio's Fabric.js canvas — design + text + shapes in one compose call, no Gemini regeneration. PAIR WITH get_canvas_state — call that FIRST to read the printable bounds (pixels + inches), then position your layers inside those bounds. In single mode, out-of-bounds coords get clamped silently (response includes `clamped: true`); in multi mode the canvas IS the printable area, so layers naturally clip at the edges. Use set_design_placement instead when the intent is a named slot ('left pocket', 'back centre', 'full front'). |
| reset_layers | FREE, uncapped undo. Reverts the draft's front OR back to the last generate_design / modify_design output on that side, and drops every add_text / add_shape / place_design overlay stamped since. Use when a stamp went wrong (misplaced text, wrong shape colour, size looked off) and you want to retry cleanly instead of stacking a second overlay on top or burning another iteration credit to fresh-generate. SEMANTICS: matches add_text(stack_on_existing=false), but committed to the draft's URL columns so subsequent add_text / add_shape / place_design calls also start from the clean base. Does NOT consume the 3-iterations cap. VIEW: front (default) reverts the front URL columns; back reverts back_design_url / back_mockup_url. Errors with no_prior_version when there's nothing to revert to on that side (e.g. reset_layers(view='back') on a front-only draft). |
| list_versions | FREE, read-only. Returns the ordered version history for a draft — every generate_design / modify_design / add_text / add_shape / place_design stamp that landed on it, newest first. Each entry carries a signed 15-min preview URL, the prompt snippet, the side it touched (front/back), and a kind classification so the LLM can talk about them in plain language. USE WHEN the user says 'go back to the version before I added the text', 'what did the design look like earlier', 'show me the history', etc. The response also surfaces which version reset_layers(view=front|back) would revert to (the newest non-overlay entry on that side). Does NOT consume the iteration cap. Version array is capped at 20 entries (oldest drop off first) per the draft schema. |
| clone_design | Copy the raster artwork from an existing draft onto a DIFFERENT garment (t-shirt → hoodie, black → white, etc.) without re-running Gemini. Creates a brand-new draft with its own draft_id, fresh 3-iteration cap, and a re-composited mockup — the source draft is untouched. USE WHEN the user says 'now put this on a hoodie', 'I want the same design in white', 'give me this in polo too', 'switch garment/colour'. Much cheaper than modify_design or re-generate — no image-gen credits burned on either draft. MULTI-VIEW: if the SOURCE has a back print (back_design_url set), the clone brings it over too — same clone semantics apply. If the TARGET garment has no back-view base image (rare), the back is dropped and the response flags it. If the target is zipper_hoodie (no front placement), the source front's design falls back to left-pocket by default; caller can override via `placement`. COST: 1 new draft slot (default express tier, 3 iterations). Zero design-api calls beyond the mockup composite. |
| generate_lifestyle_shot | Renders photorealistic 'worn on a model' shots of the current draft — a cast individual actually wearing the user's design, in a specific photographic vibe. Uses Nano Banana Pro (Gemini 3 image) with the draft's design + composed garment mockup as references so the print matches exactly and the silhouette matches the garment. VIBES (pick ONE per call — 29 available). Flagship six: - 'streetwear' — Corteiz / Aime Leon Dore, urban candid, 35mm Portra 400 - 'minimal' — Kinfolk-adjacent, warm window light, muted palette - 'grit' — Harmony Korine's Gummo, desert-lot Americana, Super 8 grain - 'y2k' — Vetements paparazzi, on-camera flash, tabloid energy - 'kinfolk' — linen-and-oak interiors, golden hour, quiet - 'editorial' — luxe magazine, dramatic lighting, high contrast Plus scene vibes (hiphop, festival, academia, techwear, gym, retro_90s, beach, punk, outdoor_adventure, anime_otaku, skater, corporate_casual, college_campus, casual_kickback, date_night, gamer, music_scene, funny) and sports fandoms (sports_fan, football_fan, cricket_fan, f1_fan, basketball_fan). Unsure which fits the design? Call `recommend_photoshoot_vibes` first — it ranks vibes for the current draft with reasons. COST: ~$0.067 per shot at 1K (Nano Banana Pro on Flash 3.1 tier). Default 1 shot per call. shot_count 1-6. NOT cap-counted — this is a preview aid, not a design iteration. CACHING: single-shot results are cached on the draft keyed by design_url + vibe. A second call with the same args on an unchanged draft returns the cached URL instantly for free. Design mutations (add_text / add_shape / modify_design / place_design / reset_layers) invalidate the cache. USE WHEN the user says 'show me on a model', 'what would this look like worn', 'give me a lifestyle shot', 'model mockup', 'see it on someone', 'photo of a person wearing this'. Also good as a checkout preview so the user sees the design worn on a real person before paying — big trust-builder for first-time buyers. LATENCY: ~4-8s per shot on Flash 3.1. Multi-shot batches parallelise server-side. |
| recommend_photoshoot_vibes | Rank the lookbook photoshoot vibes that best fit a draft's design — vision-aware (it looks at the actual artwork, not just the prompt). Read-only, fast (~2s), no cap impact. USE BEFORE generate_lifestyle_shot when the right vibe isn't obvious — e.g. the user says 'show it on a model' without naming a style, or the design's subject suggests a niche vibe (a cricket graphic → 'cricket_fan', a racing car → 'f1_fan'). Then pass the top vibe straight into generate_lifestyle_shot. |
| save_style | FREE, no cap impact. Save a named brand kit — palette (up to 8 hex colours), font vibe hint, optional logo URL, optional notes ('always centred', 'no white borders', etc). Upsert by name: calling save_style twice with the same name overwrites the previous version. USE WHEN the user asks 'save this look', 'remember these colours', 'set up my brand kit', 'save the IITian Vibes style'. Ideally: after a successful generate_design that the user loves, offer to save the palette/vibe so future prompts can just say 'apply my IITian Vibes style' via apply_style. Then use apply_style(draft_id, style_name) on future drafts to constrain modify_design toward this identity — one modify credit spent per apply. |
| list_styles | FREE, read-only. Returns every style preset the current user has saved, newest first. Each entry has name + palette + font_style + notes + created_at, so the LLM can reference them by name in apply_style. USE WHEN the user asks 'what styles do I have saved?', 'show my brand kits', 'do I have an IITian Vibes preset?'. |
| apply_style | Constrain a draft's current design toward a saved brand kit. Reads the preset's palette / font vibe / notes and constructs a modify_design instruction from them — one modify credit spent per apply (COUNTS toward cap). USE WHEN the user asks 'apply my IITian Vibes style', 'switch this to my brand palette', 'make this match my saved look'. The LLM should confirm which saved style before firing if there are multiple — apply_style is not reversible for free (it's a modify_design, cap-counted). Use reset_layers to undo overlays or list_versions + revert if the change was worse than the starting point. MULTI-VIEW: applies to the front by default. Pass view='back' to apply to the back-view design of a multi-view draft (same semantics as modify_design(view='back')). |
| apply_suggestion | Route a single suggestion from get_design_suggestions into a modify_design call — closes the 'flag → fix' loop the audit asked for. COSTS 1 iteration credit (same as modify_design). STATELESS: no suggestion IDs to manage. The LLM already has the suggestion text in its conversation context; it just passes the raw text (or a paraphrase) here as `suggestion_text`. The tool classifies observation-style text ('low contrast') into an actionable instruction ('Improve contrast: low contrast') and forwards to design-api /modify. USE WHEN the user says 'apply the first suggestion', 'fix the contrast issue', 'do the yellow-on-red fix'. If unsure which suggestion, call get_design_suggestions first to enumerate. MULTI-VIEW: applies to the front by default. view='back' targets the back print of a multi-view draft (mirrors modify_design). |
| search_logos | Search the curated institute logo library — 160+ approved logos across IITs, NITs, IIMs, AIIMS, NLUs, BITS, IISc, IISERs, IIITs. Each result gives you a `slug` (canonical ID), the institute's name / short name / city / brand colours, and public URLs for PNG + SVG + dark-mode PNG variants (variants are populated opportunistically — fall through to `png_url` if the others are null). WHEN: user asks for their college's logo on a garment — 'IIT Bombay hoodie', 'AIIMS Delhi tee', 'BITS Pilani polo', etc. Chain into `place_logo` using the returned `slug`. Free-text matches full name ('Indian Institute of Technology Bombay'), short name ('IIT Bombay', 'IITB'), or city ('Mumbai', 'Bombay'). Read-only, no cap impact, ~200ms typical. Empty query with a series filter is fine — returns the first N approved rows in that series alphabetically. |
| place_logo | Composite a logo ONTO an existing draft's design as an editable layer at a named placement (front-center / back-center / left-pocket / right-pocket). The underlying design SURVIVES — the logo stacks on top of it. Deterministic layer op — NO Gemini call, ~2-4s, FREE (no cap impact). LOGO INPUT: a slug from `search_logos` (e.g. 'iit-bombay') OR a public image URL on the allowlist — including the image_url returned by `upload_logo` / `list_my_logos` for the customer's own logos. EDITABLE AFTERWARDS: the logo appears in `list_layers`; use `update_layer` to rescale/move/recolour it and `remove_layer` to take it off again without touching the rest of the design. PLACEMENTS: `left-pocket` / `right-pocket` are small chest badges (scale 0.8-1.0); `front-center` / `back-center` sit over the main print area (scale 0.5-0.7 reads best). COLOR: when `use_dark_variant` is omitted it is picked automatically from the garment colour — light garments (white / cream / sand) get the dark logo variant when available so the badge stays visible. Pass it explicitly only to override. SVG vs PNG: SVG scales crisper at print resolution and is picked by default; a needed dark variant wins over SVG; otherwise the tool silently falls through to PNG. |
| list_text_presets | List curated typography presets tuned for common merch text patterns — retro/vaporwave headlines, jersey numbers, monograms, minimal wordmarks, batch/class years, farewell signatures, and campus/college names. Each preset bundles font, weight, color, stroke, and spacing into one slug the host LLM can pass to `add_text(preset=<slug>)` instead of specifying every field. CATEGORIES: batch-year (3), college (5), minimal (3), monogram (2), retro (3), signature (2), varsity (4). Pass `category` to narrow, or omit for everything. Every preset has a `preview_url` (rendered PNG, transparent bg) so the host can show the user what it looks like before applying — surface this in the UI when available. Preview URLs can be null on freshly-added presets that haven't been re-rendered yet; fall back to `sample_text` + `notes` in that case. Read-only, no cap impact. |
| get_permanent_preview | Snapshot the current mockup(s) of a draft into a permanent public URL. Default draft mockup URLs are 15-minute signed URLs — fine for chat previews, useless once the customer walks away and comes back tomorrow. Call this right before sharing a mockup outside the current chat session — a DM handoff to the customer, a social post, or an email card. The returned URL never expires. Idempotent: content-addressed by the draft's mockup URL + updated_at. Repeat calls on an unchanged draft return the SAME URL and skip the re-upload; a design mutation (add_text, modify_design, place_logo, etc) bumps updated_at so the hash rolls and a fresh snapshot is taken. views param: `['front']` (default), `['back']`, or `['front','back']`. Requesting `back` on a draft with no back mockup returns null for that view — never errors. |
| list_fonts | List the font catalog the deterministic text renderer supports. Every returned entry has a `status`: • `bundled` — the TTF/woff2 is embedded inside the Worker; the rasteriser produces the exact letterforms you'd expect. • `fallback` — we accept the family in `add_text`'s `font` param but resvg-wasm substitutes the bundled default (Inter Bold). The text still renders, just not in the requested style. Filter with `category` (sans/serif/display/script/monospace) or `weight_min` / `weight_max` (100-900). Both are optional; omit for the full list. Chain into `add_text(preset=<slug>)` to use a preset with tuned font+weight+color+stroke, or `add_text(font=<slug>)` for a one-off font choice. Read-only, no cap impact. |
| compose_layered_design | One-call composer for the standard custom-merch pattern: front pocket badge + back-top text + optional back-middle logo + optional back-bottom text. Every slot is optional — pass only the ones you want. Deterministic (NO Gemini) unless `ai_base_prompt` is set. Free (no cap impact) for the deterministic path. WHEN: use for the FIRST turn of a custom-merch DM flow. The customer says 'IIT Bombay hoodie with batch year' or 'Wolf Pack band tee with tour dates' → this one call produces both a front and back mockup in ~4 seconds. For follow-up edits (adjust a logo, tweak text, add a shape) call add_text / place_logo / update_layer on the returned draft_id. REGION MODEL: back has 3 vertical slots — top (upper 40%), middle (middle 30%), bottom (lower 40%). Passing all three results in stacked layout with visible gaps between elements. Front pocket badge is small by default (scale 0.9) — pass pocket_side='right' for the right chest instead of the left. LOGO INPUT: either a slug from `search_logos` (e.g. 'iit-bombay') OR a public image URL (SSRF-allowlist enforced — your own Supabase / crayonz.ai / ChatGPT / Claude uploads are OK). Text inputs are plain strings; pair with `back_top_preset` / `back_bottom_preset` slugs from `list_text_presets` to pick typography. |
| list_layers | List every layer on a draft — logos, text, shapes, imported raster art — with their layer_id, kind, view, region, z-order, scale, and visibility. Feeds the host LLM the state it needs for edit-in-place: 'the back-bottom text is a bit small, let me bump it' → look up the layer_id → update_layer(scale=1.2). Read-only, no cap impact. |
| update_layer | Adjust one layer on a draft without touching the others. Pass at least one of scale / region / color / text / visible. Common patterns: • 'bigger BATCH text' → update_layer(scale=1.3) • 'move the logo to right pocket' → update_layer(region="pocket-right") • 'gold that varsity text' → update_layer(color="#FFD700") • 'typo — say 2028' → update_layer(text="BATCH 2028") • 'hide the back logo' → update_layer(visible=false) Recomposes ONLY the affected view (front or back) so the untouched side stays byte-identical. FREE, no cap impact. |
| remove_layer | Drop one layer from the draft entirely. Everything else stays. The view the removed layer lived on gets recomposed; the other view is untouched. If the removed layer was the only one on its view, that view's mockup goes null and the widget stops rendering that side. FREE, no cap impact. Irreversible — the layer_id is gone once removed. Use `update_layer(visible=false)` to hide instead. |
| reorder_layers | Change a layer's z_index. Lower z_index draws first (bottom of the stack); higher draws later (on top). Use when a text layer is sitting BEHIND a logo it should be in front of, or vice-versa. FREE, no cap impact. |
| color_explorer | Batch-compose an existing draft in N colours (2-8) in one call instead of N round-trips through set_design_placement. Every colour returns permanent, content-addressed URLs for the requested views (front and/or back). Send the whole array to the customer as a carousel: 'here's your design in Black, White, Navy, Maroon, Grey — which do you like?' COLORS accept slugs, display names (any case), or hex — mixed OK. resolveColor normalises everything with a nearest-hex fallback + typo suggestions. PERFORMANCE: mockup composition is deterministic Python PIL work on design-api, ~200ms per view per colour, plus one bucket upload each. 5 colours × 2 views ≈ 2-3 seconds total. Repeat calls on unchanged draft state return the SAME URLs without re-composing (content-addressed dedup). FREE — no cap impact. Pure composition. |
| upload_logo | Persist a customer's own logo (their company logo, band logo, hackathon crew art, personal branded design) into their reusable MCP logo library. Fetches the image from a public URL, rehosts onto Supabase Storage (so ChatGPT / Claude URL expiry doesn't break future references), computes a SHA-256, and returns a user_logo_id + permanent image_url the caller feeds into `compose_layered_design(pocket_logo=<url>)` or `place_logo(logo_slug=<url>)` (both accept an allowlisted URL in place of a catalog slug), or any tool that takes an image URL. IDEMPOTENT: re-uploading the same bytes returns the same row (hash dedup). Passing a new label on an existing hash just renames the existing entry — one logo per unique file per user. SSRF-guarded: only image hosts on the allowlist (Supabase, crayonz.ai, ChatGPT / Claude uploads, googleusercontent, etc) are accepted. FREE — no cap impact. |
| list_my_logos | Return the customer's own uploaded-logo library — every logo they've saved via upload_logo across every past DM session. Feed the returned image_url back into `compose_layered_design`, `place_logo`, or any tool that takes a logo URL. Read-only. Chain: customer says 'use my company logo again' → list_my_logos → pick the right one by label → pass its image_url to compose_layered_design. |
| polish_design | Take a compose_layered_design output (or any existing draft) and run a Gemini aesthetic pass over it. Preserves every word of text + the overall layout; upgrades typography, fills empty zones with graphics, adds atmospheric detail. This is the SECOND stage of the v2 pipeline. Step 1 gets the content and positioning right; step 2 makes it aesthetically shippable. WHEN: user says 'make this more aesthetic', 'add proper math notation', 'add glitch background', 'render the equation as LaTeX', 'elevate the fonts', 'make it match the brand'. Any aesthetic ask that isn't a content change. COST: 1 iteration credit (Gemini image-edit call). SAFETY: non-destructive. Previous version's URLs stay live. A new version is chained from the current one; caller can rollback_to_version at any time. VIEW: 'front' or 'back'. Defaults to the view holding the most content. Only that view is polished; the untouched side stays byte-identical. |
| list_design_versions | FREE, read-only. Returns the full version DAG of a draft as a structured list — each entry carries version_id, parent_version_id, stage ('structural' | 'polished' | 'manual' | 'ai_generated' | 'rollback' | 'import'), view ('front' | 'back' | 'both'), signed 15-min preview URL, and prompt. Also returns the ANCESTRY chain of the current version (walk from current back to genesis via parent_version_id) so the caller can see the linear story of what got the design to where it is now. USE WHEN the user says 'show me the history', 'let me go back to before that polish', 'undo the last change', or before calling rollback_to_version so you can quote a specific version_id. Does NOT consume iteration credits. |
| rollback_to_version | Non-destructive undo. Moves the draft's current_version_id pointer to a specific past version — every URL from every intermediate version stays live in the DAG, so the caller can roll back and forth freely. The mirror columns (current_design_url, current_mockup_url, back_design_url, back_mockup_url) are refreshed to match the target version so the widget + checkout instantly reflect the rolled-back state. Records a NEW version with stage='rollback' chained to the target, so the rollback itself shows up in list_design_versions. FREE — no iteration credit consumed. Use whenever the user says 'go back', 'undo that', 'revert to the version before I polished'. |