[{"data":1,"prerenderedAt":1086},["ShallowReactive",2],{"navigation_docs":3,"-handlers-organization":287,"-handlers-organization-surround":1081},[4,40,70,99,122,156,189,258],{"title":5,"path":6,"stem":7,"children":8,"page":39},"Getting Started","\u002Fgetting-started","1.getting-started",[9,14,19,24,29,34],{"title":10,"path":11,"stem":12,"icon":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-book-open",{"title":15,"path":16,"stem":17,"icon":18},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation","i-lucide-download",{"title":20,"path":21,"stem":22,"icon":23},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F3.configuration","i-lucide-settings",{"title":25,"path":26,"stem":27,"icon":28},"Inspector","\u002Fgetting-started\u002Finspector","1.getting-started\u002F4.inspector","i-lucide-circuit-board",{"title":30,"path":31,"stem":32,"icon":33},"Connection","\u002Fgetting-started\u002Fconnection","1.getting-started\u002F5.connection","i-lucide-plug",{"title":35,"path":36,"stem":37,"icon":38},"Agent Skills","\u002Fgetting-started\u002Fagent-skills","1.getting-started\u002F6.agent-skills","i-lucide-sparkles",false,{"title":41,"path":42,"stem":43,"children":44,"page":39},"Tools","\u002Ftools","2.tools",[45,50,55,60,65],{"title":46,"path":47,"stem":48,"icon":49},"Overview","\u002Ftools\u002Foverview","2.tools\u002F0.overview","i-lucide-wrench",{"title":51,"path":52,"stem":53,"icon":54},"Schema, handler & returns","\u002Ftools\u002Fschema-handler","2.tools\u002F1.schema-handler","i-lucide-braces",{"title":56,"path":57,"stem":58,"icon":59},"Annotations & input examples","\u002Ftools\u002Fannotations","2.tools\u002F2.annotations","i-lucide-badge-info",{"title":61,"path":62,"stem":63,"icon":64},"Errors & caching","\u002Ftools\u002Ferrors-caching","2.tools\u002F3.errors-caching","i-lucide-shield",{"title":66,"path":67,"stem":68,"icon":69},"Groups, files & dynamic registration","\u002Ftools\u002Fgroups-organization","2.tools\u002F4.groups-organization","i-lucide-tags",{"title":71,"path":72,"stem":73,"children":74,"page":39},"Resources","\u002Fresources","3.resources",[75,79,84,89,94],{"title":46,"path":76,"stem":77,"icon":78},"\u002Fresources\u002Foverview","3.resources\u002F0.overview","i-lucide-package",{"title":80,"path":81,"stem":82,"icon":83},"Static resources & structure","\u002Fresources\u002Fstatic-and-structure","3.resources\u002F1.static-and-structure","i-lucide-file-stack",{"title":85,"path":86,"stem":87,"icon":88},"Templates & handlers","\u002Fresources\u002Ftemplates-and-handlers","3.resources\u002F2.templates-and-handlers","i-lucide-git-branch",{"title":90,"path":91,"stem":92,"icon":93},"Metadata, content & errors","\u002Fresources\u002Fcontent-metadata-errors","3.resources\u002F3.content-metadata-errors","i-lucide-layers",{"title":95,"path":96,"stem":97,"icon":98},"Groups & organization","\u002Fresources\u002Forganization","3.resources\u002F4.organization","i-lucide-folder-tree",{"title":100,"path":101,"stem":102,"children":103,"page":39},"Prompts","\u002Fprompts","4.prompts",[104,108,113,117],{"title":46,"path":105,"stem":106,"icon":107},"\u002Fprompts\u002Foverview","4.prompts\u002F0.overview","i-lucide-message-square",{"title":109,"path":110,"stem":111,"icon":112},"Authoring & structure","\u002Fprompts\u002Fauthoring","4.prompts\u002F1.authoring","i-lucide-pen-line",{"title":114,"path":115,"stem":116,"icon":93},"Input, handler & messages","\u002Fprompts\u002Finput-handler-messages","4.prompts\u002F2.input-handler-messages",{"title":118,"path":119,"stem":120,"icon":121},"Patterns & advanced","\u002Fprompts\u002Fpatterns-advanced","4.prompts\u002F3.patterns-advanced","i-lucide-line-chart",{"title":123,"path":124,"stem":125,"children":126,"page":39},"Handlers","\u002Fhandlers","5.handlers",[127,131,136,141,146,151],{"title":46,"path":128,"stem":129,"icon":130},"\u002Fhandlers\u002Foverview","5.handlers\u002F0.overview","i-lucide-server",{"title":132,"path":133,"stem":134,"icon":135},"Default & custom handlers","\u002Fhandlers\u002Fdefault-and-custom","5.handlers\u002F1.default-and-custom","i-lucide-toggle-left",{"title":137,"path":138,"stem":139,"icon":140},"Structure & options","\u002Fhandlers\u002Fstructure-and-options","5.handlers\u002F2.structure-and-options","i-lucide-sliders-horizontal",{"title":142,"path":143,"stem":144,"icon":145},"Examples & routing","\u002Fhandlers\u002Fexamples-routing","5.handlers\u002F3.examples-routing","i-lucide-route",{"title":147,"path":148,"stem":149,"icon":150},"Sharing & practices","\u002Fhandlers\u002Fsharing-practices","5.handlers\u002F4.sharing-practices","i-lucide-share-2",{"title":152,"path":153,"stem":154,"icon":155},"Multi-handler organization","\u002Fhandlers\u002Forganization","5.handlers\u002F5.organization","i-lucide-network",{"title":157,"path":158,"stem":159,"children":160,"page":39},"Apps","\u002Fapps","6.apps",[161,165,170,175,179,184],{"title":46,"path":162,"stem":163,"icon":164},"\u002Fapps\u002Foverview","6.apps\u002F0.overview","i-lucide-app-window",{"title":166,"path":167,"stem":168,"icon":169},"Authoring & defineMcpApp","\u002Fapps\u002Fauthoring","6.apps\u002F1.authoring","i-lucide-code-2",{"title":171,"path":172,"stem":173,"icon":174},"useMcpApp() bridge","\u002Fapps\u002Fuse-mcp-app","6.apps\u002F2.use-mcp-app","i-lucide-message-circle",{"title":176,"path":177,"stem":178,"icon":64},"CSP & build pipeline","\u002Fapps\u002Fcsp-and-wiring","6.apps\u002F3.csp-and-wiring",{"title":180,"path":181,"stem":182,"icon":183},"Testing & publishing","\u002Fapps\u002Ftesting-publishing","6.apps\u002F4.testing-publishing","i-lucide-rocket",{"title":185,"path":186,"stem":187,"icon":188},"Patterns & limits","\u002Fapps\u002Fpatterns-reference","6.apps\u002F5.patterns-reference","i-lucide-book-marked",{"title":190,"path":191,"stem":192,"children":193,"page":39},"Advanced Topics","\u002Fadvanced","7.advanced",[194,199,204,209,214,219,223,228,233,238,243,248,253],{"title":195,"path":196,"stem":197,"icon":198},"Custom Paths","\u002Fadvanced\u002Fcustom-paths","7.advanced\u002F1.custom-paths","i-lucide-folder",{"title":200,"path":201,"stem":202,"icon":203},"Logging","\u002Fadvanced\u002Flogging","7.advanced\u002F10.logging","i-lucide-scroll-text",{"title":205,"path":206,"stem":207,"icon":208},"MCP Apps Internals","\u002Fadvanced\u002Fmcp-apps-internals","7.advanced\u002F11.mcp-apps-internals","i-lucide-cog",{"title":210,"path":211,"stem":212,"icon":213},"Listing Definitions","\u002Fadvanced\u002Flisting-definitions","7.advanced\u002F12.listing-definitions","i-lucide-list",{"title":215,"path":216,"stem":217,"icon":218},"llms.txt discovery","\u002Fadvanced\u002Fllms-txt","7.advanced\u002F13.llms-txt","i-lucide-file-text",{"title":220,"path":221,"stem":222,"icon":64},"Middleware","\u002Fadvanced\u002Fmiddleware","7.advanced\u002F2.middleware",{"title":224,"path":225,"stem":226,"icon":227},"TypeScript","\u002Fadvanced\u002Ftypescript","7.advanced\u002F3.typescript","i-lucide-type",{"title":229,"path":230,"stem":231,"icon":232},"Hooks","\u002Fadvanced\u002Fhooks","7.advanced\u002F4.hooks","i-lucide-webhook",{"title":234,"path":235,"stem":236,"icon":237},"MCP Evals","\u002Fadvanced\u002Fevals","7.advanced\u002F5.evals","i-lucide-flask-conical",{"title":239,"path":240,"stem":241,"icon":242},"Sessions","\u002Fadvanced\u002Fsessions","7.advanced\u002F6.sessions","i-lucide-database",{"title":244,"path":245,"stem":246,"icon":247},"Dynamic Definitions","\u002Fadvanced\u002Fdynamic-definitions","7.advanced\u002F7.dynamic-definitions","i-lucide-toggle-right",{"title":249,"path":250,"stem":251,"icon":252},"Code Mode","\u002Fadvanced\u002Fcode-mode","7.advanced\u002F8.code-mode","i-lucide-code",{"title":254,"path":255,"stem":256,"icon":257},"Elicitation","\u002Fadvanced\u002Felicitation","7.advanced\u002F9.elicitation","i-lucide-message-square-quote",{"title":259,"path":260,"stem":261,"children":262,"page":39},"Examples","\u002Fexamples","8.examples",[263,268,273,278,283],{"title":264,"path":265,"stem":266,"icon":267},"Authentication","\u002Fexamples\u002Fauthentication","8.examples\u002F1.authentication","i-lucide-shield-check",{"title":269,"path":270,"stem":271,"icon":272},"API Integration","\u002Fexamples\u002Fapi-integration","8.examples\u002F2.api-integration","i-lucide-globe",{"title":274,"path":275,"stem":276,"icon":277},"Common Patterns","\u002Fexamples\u002Fcommon-patterns","8.examples\u002F3.common-patterns","i-lucide-lightbulb",{"title":279,"path":280,"stem":281,"icon":282},"File Operations","\u002Fexamples\u002Ffile-operations","8.examples\u002F4.file-operations","i-lucide-file",{"title":284,"path":285,"stem":286,"icon":107},"Prompt Examples","\u002Fexamples\u002Fprompt-examples","8.examples\u002F5.prompt-examples",{"id":288,"title":152,"body":289,"description":1073,"extension":1074,"links":1075,"meta":1076,"navigation":1077,"path":153,"seo":1078,"stem":154,"__hash__":1080},"docs\u002F5.handlers\u002F5.organization.md",{"type":290,"value":291,"toc":1065},"minimark",[292,313,324,329,351,529,543,568,572,579,713,759,763,777,794,852,866,870,873,954,962,966,1028,1032,1061],[293,294,295,296,300,301,300,304,307,308,312],"p",{},"When you have more than one named handler (",[297,298,299],"code",{},"\u002Fmcp\u002Fadmin",", ",[297,302,303],{},"\u002Fmcp\u002Fapps",[297,305,306],{},"\u002Fmcp\u002Fapi-v2","…) you usually want every tool, resource, and prompt to land in ",[309,310,311],"strong",{},"exactly one place"," without writing manual filters.",[293,314,315,316,319,320,323],{},"The toolkit gives you ",[309,317,318],{},"one mechanism"," to attribute definitions and ",[309,321,322],{},"one escape hatch"," for everything else.",[325,326,328],"h2",{"id":327},"a-folder-convention-the-way-to-attribute","A. Folder convention (the way to attribute)",[293,330,331,332,335,336,300,339,342,343,346,347,350],{},"Place named-handler definitions under ",[297,333,334],{},"server\u002Fmcp\u002Fhandlers\u002F\u003Cname>\u002F",". Every file under ",[297,337,338],{},"tools\u002F",[297,340,341],{},"resources\u002F",", or ",[297,344,345],{},"prompts\u002F"," is auto-attached to that handler via ",[297,348,349],{},"_meta.handler",".",[352,353,358],"pre",{"className":354,"code":355,"language":356,"meta":357,"style":357},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","server\u002Fmcp\u002F\n├── tools\u002F                          # → default handler\n├── resources\u002F                      # → default handler\n├── prompts\u002F                        # → default handler\n└── handlers\u002F\n    ├── admin\u002F\n    │   ├── index.ts                # defineMcpHandler({ middleware: requireAdmin })\n    │   ├── tools\u002F\n    │   │   └── delete-user.ts      # → handler 'admin' (auto)\n    │   └── prompts\u002F\n    │       └── help.ts             # → handler 'admin' (auto)\n    └── widgets\u002F\n        ├── index.ts                # defineMcpHandler({})\n        └── tools\u002F\n            └── carousel.ts         # → handler 'widgets' (auto)\n","bash","",[297,359,360,369,383,394,405,414,423,438,448,465,475,489,498,509,517],{"__ignoreMap":357},[361,362,365],"span",{"class":363,"line":364},"line",1,[361,366,368],{"class":367},"sBMFI","server\u002Fmcp\u002F\n",[361,370,372,375,379],{"class":363,"line":371},2,[361,373,374],{"class":367},"├──",[361,376,378],{"class":377},"sfazB"," tools\u002F",[361,380,382],{"class":381},"sHwdD","                          # → default handler\n",[361,384,386,388,391],{"class":363,"line":385},3,[361,387,374],{"class":367},[361,389,390],{"class":377}," resources\u002F",[361,392,393],{"class":381},"                      # → default handler\n",[361,395,397,399,402],{"class":363,"line":396},4,[361,398,374],{"class":367},[361,400,401],{"class":377}," prompts\u002F",[361,403,404],{"class":381},"                        # → default handler\n",[361,406,408,411],{"class":363,"line":407},5,[361,409,410],{"class":367},"└──",[361,412,413],{"class":377}," handlers\u002F\n",[361,415,417,420],{"class":363,"line":416},6,[361,418,419],{"class":367},"    ├──",[361,421,422],{"class":377}," admin\u002F\n",[361,424,426,429,432,435],{"class":363,"line":425},7,[361,427,428],{"class":367},"    │",[361,430,431],{"class":377},"   ├──",[361,433,434],{"class":377}," index.ts",[361,436,437],{"class":381},"                # defineMcpHandler({ middleware: requireAdmin })\n",[361,439,441,443,445],{"class":363,"line":440},8,[361,442,428],{"class":367},[361,444,431],{"class":377},[361,446,447],{"class":377}," tools\u002F\n",[361,449,451,453,456,459,462],{"class":363,"line":450},9,[361,452,428],{"class":367},[361,454,455],{"class":377},"   │",[361,457,458],{"class":377},"   └──",[361,460,461],{"class":377}," delete-user.ts",[361,463,464],{"class":381},"      # → handler 'admin' (auto)\n",[361,466,468,470,472],{"class":363,"line":467},10,[361,469,428],{"class":367},[361,471,458],{"class":377},[361,473,474],{"class":377}," prompts\u002F\n",[361,476,478,480,483,486],{"class":363,"line":477},11,[361,479,428],{"class":367},[361,481,482],{"class":377},"       └──",[361,484,485],{"class":377}," help.ts",[361,487,488],{"class":381},"             # → handler 'admin' (auto)\n",[361,490,492,495],{"class":363,"line":491},12,[361,493,494],{"class":367},"    └──",[361,496,497],{"class":377}," widgets\u002F\n",[361,499,501,504,506],{"class":363,"line":500},13,[361,502,503],{"class":367},"        ├──",[361,505,434],{"class":377},[361,507,508],{"class":381},"                # defineMcpHandler({})\n",[361,510,512,515],{"class":363,"line":511},14,[361,513,514],{"class":367},"        └──",[361,516,447],{"class":377},[361,518,520,523,526],{"class":363,"line":519},15,[361,521,522],{"class":367},"            └──",[361,524,525],{"class":377}," carousel.ts",[361,527,528],{"class":381},"         # → handler 'widgets' (auto)\n",[293,530,531,532,535,536,539,540,350],{},"The handler ",[297,533,534],{},"name"," is inferred from the directory name and ",[309,537,538],{},"wins over"," anything you set in ",[297,541,542],{},"index.ts",[544,545,547,549,550,553,554,557,558,300,561,300,564,567],"callout",{"color":546,"icon":277},"primary",[297,548,542],{}," is required even if it's a one-liner: ",[297,551,552],{},"export default defineMcpHandler({})",". It's what registers the ",[297,555,556],{},"\u002Fmcp\u002F\u003Cname>"," route and lets you add ",[297,559,560],{},"middleware",[297,562,563],{},"description",[297,565,566],{},"experimental_codeMode",", etc.",[325,569,571],{"id":570},"b-function-form-the-escape-hatch","B. Function form (the escape hatch)",[293,573,574,575,578],{},"For cross-cutting cases — \"every tool tagged X\", \"every orphan\", \"everything except this group\" — pass a function that calls one of the ",[297,576,577],{},"getMcp*"," helpers:",[352,580,585],{"className":581,"code":582,"filename":583,"language":584,"meta":357,"style":357},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { defineMcpHandler, getMcpTools } from '@nuxtjs\u002Fmcp-toolkit\u002Fserver'\n\nexport default defineMcpHandler({\n  \u002F\u002F Every tool tagged 'searchable', regardless of folder.\n  tools: event => getMcpTools({ event, tags: ['searchable'] }),\n})\n","server\u002Fmcp\u002Fhandlers\u002Fsearchable\u002Findex.ts","typescript",[297,586,587,622,628,645,650,706],{"__ignoreMap":357},[361,588,589,593,597,601,604,607,610,613,616,619],{"class":363,"line":364},[361,590,592],{"class":591},"s7zQu","import",[361,594,596],{"class":595},"sMK4o"," {",[361,598,600],{"class":599},"sTEyZ"," defineMcpHandler",[361,602,603],{"class":595},",",[361,605,606],{"class":599}," getMcpTools",[361,608,609],{"class":595}," }",[361,611,612],{"class":591}," from",[361,614,615],{"class":595}," '",[361,617,618],{"class":377},"@nuxtjs\u002Fmcp-toolkit\u002Fserver",[361,620,621],{"class":595},"'\n",[361,623,624],{"class":363,"line":371},[361,625,627],{"emptyLinePlaceholder":626},true,"\n",[361,629,630,633,636,639,642],{"class":363,"line":385},[361,631,632],{"class":591},"export",[361,634,635],{"class":591}," default",[361,637,600],{"class":638},"s2Zo4",[361,640,641],{"class":599},"(",[361,643,644],{"class":595},"{\n",[361,646,647],{"class":363,"line":396},[361,648,649],{"class":381},"  \u002F\u002F Every tool tagged 'searchable', regardless of folder.\n",[361,651,652,655,658,662,666,668,670,673,675,677,681,683,686,689,692,694,697,700,703],{"class":363,"line":407},[361,653,654],{"class":638},"  tools",[361,656,657],{"class":595},":",[361,659,661],{"class":660},"sHdIc"," event",[361,663,665],{"class":664},"spNyl"," =>",[361,667,606],{"class":638},[361,669,641],{"class":599},[361,671,672],{"class":595},"{",[361,674,661],{"class":599},[361,676,603],{"class":595},[361,678,680],{"class":679},"swJcz"," tags",[361,682,657],{"class":595},[361,684,685],{"class":599}," [",[361,687,688],{"class":595},"'",[361,690,691],{"class":377},"searchable",[361,693,688],{"class":595},[361,695,696],{"class":599},"] ",[361,698,699],{"class":595},"}",[361,701,702],{"class":599},")",[361,704,705],{"class":595},",\n",[361,707,708,710],{"class":363,"line":416},[361,709,699],{"class":595},[361,711,712],{"class":599},")\n",[293,714,715,300,718,721,722,725,726,729,730,733,734,737,738,300,741,300,744,300,747,300,750,753,754,758],{},[297,716,717],{},"getMcpTools",[297,719,720],{},"getMcpResources",", and ",[297,723,724],{},"getMcpPrompts"," return the ",[309,727,728],{},"raw"," definition objects (with handlers and Zod schemas intact) — exactly what ",[297,731,732],{},"defineMcpHandler"," expects. They accept the same options as their ",[297,735,736],{},"listMcp*"," counterparts: ",[297,739,740],{},"event",[297,742,743],{},"group",[297,745,746],{},"tags",[297,748,749],{},"handler",[297,751,752],{},"orphansOnly",". See ",[755,756,757],"a",{"href":211},"Listing definitions"," for the full reference.",[325,760,762],{"id":761},"default-handler-strategy","Default handler strategy",[293,764,765,766,769,770,773,774,657],{},"The default ",[297,767,768],{},"\u002Fmcp"," route obeys ",[297,771,772],{},"mcp.defaultHandlerStrategy"," in ",[297,775,776],{},"nuxt.config.ts",[778,779,780,790],"field-group",{},[781,782,785,786,789],"field",{"name":783,"type":784},"`'orphans'`","default","Only definitions ",[309,787,788],{},"not attached"," to any named handler are exposed. Each definition shows up in exactly one place.",[781,791,793],{"name":792},"`'all'`","Every discovered definition is exposed (the pre-multi-handler behaviour). Useful when you want a \"kitchen sink\" route on top of specialized ones.",[352,795,797],{"className":581,"code":796,"filename":776,"language":584,"meta":357,"style":357},"export default defineNuxtConfig({\n  mcp: {\n    defaultHandlerStrategy: 'orphans', \u002F\u002F (default)\n  },\n})\n",[297,798,799,812,822,841,846],{"__ignoreMap":357},[361,800,801,803,805,808,810],{"class":363,"line":364},[361,802,632],{"class":591},[361,804,635],{"class":591},[361,806,807],{"class":638}," defineNuxtConfig",[361,809,641],{"class":599},[361,811,644],{"class":595},[361,813,814,817,819],{"class":363,"line":371},[361,815,816],{"class":679},"  mcp",[361,818,657],{"class":595},[361,820,821],{"class":595}," {\n",[361,823,824,827,829,831,834,836,838],{"class":363,"line":385},[361,825,826],{"class":679},"    defaultHandlerStrategy",[361,828,657],{"class":595},[361,830,615],{"class":595},[361,832,833],{"class":377},"orphans",[361,835,688],{"class":595},[361,837,603],{"class":595},[361,839,840],{"class":381}," \u002F\u002F (default)\n",[361,842,843],{"class":363,"line":396},[361,844,845],{"class":595},"  },\n",[361,847,848,850],{"class":363,"line":407},[361,849,699],{"class":595},[361,851,712],{"class":599},[544,853,854,857,858,861,862,865],{"color":546,"icon":267},[309,855,856],{},"Zero-effort back-compat",": when no definition uses the folder convention, ",[297,859,860],{},"'orphans'"," behaves exactly like ",[297,863,864],{},"'all'"," — every definition is an orphan, so it's exposed. Existing apps don't change behaviour after upgrading.",[325,867,869],{"id":868},"resolution-rule","Resolution rule",[293,871,872],{},"The toolkit picks where each definition shows up using a single rule, deterministic by file location:",[874,875,876,892],"table",{},[877,878,879],"thead",{},[880,881,882,886],"tr",{},[883,884,885],"th",{},"Handler config file",[883,887,888,889],{},"Default behaviour for ",[297,890,891],{},"tools | resources | prompts: undefined",[893,894,895,910,924,935,943],"tbody",{},[880,896,897,904],{},[898,899,900,903],"td",{},[297,901,902],{},"server\u002Fmcp\u002Findex.ts"," (default route)",[898,905,906,907],{},"Obeys ",[297,908,909],{},"defaultHandlerStrategy",[880,911,912,918],{},[898,913,914,917],{},[297,915,916],{},"server\u002Fmcp\u002Fhandlers\u002F\u003Cname>\u002Findex.ts"," (folder handler)",[898,919,920,921],{},"Definitions attributed to ",[297,922,923],{},"\u003Cname>",[880,925,926,932],{},[898,927,928,931],{},[297,929,930],{},"server\u002Fmcp\u002F\u003Cname>.ts"," (top-level handler)",[898,933,934],{},"Every discovered definition (back-compat)",[880,936,937,940],{},[898,938,939],{},"Any (array)",[898,941,942],{},"Used as-is",[880,944,945,951],{},[898,946,947,948,702],{},"Any (function ",[297,949,950],{},"(event) => T[]",[898,952,953],{},"Called per request",[544,955,958,959,961],{"color":956,"icon":957},"info","i-lucide-info","The distinction between \"folder handler\" and \"top-level handler\" is purely about where the file lives — not magic. The loader injects ",[297,960,349],{}," on folder handlers; the runtime reads it to choose the default.",[325,963,965],{"id":964},"migration-tips","Migration tips",[967,968,969,988,1002,1015],"ol",{},[970,971,972,975,976,979,980,983,984,987],"li",{},[309,973,974],{},"Start small."," Move one handler at a time into ",[297,977,978],{},"handlers\u002F\u003Cname>\u002F",". Existing ",[297,981,982],{},"tools: [...]"," and ",[297,985,986],{},"tools: ev => [...]"," keep working untouched.",[970,989,990,993,994,997,998,1001],{},[309,991,992],{},"Drop manual filters."," If you were doing ",[297,995,996],{},"tools: allTools.filter(t => t._meta?.group === 'apps')",", move those tools to ",[297,999,1000],{},"handlers\u002Fapps\u002Ftools\u002F"," and let the system attribute them automatically.",[970,1003,1004,1007,1008,1011,1012,350],{},[309,1005,1006],{},"Wrap-everything handlers."," A top-level handler that wraps every tool (e.g. a code-mode wrapper at ",[297,1009,1010],{},"mcp\u002Fcodemode.ts",") keeps its current behaviour — top-level handlers default to the full pool. To filter, pass a function: ",[297,1013,1014],{},"tools: ev => getMcpTools({ event: ev, ... })",[970,1016,1017,1020,1021,1024,1025,1027],{},[309,1018,1019],{},"Force the old behaviour."," Set ",[297,1022,1023],{},"mcp.defaultHandlerStrategy: 'all'"," to keep ",[297,1026,768],{}," exposing everything even after you adopt folder handlers.",[325,1029,1031],{"id":1030},"see-also","See also",[1033,1034,1035,1046,1051],"ul",{},[970,1036,1037,1039,1040,1042,1043,1045],{},[755,1038,757],{"href":211}," — programmatic access to summaries and raw defs (",[297,1041,736],{}," \u002F ",[297,1044,577],{},").",[970,1047,1048,1050],{},[755,1049,147],{"href":148}," — handler organization patterns and best practices.",[970,1052,1053,1056,1057,1060],{},[755,1054,1055],{"href":245},"Dynamic definitions"," — per-request ",[297,1058,1059],{},"enabled()"," guards on individual definitions.",[1062,1063,1064],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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 .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":357,"searchDepth":371,"depth":371,"links":1066},[1067,1068,1069,1070,1071,1072],{"id":327,"depth":371,"text":328},{"id":570,"depth":371,"text":571},{"id":761,"depth":371,"text":762},{"id":868,"depth":371,"text":869},{"id":964,"depth":371,"text":965},{"id":1030,"depth":371,"text":1031},"Auto-attribute auto-discovered definitions to multiple MCP handlers via folder convention, with a function-based escape hatch for cross-cutting cases.","md",null,{},{"icon":155},{"title":152,"description":1079},"One folder convention to attribute tools\u002Fresources\u002Fprompts to MCP routes, plus getMcp* helpers for ad-hoc filtering. No magic, no runtime fallbacks.","5E774VNpNVn1_9yOFgJgajp6bjm4GbiKeHmvOdvv9jk",[1082,1084],{"title":147,"path":148,"stem":149,"description":1083,"icon":150,"children":-1},"Cross-handler tool sharing, file layout, use cases, and next steps.",{"title":46,"path":162,"stem":163,"description":1085,"icon":164,"children":-1},"Build interactive UI widgets that AI hosts render alongside chat — written as Vue SFCs, served as MCP UI resources.",1787670842401]