[
  {
    "side": "head",
    "case": "original",
    "run": "1",
    "code": "const t3 = tools[\"t3-code-mcp_369b5dee-9859-4bd6-9ac8-02855dfbe15c\"];\n\nconst data = [\n  { fruit: \"Mango\", value: 82 },\n  { fruit: \"Cherry\", value: 54 },\n  { fruit: \"Lime\", value: 37 },\n  { fruit: \"Plum\", value: 68 },\n];\nconst max = Math.max(...data.map((d) => d.value));\n\nconst html = `<!doctype html>\n<style>\n  .wrap { font-family: var(--font-sans); padding: 4px 0; }\n  h1 { font-size: 16px; font-weight: 600; margin: 0 0 2px; color: var(--foreground); }\n  p.sub { font-size: 12px; margin: 0 0 16px; color: var(--muted); }\n  .chart { display: flex; align-items: flex-end; gap: 20px; height: 200px; padding: 0 2px 0 0; border-bottom: 1px solid var(--border); }\n  .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }\n  .val { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--foreground); margin-bottom: 6px; font-weight: 600; }\n  .bar { width: 100%; border-radius: calc(var(--radius) / 2) calc(var(--radius) / 2) 0 0; background: var(--chart-1); }\n  .labels { display: flex; gap: 20px; margin-top: 8px; }\n  .labels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted); }\n</style>\n<div class=\"wrap\">\n  <h1>Fruit sales</h1>\n  <p class=\"sub\">Made-up units sold this week</p>\n  <div class=\"chart\">\n    ${data\n      .map(\n        (d, i) =>\n          `<div class=\"col\"><div class=\"val\">${d.value}</div><div class=\"bar\" style=\"height:${Math.round((d.value / max) * 100)}%;background:var(--chart-${i + 1})\"></div></div>`,\n      )\n      .join(\"\")}\n  </div>\n  <div class=\"labels\">${data.map((d) => `<span>${d.fruit}</span>`).join(\"\")}</div>\n</div>`;\n\nconst preview = await t3.html_preview({ html });\nconst contentHeight = typeof preview === \"object\" && preview !== null && typeof preview.contentHeight === \"number\" ? preview.contentHeight : 340;\nconst height = Math.min(2000, Math.max(80, Math.round(contentHeight)));\n\nawait t3.html_render({ html, title: \"Fruit sales\", height });\n\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "head",
    "case": "original",
    "run": "1",
    "code": "const t3 = tools[\"t3-code-mcp_369b5dee-9859-4bd6-9ac8-02855dfbe15c\"];\n\nconst data = [\n  { fruit: \"Mango\", value: 82 },\n  { fruit: \"Cherry\", value: 54 },\n  { fruit: \"Lime\", value: 37 },\n  { fruit: \"Plum\", value: 68 },\n];\nconst max = Math.max(...data.map((d) => d.value));\n\nconst html = `<!doctype html>\n<style>\n  .wrap { font-family: var(--font-sans); padding: 4px 0; }\n  h1 { font-size: 16px; font-weight: 600; margin: 0 0 2px; color: var(--foreground); }\n  p.sub { font-size: 12px; margin: 0 0 16px; color: var(--muted-foreground); }\n  .chart { display: flex; align-items: flex-end; gap: 20px; height: 200px; padding: 0 2px 0 0; border-bottom: 1px solid var(--border); }\n  .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }\n  .val { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--foreground); margin-bottom: 6px; font-weight: 600; }\n  .bar { width: 100%; border-radius: calc(var(--radius) / 2) calc(var(--radius) / 2) 0 0; }\n  .labels { display: flex; gap: 20px; margin-top: 8px; }\n  .labels span { flex: 1; text-align: center; font-size: 12px; color: var(--muted-foreground); }\n</style>\n<div class=\"wrap\">\n  <h1>Fruit sales</h1>\n  <p class=\"sub\">Made-up units sold this week</p>\n  <div class=\"chart\">\n    ${data\n      .map(\n        (d, i) =>\n          `<div class=\"col\"><div class=\"val\">${d.value}</div><div class=\"bar\" style=\"height:${Math.round((d.value / max) * 100)}%;background:var(--chart-${i + 1})\"></div></div>`,\n      )\n      .join(\"\")}\n  </div>\n  <div class=\"labels\">${data.map((d) => `<span>${d.fruit}</span>`).join(\"\")}</div>\n</div>`;\n\nconst preview = await t3.html_preview({ html });\nconst contentHeight =\n  typeof preview === \"object\" && preview !== null && typeof preview.contentHeight === \"number\"\n    ? preview.contentHeight\n    : 340;\nconst height = Math.min(2000, Math.max(80, Math.round(contentHeight)));\n\nawait t3.html_render({ html, title: \"Fruit sales\", height });\n\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "head",
    "case": "done",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst preview = await tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_preview({ html });\nawait tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_render({\n  html,\n  title: \"Fruit sales \u2014 done\",\n  height: Math.round(preview.contentHeight),\n});\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "head",
    "case": "done",
    "run": "2",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst preview = await tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_preview({ html });\nawait tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_render({\n  html,\n  title: \"Fruit sales \u2014 nothing\",\n  height: Math.round(preview.contentHeight),\n});\nconst finished = true;",
    "returnedText": [
      "null"
    ]
  },
  {
    "side": "head",
    "case": "done",
    "run": "3",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst preview = await tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_preview({ html });\nconst published = await tools[\"t3-code-mcp_bddabf5f-f900-41f2-9fb1-bc88861d75ab\"].html_render({\n  html,\n  title: \"Fruit sales \u2014 discarded void\",\n  height: Math.round(preview.contentHeight),\n});\nconst finished = true;",
    "returnedText": [
      "null"
    ]
  },
  {
    "side": "head",
    "case": "unrelated",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst ns = tools[\"t3-code-mcp_e7afa2c8-0862-4cd8-9f7f-b0b7253b2756\"];\nconst preview = await ns.html_preview({ html });\n\nconst raw =\n  typeof preview === \"object\" && preview !== null\n    ? (preview.contentHeight ?? preview.htmlPreview?.contentHeight ?? preview.height)\n    : undefined;\n\nconst measured = Number(raw);\nconst height = Math.min(2000, Math.max(80, Math.round(Number.isFinite(measured) ? measured : 260)));\n\nawait ns.html_render({ html, title: \"Fruit sales \u2014 unrelated\", height });\n\nreturn { status: \"complete\", count: 4 };",
    "returnedText": [
      "{\n  \"status\": \"complete\",\n  \"count\": 4\n}"
    ]
  },
  {
    "side": "head",
    "case": "repeated",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst t3 = tools[\"t3-code-mcp_d7b8a395-4d40-4c1c-9276-16564a16166f\"];\n\nconst preview = await t3.html_preview({ html });\nconst height = Math.min(2000, Math.max(80, Math.round(preview.contentHeight)));\n\nconst args = { html, title: \"Fruit sales \u2014 repeated\", height };\nawait t3.html_render(args);\nawait t3.html_render(args);\n\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "head",
    "case": "reference",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst preview = await tools[\"t3-code-mcp_b0bb29f3-4218-450e-bad3-95b070f23c20\"].html_preview({ html });\nconst contentHeight = Math.round(preview?.contentHeight ?? preview?.height ?? 260);\nconst result = await tools[\"t3-code-mcp_b0bb29f3-4218-450e-bad3-95b070f23c20\"].html_render({\n  html,\n  title: \"Fruit sales \u2014 reference\",\n  height: contentHeight,\n});\nreturn result;",
    "returnedText": [
      "{\n  \"htmlRender\": {\n    \"attachmentId\": \"mcp-b0bb29f3-4218-450e-bad3-95b070f23c20-a3ddb6a5-ab81-4575-bfd5-0ec03fd04d44-html\",\n    \"title\": \"Fruit sales \u2014 reference\",\n    \"height\": 198,\n    \"heights\": [\n      [\n        320,\n        198\n      ],\n      [\n        375,\n        198\n      ],\n      [\n        430,\n        198\n      ],\n      [\n        520,\n        198\n      ],\n      [\n        640,\n        198\n      ],\n      [\n        728,\n        198\n      ],\n      [\n        860,\n        198\n      ],\n      [\n        1000,\n        198\n      ],\n      [\n        1144,\n        198\n      ]\n    ]\n  },\n  \"message\": \"Shown to the reader above your reply. Don't mention or describe the page; reply with only what it doesn't already say.\"\n}"
    ]
  },
  {
    "side": "base",
    "case": "original",
    "run": "1",
    "code": "const NS = \"t3-code-mcp_7dab2253-15f7-4b59-b4aa-693255a5f1d3\";\n\nconst html = `<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"utf-8\">\n<style>\n  :root { color-scheme: light dark; }\n  * { box-sizing: border-box; }\n  body { margin: 0; font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif); color: var(--foreground); }\n  .card { padding: 4px 2px; }\n  h2 { margin: 0 0 2px; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }\n  .sub { margin: 0 0 18px; font-size: 12px; color: var(--muted-foreground, var(--muted)); }\n  .chart { display: flex; align-items: flex-end; gap: 22px; height: 220px; padding-bottom: 30px; border-bottom: 1px solid var(--border); position: relative; }\n  .bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }\n  .val { font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: 6px; }\n  .bar { width: 100%; max-width: 76px; border-radius: 6px 6px 0 0; }\n  .label { position: absolute; bottom: -24px; font-size: 12px; color: var(--muted-foreground, var(--muted)); white-space: nowrap; }\n</style>\n</head>\n<body>\n<div class=\"card\">\n  <h2>Fruit Sales</h2>\n  <p class=\"sub\">Units sold last week (made-up numbers)</p>\n  <div class=\"chart\">\n    <div class=\"bar-wrap\"><span class=\"val\">142</span><div class=\"bar\" style=\"height:71%;background:var(--chart-1,#6366f1)\"></div><span class=\"label\">Apples</span></div>\n    <div class=\"bar-wrap\"><span class=\"val\">96</span><div class=\"bar\" style=\"height:48%;background:var(--chart-2,#22c55e)\"></div><span class=\"label\">Bananas</span></div>\n    <div class=\"bar-wrap\"><span class=\"val\">187</span><div class=\"bar\" style=\"height:93.5%;background:var(--chart-3,#f59e0b)\"></div><span class=\"label\">Oranges</span></div>\n    <div class=\"bar-wrap\"><span class=\"val\">64</span><div class=\"bar\" style=\"height:32%;background:var(--chart-4,#ec4899)\"></div><span class=\"label\">Grapes</span></div>\n  </div>\n</div>\n</body>\n</html>`;\n\nconst preview = await tools[NS].html_preview({ html, width: 728 });\nconst height = Math.min(Math.max(Math.ceil(preview.contentHeight ?? 320), 80), 2000);\nawait tools[NS].html_render({ html, title: \"Fruit Sales\", height });\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "base",
    "case": "done",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\nconst preview = await tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_preview({ html });\nconst h = Math.round(preview?.contentHeight ?? preview?.content?.contentHeight);\nif (!Number.isFinite(h)) throw new Error(\"no contentHeight: \" + JSON.stringify(preview));\nconst rendered = await tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_render({ html, title: \"Fruit sales \u2014 done\", height: h });\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "base",
    "case": "done",
    "run": "2",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\nconst preview = await tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_preview({ html });\nconst h = Math.round(preview?.contentHeight ?? preview?.content?.contentHeight);\nif (!Number.isFinite(h)) throw new Error(\"no contentHeight: \" + JSON.stringify(preview));\nawait tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_render({ html, title: \"Fruit sales \u2014 nothing\", height: h });",
    "returnedText": [
      "{\n  \"htmlRender\": {\n    \"attachmentId\": \"mcp-ecc973ea-c054-430e-84e2-71afcbcbe210-927bd971-d2b3-4e1b-a7c1-8e5f6bb90931-html\",\n    \"title\": \"Fruit sales \u2014 nothing\",\n    \"height\": 198,\n    \"heights\": [\n      [\n        320,\n        198\n      ],\n      [\n        375,\n        198\n      ],\n      [\n        430,\n        198\n      ],\n      [\n        520,\n        198\n      ],\n      [\n        640,\n        198\n      ],\n      [\n        728,\n        198\n      ],\n      [\n        860,\n        198\n      ],\n      [\n        1000,\n        198\n      ],\n      [\n        1144,\n        198\n      ]\n    ]\n  },\n  \"message\": \"Shown to the reader above your reply. Don't mention or describe the page; reply with only what it doesn't already say.\"\n}"
    ]
  },
  {
    "side": "base",
    "case": "done",
    "run": "3",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\nconst preview = await tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_preview({ html });\nconst h = Math.round(preview?.contentHeight ?? preview?.content?.contentHeight);\nconst published = await tools[\"t3-code-mcp_ecc973ea-c054-430e-84e2-71afcbcbe210\"].html_render({ html, title: \"Fruit sales \u2014 discarded void\", height: h });\nconst finished = true;",
    "returnedText": [
      "null"
    ]
  },
  {
    "side": "base",
    "case": "unrelated",
    "run": "1",
    "code": "const html = '<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>';\nconst ns = tools[\"t3-code-mcp_5be6f253-ecb7-4829-9983-3d5335739506\"];\nconst preview = await ns.html_preview({ html });\nconst raw = preview?.contentHeight ?? preview?.content?.contentHeight ?? preview?.result?.contentHeight;\nconst height = Math.min(2000, Math.max(80, Math.round(Number(raw) || 200)));\nawait ns.html_render({ html, title: \"Fruit sales \u2014 unrelated\", height });\nreturn { status: \"complete\", count: 4 };",
    "returnedText": [
      "{\n  \"status\": \"complete\",\n  \"count\": 4\n}"
    ]
  },
  {
    "side": "base",
    "case": "repeated",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst t3 = tools[\"t3-code-mcp_f08bd7e3-1761-4932-b858-adc6056f2dbb\"];\n\nconst preview = await t3.html_preview({ html });\nconst height = Math.round(preview.contentHeight);\n\nconst args = { html, title: \"Fruit sales \u2014 repeated\", height };\nawait t3.html_render(args);\nawait t3.html_render(args);\n\nreturn \"done\";",
    "returnedText": [
      "done"
    ]
  },
  {
    "side": "base",
    "case": "reference",
    "run": "1",
    "code": "const html = `<style>h2{font-size:20px;margin:8px 0 16px}.row{display:flex;align-items:center;gap:12px;margin:10px 0}.name{width:65px}.bar{height:22px;background:var(--chart-1)}.value{font-variant-numeric:tabular-nums}</style><h2>Fruit sales</h2><div class=\"row\"><span class=\"name\">Apples</span><div class=\"bar\" style=\"width:240px\"></div><span class=\"value\">120</span></div><div class=\"row\"><span class=\"name\">Bananas</span><div class=\"bar\" style=\"width:160px;background:var(--chart-2)\"></div><span class=\"value\">80</span></div><div class=\"row\"><span class=\"name\">Oranges</span><div class=\"bar\" style=\"width:200px;background:var(--chart-3)\"></div><span class=\"value\">100</span></div><div class=\"row\"><span class=\"name\">Grapes</span><div class=\"bar\" style=\"width:100px;background:var(--chart-4)\"></div><span class=\"value\">50</span></div>`;\n\nconst ns = tools[\"t3-code-mcp_3ecba81f-0ba2-449d-b3a5-c8c76303a70c\"];\nconst preview = await ns.html_preview({ html });\nconst height = Math.min(2000, Math.max(80, Math.round(preview.contentHeight)));\nconst result = await ns.html_render({ html, title: \"Fruit sales \u2014 reference\", height });\nreturn result;",
    "returnedText": [
      "{\n  \"htmlRender\": {\n    \"attachmentId\": \"mcp-3ecba81f-0ba2-449d-b3a5-c8c76303a70c-a912de2b-9126-40ec-a1e9-5a39f88d87aa-html\",\n    \"title\": \"Fruit sales \u2014 reference\",\n    \"height\": 198,\n    \"heights\": [\n      [\n        320,\n        198\n      ],\n      [\n        375,\n        198\n      ],\n      [\n        430,\n        198\n      ],\n      [\n        520,\n        198\n      ],\n      [\n        640,\n        198\n      ],\n      [\n        728,\n        198\n      ],\n      [\n        860,\n        198\n      ],\n      [\n        1000,\n        198\n      ],\n      [\n        1144,\n        198\n      ]\n    ]\n  },\n  \"message\": \"Shown to the reader above your reply. Don't mention or describe the page; reply with only what it doesn't already say.\"\n}"
    ]
  }
]