[{"data":1,"prerenderedAt":1081},["ShallowReactive",2],{"navigation_docs":3,"-handlers-organization":282,"-handlers-organization-surround":1076},[4,40,70,99,122,156,189,253],{"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,218,223,228,233,238,243,248],{"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":64},"Middleware","\u002Fadvanced\u002Fmiddleware","7.advanced\u002F2.middleware",{"title":219,"path":220,"stem":221,"icon":222},"TypeScript","\u002Fadvanced\u002Ftypescript","7.advanced\u002F3.typescript","i-lucide-type",{"title":224,"path":225,"stem":226,"icon":227},"Hooks","\u002Fadvanced\u002Fhooks","7.advanced\u002F4.hooks","i-lucide-webhook",{"title":229,"path":230,"stem":231,"icon":232},"MCP Evals","\u002Fadvanced\u002Fevals","7.advanced\u002F5.evals","i-lucide-flask-conical",{"title":234,"path":235,"stem":236,"icon":237},"Sessions","\u002Fadvanced\u002Fsessions","7.advanced\u002F6.sessions","i-lucide-database",{"title":239,"path":240,"stem":241,"icon":242},"Dynamic Definitions","\u002Fadvanced\u002Fdynamic-definitions","7.advanced\u002F7.dynamic-definitions","i-lucide-toggle-right",{"title":244,"path":245,"stem":246,"icon":247},"Code Mode","\u002Fadvanced\u002Fcode-mode","7.advanced\u002F8.code-mode","i-lucide-code",{"title":249,"path":250,"stem":251,"icon":252},"Elicitation","\u002Fadvanced\u002Felicitation","7.advanced\u002F9.elicitation","i-lucide-message-square-quote",{"title":254,"path":255,"stem":256,"children":257,"page":39},"Examples","\u002Fexamples","8.examples",[258,263,268,273,278],{"title":259,"path":260,"stem":261,"icon":262},"Authentication","\u002Fexamples\u002Fauthentication","8.examples\u002F1.authentication","i-lucide-shield-check",{"title":264,"path":265,"stem":266,"icon":267},"API Integration","\u002Fexamples\u002Fapi-integration","8.examples\u002F2.api-integration","i-lucide-globe",{"title":269,"path":270,"stem":271,"icon":272},"Common Patterns","\u002Fexamples\u002Fcommon-patterns","8.examples\u002F3.common-patterns","i-lucide-lightbulb",{"title":274,"path":275,"stem":276,"icon":277},"File Operations","\u002Fexamples\u002Ffile-operations","8.examples\u002F4.file-operations","i-lucide-file",{"title":279,"path":280,"stem":281,"icon":107},"Prompt Examples","\u002Fexamples\u002Fprompt-examples","8.examples\u002F5.prompt-examples",{"id":283,"title":152,"body":284,"description":1068,"extension":1069,"links":1070,"meta":1071,"navigation":1072,"path":153,"seo":1073,"stem":154,"__hash__":1075},"docs\u002F5.handlers\u002F5.organization.md",{"type":285,"value":286,"toc":1060},"minimark",[287,308,319,324,346,524,538,563,567,574,708,754,758,772,789,847,861,865,868,949,957,961,1023,1027,1056],[288,289,290,291,295,296,295,299,302,303,307],"p",{},"When you have more than one named handler (",[292,293,294],"code",{},"\u002Fmcp\u002Fadmin",", ",[292,297,298],{},"\u002Fmcp\u002Fapps",[292,300,301],{},"\u002Fmcp\u002Fapi-v2","…) you usually want every tool, resource, and prompt to land in ",[304,305,306],"strong",{},"exactly one place"," without writing manual filters.",[288,309,310,311,314,315,318],{},"The toolkit gives you ",[304,312,313],{},"one mechanism"," to attribute definitions and ",[304,316,317],{},"one escape hatch"," for everything else.",[320,321,323],"h2",{"id":322},"a-folder-convention-the-way-to-attribute","A. Folder convention (the way to attribute)",[288,325,326,327,330,331,295,334,337,338,341,342,345],{},"Place named-handler definitions under ",[292,328,329],{},"server\u002Fmcp\u002Fhandlers\u002F\u003Cname>\u002F",". Every file under ",[292,332,333],{},"tools\u002F",[292,335,336],{},"resources\u002F",", or ",[292,339,340],{},"prompts\u002F"," is auto-attached to that handler via ",[292,343,344],{},"_meta.handler",".",[347,348,353],"pre",{"className":349,"code":350,"language":351,"meta":352,"style":352},"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","",[292,354,355,364,378,389,400,409,418,433,443,460,470,484,493,504,512],{"__ignoreMap":352},[356,357,360],"span",{"class":358,"line":359},"line",1,[356,361,363],{"class":362},"sBMFI","server\u002Fmcp\u002F\n",[356,365,367,370,374],{"class":358,"line":366},2,[356,368,369],{"class":362},"├──",[356,371,373],{"class":372},"sfazB"," tools\u002F",[356,375,377],{"class":376},"sHwdD","                          # → default handler\n",[356,379,381,383,386],{"class":358,"line":380},3,[356,382,369],{"class":362},[356,384,385],{"class":372}," resources\u002F",[356,387,388],{"class":376},"                      # → default handler\n",[356,390,392,394,397],{"class":358,"line":391},4,[356,393,369],{"class":362},[356,395,396],{"class":372}," prompts\u002F",[356,398,399],{"class":376},"                        # → default handler\n",[356,401,403,406],{"class":358,"line":402},5,[356,404,405],{"class":362},"└──",[356,407,408],{"class":372}," handlers\u002F\n",[356,410,412,415],{"class":358,"line":411},6,[356,413,414],{"class":362},"    ├──",[356,416,417],{"class":372}," admin\u002F\n",[356,419,421,424,427,430],{"class":358,"line":420},7,[356,422,423],{"class":362},"    │",[356,425,426],{"class":372},"   ├──",[356,428,429],{"class":372}," index.ts",[356,431,432],{"class":376},"                # defineMcpHandler({ middleware: requireAdmin })\n",[356,434,436,438,440],{"class":358,"line":435},8,[356,437,423],{"class":362},[356,439,426],{"class":372},[356,441,442],{"class":372}," tools\u002F\n",[356,444,446,448,451,454,457],{"class":358,"line":445},9,[356,447,423],{"class":362},[356,449,450],{"class":372},"   │",[356,452,453],{"class":372},"   └──",[356,455,456],{"class":372}," delete-user.ts",[356,458,459],{"class":376},"      # → handler 'admin' (auto)\n",[356,461,463,465,467],{"class":358,"line":462},10,[356,464,423],{"class":362},[356,466,453],{"class":372},[356,468,469],{"class":372}," prompts\u002F\n",[356,471,473,475,478,481],{"class":358,"line":472},11,[356,474,423],{"class":362},[356,476,477],{"class":372},"       └──",[356,479,480],{"class":372}," help.ts",[356,482,483],{"class":376},"             # → handler 'admin' (auto)\n",[356,485,487,490],{"class":358,"line":486},12,[356,488,489],{"class":362},"    └──",[356,491,492],{"class":372}," widgets\u002F\n",[356,494,496,499,501],{"class":358,"line":495},13,[356,497,498],{"class":362},"        ├──",[356,500,429],{"class":372},[356,502,503],{"class":376},"                # defineMcpHandler({})\n",[356,505,507,510],{"class":358,"line":506},14,[356,508,509],{"class":362},"        └──",[356,511,442],{"class":372},[356,513,515,518,521],{"class":358,"line":514},15,[356,516,517],{"class":362},"            └──",[356,519,520],{"class":372}," carousel.ts",[356,522,523],{"class":376},"         # → handler 'widgets' (auto)\n",[288,525,526,527,530,531,534,535,345],{},"The handler ",[292,528,529],{},"name"," is inferred from the directory name and ",[304,532,533],{},"wins over"," anything you set in ",[292,536,537],{},"index.ts",[539,540,542,544,545,548,549,552,553,295,556,295,559,562],"callout",{"color":541,"icon":272},"primary",[292,543,537],{}," is required even if it's a one-liner: ",[292,546,547],{},"export default defineMcpHandler({})",". It's what registers the ",[292,550,551],{},"\u002Fmcp\u002F\u003Cname>"," route and lets you add ",[292,554,555],{},"middleware",[292,557,558],{},"description",[292,560,561],{},"experimental_codeMode",", etc.",[320,564,566],{"id":565},"b-function-form-the-escape-hatch","B. Function form (the escape hatch)",[288,568,569,570,573],{},"For cross-cutting cases — \"every tool tagged X\", \"every orphan\", \"everything except this group\" — pass a function that calls one of the ",[292,571,572],{},"getMcp*"," helpers:",[347,575,580],{"className":576,"code":577,"filename":578,"language":579,"meta":352,"style":352},"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",[292,581,582,617,623,640,645,701],{"__ignoreMap":352},[356,583,584,588,592,596,599,602,605,608,611,614],{"class":358,"line":359},[356,585,587],{"class":586},"s7zQu","import",[356,589,591],{"class":590},"sMK4o"," {",[356,593,595],{"class":594},"sTEyZ"," defineMcpHandler",[356,597,598],{"class":590},",",[356,600,601],{"class":594}," getMcpTools",[356,603,604],{"class":590}," }",[356,606,607],{"class":586}," from",[356,609,610],{"class":590}," '",[356,612,613],{"class":372},"@nuxtjs\u002Fmcp-toolkit\u002Fserver",[356,615,616],{"class":590},"'\n",[356,618,619],{"class":358,"line":366},[356,620,622],{"emptyLinePlaceholder":621},true,"\n",[356,624,625,628,631,634,637],{"class":358,"line":380},[356,626,627],{"class":586},"export",[356,629,630],{"class":586}," default",[356,632,595],{"class":633},"s2Zo4",[356,635,636],{"class":594},"(",[356,638,639],{"class":590},"{\n",[356,641,642],{"class":358,"line":391},[356,643,644],{"class":376},"  \u002F\u002F Every tool tagged 'searchable', regardless of folder.\n",[356,646,647,650,653,657,661,663,665,668,670,672,676,678,681,684,687,689,692,695,698],{"class":358,"line":402},[356,648,649],{"class":633},"  tools",[356,651,652],{"class":590},":",[356,654,656],{"class":655},"sHdIc"," event",[356,658,660],{"class":659},"spNyl"," =>",[356,662,601],{"class":633},[356,664,636],{"class":594},[356,666,667],{"class":590},"{",[356,669,656],{"class":594},[356,671,598],{"class":590},[356,673,675],{"class":674},"swJcz"," tags",[356,677,652],{"class":590},[356,679,680],{"class":594}," [",[356,682,683],{"class":590},"'",[356,685,686],{"class":372},"searchable",[356,688,683],{"class":590},[356,690,691],{"class":594},"] ",[356,693,694],{"class":590},"}",[356,696,697],{"class":594},")",[356,699,700],{"class":590},",\n",[356,702,703,705],{"class":358,"line":411},[356,704,694],{"class":590},[356,706,707],{"class":594},")\n",[288,709,710,295,713,716,717,720,721,724,725,728,729,732,733,295,736,295,739,295,742,295,745,748,749,753],{},[292,711,712],{},"getMcpTools",[292,714,715],{},"getMcpResources",", and ",[292,718,719],{},"getMcpPrompts"," return the ",[304,722,723],{},"raw"," definition objects (with handlers and Zod schemas intact) — exactly what ",[292,726,727],{},"defineMcpHandler"," expects. They accept the same options as their ",[292,730,731],{},"listMcp*"," counterparts: ",[292,734,735],{},"event",[292,737,738],{},"group",[292,740,741],{},"tags",[292,743,744],{},"handler",[292,746,747],{},"orphansOnly",". See ",[750,751,752],"a",{"href":211},"Listing definitions"," for the full reference.",[320,755,757],{"id":756},"default-handler-strategy","Default handler strategy",[288,759,760,761,764,765,768,769,652],{},"The default ",[292,762,763],{},"\u002Fmcp"," route obeys ",[292,766,767],{},"mcp.defaultHandlerStrategy"," in ",[292,770,771],{},"nuxt.config.ts",[773,774,775,785],"field-group",{},[776,777,780,781,784],"field",{"name":778,"type":779},"`'orphans'`","default","Only definitions ",[304,782,783],{},"not attached"," to any named handler are exposed. Each definition shows up in exactly one place.",[776,786,788],{"name":787},"`'all'`","Every discovered definition is exposed (the pre-multi-handler behaviour). Useful when you want a \"kitchen sink\" route on top of specialized ones.",[347,790,792],{"className":576,"code":791,"filename":771,"language":579,"meta":352,"style":352},"export default defineNuxtConfig({\n  mcp: {\n    defaultHandlerStrategy: 'orphans', \u002F\u002F (default)\n  },\n})\n",[292,793,794,807,817,836,841],{"__ignoreMap":352},[356,795,796,798,800,803,805],{"class":358,"line":359},[356,797,627],{"class":586},[356,799,630],{"class":586},[356,801,802],{"class":633}," defineNuxtConfig",[356,804,636],{"class":594},[356,806,639],{"class":590},[356,808,809,812,814],{"class":358,"line":366},[356,810,811],{"class":674},"  mcp",[356,813,652],{"class":590},[356,815,816],{"class":590}," {\n",[356,818,819,822,824,826,829,831,833],{"class":358,"line":380},[356,820,821],{"class":674},"    defaultHandlerStrategy",[356,823,652],{"class":590},[356,825,610],{"class":590},[356,827,828],{"class":372},"orphans",[356,830,683],{"class":590},[356,832,598],{"class":590},[356,834,835],{"class":376}," \u002F\u002F (default)\n",[356,837,838],{"class":358,"line":391},[356,839,840],{"class":590},"  },\n",[356,842,843,845],{"class":358,"line":402},[356,844,694],{"class":590},[356,846,707],{"class":594},[539,848,849,852,853,856,857,860],{"color":541,"icon":262},[304,850,851],{},"Zero-effort back-compat",": when no definition uses the folder convention, ",[292,854,855],{},"'orphans'"," behaves exactly like ",[292,858,859],{},"'all'"," — every definition is an orphan, so it's exposed. Existing apps don't change behaviour after upgrading.",[320,862,864],{"id":863},"resolution-rule","Resolution rule",[288,866,867],{},"The toolkit picks where each definition shows up using a single rule, deterministic by file location:",[869,870,871,887],"table",{},[872,873,874],"thead",{},[875,876,877,881],"tr",{},[878,879,880],"th",{},"Handler config file",[878,882,883,884],{},"Default behaviour for ",[292,885,886],{},"tools | resources | prompts: undefined",[888,889,890,905,919,930,938],"tbody",{},[875,891,892,899],{},[893,894,895,898],"td",{},[292,896,897],{},"server\u002Fmcp\u002Findex.ts"," (default route)",[893,900,901,902],{},"Obeys ",[292,903,904],{},"defaultHandlerStrategy",[875,906,907,913],{},[893,908,909,912],{},[292,910,911],{},"server\u002Fmcp\u002Fhandlers\u002F\u003Cname>\u002Findex.ts"," (folder handler)",[893,914,915,916],{},"Definitions attributed to ",[292,917,918],{},"\u003Cname>",[875,920,921,927],{},[893,922,923,926],{},[292,924,925],{},"server\u002Fmcp\u002F\u003Cname>.ts"," (top-level handler)",[893,928,929],{},"Every discovered definition (back-compat)",[875,931,932,935],{},[893,933,934],{},"Any (array)",[893,936,937],{},"Used as-is",[875,939,940,946],{},[893,941,942,943,697],{},"Any (function ",[292,944,945],{},"(event) => T[]",[893,947,948],{},"Called per request",[539,950,953,954,956],{"color":951,"icon":952},"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 ",[292,955,344],{}," on folder handlers; the runtime reads it to choose the default.",[320,958,960],{"id":959},"migration-tips","Migration tips",[962,963,964,983,997,1010],"ol",{},[965,966,967,970,971,974,975,978,979,982],"li",{},[304,968,969],{},"Start small."," Move one handler at a time into ",[292,972,973],{},"handlers\u002F\u003Cname>\u002F",". Existing ",[292,976,977],{},"tools: [...]"," and ",[292,980,981],{},"tools: ev => [...]"," keep working untouched.",[965,984,985,988,989,992,993,996],{},[304,986,987],{},"Drop manual filters."," If you were doing ",[292,990,991],{},"tools: allTools.filter(t => t._meta?.group === 'apps')",", move those tools to ",[292,994,995],{},"handlers\u002Fapps\u002Ftools\u002F"," and let the system attribute them automatically.",[965,998,999,1002,1003,1006,1007,345],{},[304,1000,1001],{},"Wrap-everything handlers."," A top-level handler that wraps every tool (e.g. a code-mode wrapper at ",[292,1004,1005],{},"mcp\u002Fcodemode.ts",") keeps its current behaviour — top-level handlers default to the full pool. To filter, pass a function: ",[292,1008,1009],{},"tools: ev => getMcpTools({ event: ev, ... })",[965,1011,1012,1015,1016,1019,1020,1022],{},[304,1013,1014],{},"Force the old behaviour."," Set ",[292,1017,1018],{},"mcp.defaultHandlerStrategy: 'all'"," to keep ",[292,1021,763],{}," exposing everything even after you adopt folder handlers.",[320,1024,1026],{"id":1025},"see-also","See also",[1028,1029,1030,1041,1046],"ul",{},[965,1031,1032,1034,1035,1037,1038,1040],{},[750,1033,752],{"href":211}," — programmatic access to summaries and raw defs (",[292,1036,731],{}," \u002F ",[292,1039,572],{},").",[965,1042,1043,1045],{},[750,1044,147],{"href":148}," — handler organization patterns and best practices.",[965,1047,1048,1051,1052,1055],{},[750,1049,1050],{"href":240},"Dynamic definitions"," — per-request ",[292,1053,1054],{},"enabled()"," guards on individual definitions.",[1057,1058,1059],"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":352,"searchDepth":366,"depth":366,"links":1061},[1062,1063,1064,1065,1066,1067],{"id":322,"depth":366,"text":323},{"id":565,"depth":366,"text":566},{"id":756,"depth":366,"text":757},{"id":863,"depth":366,"text":864},{"id":959,"depth":366,"text":960},{"id":1025,"depth":366,"text":1026},"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":1074},"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",[1077,1079],{"title":147,"path":148,"stem":149,"description":1078,"icon":150,"children":-1},"Cross-handler tool sharing, file layout, use cases, and next steps.",{"title":46,"path":162,"stem":163,"description":1080,"icon":164,"children":-1},"Build interactive UI widgets that AI hosts render alongside chat — written as Vue SFCs, served as MCP UI resources.",1777643708160]