Andrew Fribush

fig. 2.23.2: the description belongs to the node it was called on; the converter unwraps ZodOptional without reading it, and the review’s fix copies it onto the inner result

fig. 2.23.2 · the description belongs to the node it was called on; the converter unwraps ZodOptional without reading it, and the review’s fix copies it onto the inner result.
THE CONVERTER READS ONLY THE INNER NODEBOX: A ZOD NODE. ARROW: THE CONVERTER'S PATH. ACCENT: THE DESCRIPTION TEXT.CONVERTER:AS SHIPPEDWITH THE REVIEW'S FIXz.string().optional().describe("ISO date")DESCRIPTION ON THE WRAPPERZodOptionaldescription: "ISO date"NEVER READconvert(innerType)ZodStringdescription: nonewithDesc(this node)SERVED: THE DESCRIPTION IS GONE{"type":"string"}z.string().describe("ISO date").optional()DESCRIPTION ON THE STRING INSIDEZodOptionaldescription: noneconvert(innerType)ZodStringdescription: "ISO date"withDesc(this node)SERVED: THE DESCRIPTION ARRIVES{"type":"string","description":"ISO date"}

source: lifemain src/zod-to-json.ts (ZodOptional branch, withDesc); fix from docs/review-2026-09-01-tools-bot.md lines 67-69; Zod 3 API: optional, unwrap, describe · describeTrees.data.ts

View in context: Your MCP tool descriptions are probably being thrown away → · All figures

Andrew Fribush, software and computer engineer in Austin. I build consequential systems where software meets institutions: finance, healthcare, commerce, government data, and the mechanisms that govern AI agents. Taking new engagements: hello@andrewfribush.com.