[{"data":1,"prerenderedAt":702},["ShallowReactive",2],{"i-simple-icons:github":3,"i-lucide:arrow-right":8,"doc-\u002Fdocs\u002Felements\u002Ftoast":10,"docs-sidebar":633,"i-lucide:file-text":694,"i-lucide:arrow-left":696,"i-lucide:bell":698,"i-lucide:arrow-up-right":700},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",{"id":11,"title":12,"body":13,"description":622,"extension":623,"group":624,"groupOrder":154,"meta":625,"navTitle":626,"navigation":627,"order":628,"path":629,"seo":630,"stem":631,"__hash__":632},"docs\u002Fdocs\u002Felements\u002Ftoast.md","\u003Cwmcp-toast>",{"type":14,"value":15,"toc":616},"minimark",[16,23,47,63,107,189,192,197,226,326,330,468,472,479,510,517,521,528,612],[17,18,20],"h1",{"id":19},"wmcp-toast",[21,22,12],"code",{},[24,25,26,27,31,32,35,36,39,40,43,44,46],"p",{},"A notification region — and the one component whose agent surface is ",[28,29,30],"strong",{},"perceiving",", not actuating. Page code throws toasts the way it always has, and they announce to screen readers via an ",[21,33,34],{},"aria-live"," region. When ",[21,37,38],{},"expose"," is set, those very same notifications become readable by an agent through a ",[21,41,42],{},"read_\u003Cname>"," tool: the machine-readable twin of the ",[21,45,34],{}," announcement.",[24,48,49,50,54,55,58,59,62],{},"That's the right shape because the agent's job isn't to ",[51,52,53],"em",{},"post"," toasts — it has its own channel for that — it's to ",[51,56,57],{},"notice"," them. A toast is often the only signal of an outcome (\"Payment declined\", an async \"Export ready\"), so an agent acting on the user's behalf reads the toasts rather than creating them. It extends ",[21,60,61],{},"WmcpExposable"," directly, not the action base, because the tool reports state instead of triggering anything.",[64,65,70],"pre",{"className":66,"code":67,"language":68,"meta":69,"style":69},"language-html shiki shiki-themes github-light-default ayu-dark","\u003Cwmcp-toast name=\"notifications\" expose>\u003C\u002Fwmcp-toast>\n","html","",[21,71,72],{"__ignoreMap":69},[73,74,77,81,84,88,92,96,99,102,104],"span",{"class":75,"line":76},"line",1,[73,78,80],{"class":79},"sqV5G","\u003C",[73,82,19],{"class":83},"sfBZl",[73,85,87],{"class":86},"sI192"," name",[73,89,91],{"class":90},"siQKT","=",[73,93,95],{"class":94},"sxLuP","\"notifications\"",[73,97,98],{"class":86}," expose",[73,100,101],{"class":79},">\u003C\u002F",[73,103,19],{"class":83},[73,105,106],{"class":79},">\n",[64,108,112],{"className":109,"code":110,"language":111,"meta":69,"style":69},"language-ts shiki shiki-themes github-light-default ayu-dark","\u002F\u002F Page code throws toasts as usual:\ndocument.querySelector('wmcp-toast').show({\n  message: 'Payment received',\n  variant: 'success',\n});\n","ts",[21,113,114,120,152,167,180],{"__ignoreMap":69},[73,115,116],{"class":75,"line":76},[73,117,119],{"class":118},"s5O_a","\u002F\u002F Page code throws toasts as usual:\n",[73,121,123,127,131,135,138,141,144,146,149],{"class":75,"line":122},2,[73,124,126],{"class":125},"sBz_o","document",[73,128,130],{"class":129},"s0eYM",".",[73,132,134],{"class":133},"s2DMw","querySelector",[73,136,137],{"class":125},"(",[73,139,140],{"class":94},"'wmcp-toast'",[73,142,143],{"class":125},")",[73,145,130],{"class":129},[73,147,148],{"class":133},"show",[73,150,151],{"class":125},"({\n",[73,153,155,158,161,164],{"class":75,"line":154},3,[73,156,157],{"class":125},"  message",[73,159,160],{"class":90},":",[73,162,163],{"class":94}," 'Payment received'",[73,165,166],{"class":90},",\n",[73,168,170,173,175,178],{"class":75,"line":169},4,[73,171,172],{"class":125},"  variant",[73,174,160],{"class":90},[73,176,177],{"class":94}," 'success'",[73,179,166],{"class":90},[73,181,183,186],{"class":75,"line":182},5,[73,184,185],{"class":125},"})",[73,187,188],{"class":90},";\n",[190,191],"toast-demo",{},[193,194,196],"h2",{"id":195},"the-primitive","The primitive",[24,198,199,202,203,206,207,210,211,213,214,217,218,221,222,225],{},[21,200,201],{},"show(options)"," returns an id; ",[21,204,205],{},"dismiss(id)"," and ",[21,208,209],{},"clear()"," remove toasts. Each is an ",[21,212,34],{}," child (",[21,215,216],{},"role=\"status\"",", or ",[21,219,220],{},"role=\"alert\""," for ",[21,223,224],{},"error","), so screen readers announce it.",[227,228,229,248],"table",{},[230,231,232],"thead",{},[233,234,235,242,245],"tr",{},[236,237,238,241],"th",{},[21,239,240],{},"show()"," option",[236,243,244],{},"Type",[236,246,247],{},"Description",[249,250,251,267,281,307],"tbody",{},[233,252,253,259,264],{},[254,255,256],"td",{},[21,257,258],{},"message",[254,260,261],{},[21,262,263],{},"string",[254,265,266],{},"The notification text (required).",[233,268,269,274,278],{},[254,270,271],{},[21,272,273],{},"title",[254,275,276],{},[21,277,263],{},[254,279,280],{},"Optional bold heading above the message.",[233,282,283,288,292],{},[254,284,285],{},[21,286,287],{},"variant",[254,289,290],{},[21,291,263],{},[254,293,294,297,298,297,301,217,304,306],{},[21,295,296],{},"info",", ",[21,299,300],{},"success",[21,302,303],{},"warning",[21,305,224],{}," (styling + the read summary).",[233,308,309,314,319],{},[254,310,311],{},[21,312,313],{},"duration",[254,315,316],{},[21,317,318],{},"number",[254,320,321,322,325],{},"Auto-dismiss after this many ms; ",[21,323,324],{},"0"," keeps it until dismissed.",[193,327,329],{"id":328},"element-attributes","Element attributes",[227,331,332,346],{},[230,333,334],{},[233,335,336,339,341,344],{},[236,337,338],{},"Attribute",[236,340,244],{},[236,342,343],{},"Default",[236,345,247],{},[249,347,348,379,400,423,448],{},[233,349,350,355,359,364],{},[254,351,352],{},[21,353,354],{},"placement",[254,356,357],{},[21,358,263],{},[254,360,361],{},[21,362,363],{},"bottom-right",[254,365,366,367,297,369,297,372,297,375,378],{},"Corner the toasts stack in (",[21,368,363],{},[21,370,371],{},"bottom-left",[21,373,374],{},"top-right",[21,376,377],{},"top-left",").",[233,380,381,385,389,394],{},[254,382,383],{},[21,384,313],{},[254,386,387],{},[21,388,318],{},[254,390,391],{},[21,392,393],{},"5000",[254,395,396,397,399],{},"Default auto-dismiss for ",[21,398,240],{}," calls without their own.",[233,401,402,407,411,414],{},[254,403,404],{},[21,405,406],{},"name",[254,408,409],{},[21,410,263],{},[254,412,413],{},"—",[254,415,416,417,419,420,378],{},"Identifier for the default tool name (",[21,418,42],{},", else ",[21,421,422],{},"read_notifications",[233,424,425,429,434,439],{},[254,426,427],{},[21,428,38],{},[254,430,431],{},[21,432,433],{},"boolean",[254,435,436],{},[21,437,438],{},"false",[254,440,441,442,447],{},"Register the ",[443,444,446],"a",{"href":445},"\u002Fdocs\u002Fwebmcp","WebMCP"," read tool.",[233,449,450,459,463,465],{},[254,451,452,455,456],{},[21,453,454],{},"tool-name"," \u002F ",[21,457,458],{},"tool-description",[254,460,461],{},[21,462,263],{},[254,464,413],{},[254,466,467],{},"Override the generated tool name \u002F description.",[193,469,471],{"id":470},"tool-shape","Tool shape",[24,473,474,475,478],{},"A no-argument ",[28,476,477],{},"read"," tool:",[64,480,484],{"className":481,"code":482,"language":483,"meta":69,"style":69},"language-json shiki shiki-themes github-light-default ayu-dark","{ \"type\": \"object\", \"properties\": {} }\n","json",[21,485,486],{"__ignoreMap":69},[73,487,488,491,494,496,499,502,505,507],{"class":75,"line":76},[73,489,490],{"class":125},"{ ",[73,492,493],{"class":83},"\"type\"",[73,495,160],{"class":90},[73,497,498],{"class":94}," \"object\"",[73,500,501],{"class":90},",",[73,503,504],{"class":83}," \"properties\"",[73,506,160],{"class":90},[73,508,509],{"class":125}," {} }\n",[24,511,512,513,516],{},"Calling it returns the notifications currently shown — and, if none are, the ones that appeared in the last 30 seconds — so an agent that checks ",[51,514,515],{},"after"," an async toast has auto-dismissed still learns what happened.",[193,518,520],{"id":519},"theming","Theming",[24,522,523,524,527],{},"Themed through ",[21,525,526],{},"--toast-*"," custom properties, including per-variant accent colors:",[64,529,533],{"className":530,"code":531,"language":532,"meta":69,"style":69},"language-css shiki shiki-themes github-light-default ayu-dark",":root {\n  --toast-bg: var(--popover);\n  --toast-accent-success: oklch(0.627 0.13 160);\n  --toast-inset: 1.5rem;\n}\n","css",[21,534,535,544,565,591,607],{"__ignoreMap":69},[73,536,537,541],{"class":75,"line":76},[73,538,540],{"class":539},"sybcr",":root",[73,542,543],{"class":125}," {\n",[73,545,546,550,552,556,558,561,563],{"class":75,"line":122},[73,547,549],{"class":548},"sCHdd","  --toast-bg",[73,551,160],{"class":90},[73,553,555],{"class":554},"sAJRi"," var",[73,557,137],{"class":125},[73,559,560],{"class":548},"--popover",[73,562,143],{"class":125},[73,564,188],{"class":90},[73,566,567,570,572,575,577,581,584,587,589],{"class":75,"line":154},[73,568,569],{"class":548},"  --toast-accent-success",[73,571,160],{"class":90},[73,573,574],{"class":554}," oklch",[73,576,137],{"class":125},[73,578,580],{"class":579},"sQY3k","0.627",[73,582,583],{"class":579}," 0.13",[73,585,586],{"class":579}," 160",[73,588,143],{"class":125},[73,590,188],{"class":90},[73,592,593,596,598,601,605],{"class":75,"line":169},[73,594,595],{"class":548},"  --toast-inset",[73,597,160],{"class":90},[73,599,600],{"class":579}," 1.5",[73,602,604],{"class":603},"s7jPt","rem",[73,606,188],{"class":90},[73,608,609],{"class":75,"line":182},[73,610,611],{"class":125},"}\n",[613,614,615],"style",{},"html pre.shiki code .sqV5G, html code.shiki .sqV5G{--shiki-default:#1F2328;--shiki-dark:#39BAE680}html pre.shiki code .sfBZl, html code.shiki .sfBZl{--shiki-default:#116329;--shiki-dark:#39BAE6}html pre.shiki code .sI192, html code.shiki .sI192{--shiki-default:#0550AE;--shiki-dark:#FFB454}html pre.shiki code .siQKT, html code.shiki .siQKT{--shiki-default:#1F2328;--shiki-dark:#BFBDB6B3}html pre.shiki code .sxLuP, html code.shiki .sxLuP{--shiki-default:#0A3069;--shiki-dark:#AAD94C}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s5O_a, html code.shiki .s5O_a{--shiki-default:#6E7781;--shiki-default-font-style:inherit;--shiki-dark:#5A6673;--shiki-dark-font-style:italic}html pre.shiki code .sBz_o, html code.shiki .sBz_o{--shiki-default:#1F2328;--shiki-dark:#BFBDB6}html pre.shiki code .s0eYM, html code.shiki .s0eYM{--shiki-default:#1F2328;--shiki-dark:#F29668}html pre.shiki code .s2DMw, html code.shiki .s2DMw{--shiki-default:#8250DF;--shiki-dark:#FFB454}html pre.shiki code .sybcr, html code.shiki .sybcr{--shiki-default:#0550AE;--shiki-dark:#95E6CB}html pre.shiki code .sCHdd, html code.shiki .sCHdd{--shiki-default:#953800;--shiki-dark:#BFBDB6}html pre.shiki code .sAJRi, html code.shiki .sAJRi{--shiki-default:#0550AE;--shiki-dark:#F07178}html pre.shiki code .sQY3k, html code.shiki .sQY3k{--shiki-default:#0550AE;--shiki-dark:#D2A6FF}html pre.shiki code .s7jPt, html code.shiki .s7jPt{--shiki-default:#CF222E;--shiki-dark:#FF8F40}",{"title":69,"searchDepth":122,"depth":122,"links":617},[618,619,620,621],{"id":195,"depth":122,"text":196},{"id":328,"depth":122,"text":329},{"id":470,"depth":122,"text":471},{"id":519,"depth":122,"text":520},"A notification region whose agent surface is perceiving, not actuating — the agent reads the toasts the page throws.","md","Interaction",{},"Toast",true,6,"\u002Fdocs\u002Felements\u002Ftoast",{"title":12,"description":622},"docs\u002Felements\u002Ftoast","_qtuL9o3kRSam8OuPZkQPAcbb8T8mxECennLdfA9yVA",[634,638,643,647,651,655,659,663,667,671,675,676,680,683,686,689,692],{"path":635,"title":636,"navTitle":637,"group":624,"order":76,"groupOrder":154},"\u002Fdocs\u002Felements\u002Fbutton","\u003Cwmcp-button>","Button",{"path":639,"title":640,"navTitle":641,"group":642,"order":169,"groupOrder":122},"\u002Fdocs\u002Felements\u002Fcheckbox","\u003Cwmcp-checkbox>","Checkbox","Elements",{"path":644,"title":645,"navTitle":646,"group":624,"order":122,"groupOrder":154},"\u002Fdocs\u002Felements\u002Fdialog","\u003Cwmcp-dialog>","Dialog",{"path":648,"title":649,"navTitle":650,"group":642,"order":76,"groupOrder":122},"\u002Fdocs\u002Felements\u002Finput","\u003Cwmcp-input>","Input",{"path":652,"title":653,"navTitle":654,"group":624,"order":154,"groupOrder":154},"\u002Fdocs\u002Felements\u002Fmenu","\u003Cwmcp-menu>","Menu",{"path":656,"title":657,"navTitle":658,"group":624,"order":182,"groupOrder":154},"\u002Fdocs\u002Felements\u002Fpopover","\u003Cwmcp-popover>","Popover",{"path":660,"title":661,"navTitle":662,"group":642,"order":182,"groupOrder":122},"\u002Fdocs\u002Felements\u002Fradio","\u003Cwmcp-radio-group>","Radio group",{"path":664,"title":665,"navTitle":666,"group":642,"order":154,"groupOrder":122},"\u002Fdocs\u002Felements\u002Fselect","\u003Cwmcp-select>","Select",{"path":668,"title":669,"navTitle":670,"group":624,"order":169,"groupOrder":154},"\u002Fdocs\u002Felements\u002Ftabs","\u003Cwmcp-tabs>","Tabs",{"path":672,"title":673,"navTitle":674,"group":642,"order":122,"groupOrder":122},"\u002Fdocs\u002Felements\u002Ftextarea","\u003Cwmcp-textarea>","Textarea",{"path":629,"title":12,"navTitle":626,"group":624,"order":628,"groupOrder":154},{"path":677,"title":678,"navTitle":678,"group":679,"order":628,"groupOrder":76},"\u002Fdocs\u002Fframeworks","React & Vue","Getting started",{"path":681,"title":682,"navTitle":682,"group":679,"order":76,"groupOrder":76},"\u002Fdocs","Introduction",{"path":684,"title":685,"navTitle":685,"group":679,"order":122,"groupOrder":76},"\u002Fdocs\u002Finstallation","Installation",{"path":687,"title":688,"navTitle":688,"group":679,"order":182,"groupOrder":76},"\u002Fdocs\u002Ftesting","Testing",{"path":690,"title":691,"navTitle":691,"group":679,"order":154,"groupOrder":76},"\u002Fdocs\u002Fvalidation","Validation",{"path":445,"title":693,"navTitle":693,"group":679,"order":169,"groupOrder":76},"WebMCP exposure",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":695},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z\"\u002F>\u003Cpath d=\"M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":697},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":699},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M10.268 21a2 2 0 0 0 3.464 0m-10.47-5.674A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":701},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"\u002F>",1782971919412]