[{"data":1,"prerenderedAt":613},["ShallowReactive",2],{"navigation_docs":3,"-resources-overview":282,"-resources-overview-surround":608},[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":71,"body":284,"description":592,"extension":593,"links":594,"meta":603,"navigation":604,"path":76,"seo":605,"stem":77,"__hash__":607},"docs\u002F3.resources\u002F0.overview.md",{"type":285,"value":286,"toc":584},"minimark",[287,292,301,348,364,376,380,383,468,473,484,489,500,504,510,545,550,554,578],[288,289,291],"h2",{"id":290},"what-are-resources","What are Resources?",[293,294,295,296,300],"p",{},"Resources are a standardized way for MCP servers to expose ",[297,298,299],"strong",{},"read-only data"," to clients. They provide contextual information that can help AI models understand your application, such as files, database schemas, configuration, or any data accessible via a URI.",[302,303,306,309,339],"prompt",{":actions":304,"description":305,"icon":78},"[\"copy\",\"cursor\",\"windsurf\"]","Scaffold a new MCP resource",[293,307,308],{},"Create a new MCP resource in my Nuxt app using @nuxtjs\u002Fmcp-toolkit.",[310,311,312,316,319,322,330,333,336],"ul",{},[313,314,315],"li",{},"Create a file in server\u002Fmcp\u002Fresources\u002F (e.g. server\u002Fmcp\u002Fresources\u002Freadme.ts)",[313,317,318],{},"Use defineMcpResource (auto-imported) with a description",[313,320,321],{},"For local files, use the file property: file: 'README.md' (URI, MIME type, and handler are auto-generated)",[313,323,324,325,329],{},"For custom data, define uri and handler manually, returning { contents: ",[326,327,328],"span",{},"{ uri, text, mimeType }"," }",[313,331,332],{},"For dynamic resources, use ResourceTemplate from @modelcontextprotocol\u002Fsdk\u002Fserver\u002Fmcp.js with URI variables",[313,334,335],{},"Name and title are auto-generated from the filename",[313,337,338],{},"Use subdirectories to auto-infer groups (e.g. resources\u002Fconfig\u002Fapp.ts → group: 'config')",[293,340,341,342],{},"Docs: ",[343,344,345],"a",{"href":345,"rel":346},"https:\u002F\u002Fmcp-toolkit.nuxt.dev\u002Fresources\u002Foverview",[347],"nofollow",[349,350,352,355,356,359,360,363],"callout",{"color":351,"icon":272},"primary",[297,353,354],{},"Key concept",": Unlike ",[343,357,358],{"href":47},"tools"," which are invoked directly by the AI to perform actions, resources are ",[297,361,362],{},"application-driven",". The host application (not the AI) decides when and how to fetch and include resource content in the conversation.",[293,365,366,367,371,372,375],{},"Each resource is uniquely identified by a URI (e.g., ",[368,369,370],"code",{},"file:\u002F\u002F\u002Fproject\u002FREADME.md"," or ",[368,373,374],{},"api:\u002F\u002Fusers\u002F123",").",[288,377,379],{"id":378},"resources-vs-tools","Resources vs Tools",[293,381,382],{},"Understanding the difference between resources and tools is essential:",[384,385,386,400],"table",{},[387,388,389],"thead",{},[390,391,392,396,398],"tr",{},[393,394,395],"th",{},"Aspect",[393,397,71],{},[393,399,41],{},[401,402,403,417,430,443,456],"tbody",{},[390,404,405,411,414],{},[406,407,408],"td",{},[297,409,410],{},"Purpose",[406,412,413],{},"Provide context and data",[406,415,416],{},"Perform actions",[390,418,419,424,427],{},[406,420,421],{},[297,422,423],{},"Invocation",[406,425,426],{},"Application-driven (user or app selects)",[406,428,429],{},"AI-driven (model decides to call)",[390,431,432,437,440],{},[406,433,434],{},[297,435,436],{},"Nature",[406,438,439],{},"Read-only data access",[406,441,442],{},"Can read and modify state",[390,444,445,450,453],{},[406,446,447],{},[297,448,449],{},"Control",[406,451,452],{},"User\u002Fapplication controls what's included",[406,454,455],{},"AI decides when to use",[390,457,458,462,465],{},[406,459,460],{},[297,461,254],{},[406,463,464],{},"Files, configs, DB schemas, logs",[406,466,467],{},"Send email, create file, query API",[293,469,470],{},[297,471,472],{},"When to use resources:",[310,474,475,478,481],{},[313,476,477],{},"Exposing project files or documentation",[313,479,480],{},"Sharing database schemas or configurations",[313,482,483],{},"Providing logs or system information as context",[293,485,486],{},[297,487,488],{},"When to use tools:",[310,490,491,494,497],{},[313,492,493],{},"Performing actions that modify state",[313,495,496],{},"Executing operations the AI should decide to trigger",[313,498,499],{},"Interacting with external APIs or services",[288,501,503],{"id":502},"how-resources-are-used","How Resources are Used",[293,505,506,507,509],{},"Resources follow an ",[297,508,362],{}," model. The typical flow:",[511,512,513,523,529,539],"ol",{},[313,514,515,518,519,522],{},[297,516,517],{},"Discovery"," — the host application calls ",[368,520,521],{},"resources\u002Flist"," to discover available resources.",[313,524,525,528],{},[297,526,527],{},"Selection"," — the host displays resources in a UI (tree view, search, list) and the user (or application logic) picks which ones to include.",[313,530,531,534,535,538],{},[297,532,533],{},"Reading"," — the host fetches the selected URIs via ",[368,536,537],{},"resources\u002Fread",".",[313,540,541,544],{},[297,542,543],{},"Context inclusion"," — the host injects the contents into the AI conversation as context.",[349,546,549],{"color":547,"icon":548},"info","i-lucide-info","The AI model never directly requests resources. It's always the application that decides which resources to include based on user selection, heuristics, or automatic context detection.",[288,551,553],{"id":552},"going-further","Going further",[555,556,557,563,566,574],"card-group",{},[558,559,562],"card",{"color":560,"icon":277,"title":561,"to":275},"neutral","File operations example","Read local files as MCP resources with graceful error handling.",[558,564,565],{"color":560,"icon":49,"title":41,"to":47},"Pair resources with actions — tools are AI-driven, resources are application-driven.",[558,567,569,570,573],{"color":560,"icon":242,"title":568,"to":240},"Dynamic definitions","Hide resources from anonymous clients with the ",[368,571,572],{},"enabled"," guard.",[558,575,577],{"color":560,"icon":213,"title":576,"to":211},"Listing definitions","Read your discovered catalog from your own server routes.",[293,579,580,581,583],{},"If you are new to MCP in Nuxt, start with ",[343,582,41],{"href":47}," — resources complement tools but follow a different discovery model.",{"title":585,"searchDepth":586,"depth":586,"links":587},"",2,[588,589,590,591],{"id":290,"depth":586,"text":291},{"id":378,"depth":586,"text":379},{"id":502,"depth":586,"text":503},{"id":552,"depth":586,"text":553},"Expose read-only data sources as MCP resources to provide context to AI models.","md",[595,598,599,601],{"label":596,"icon":83,"to":81,"color":560,"variant":597},"Static & structure","subtle",{"label":85,"icon":88,"to":86,"color":560,"variant":597},{"label":600,"icon":93,"to":91,"color":560,"variant":597},"Metadata & content",{"label":602,"icon":98,"to":96,"color":560,"variant":597},"Organization",{},{"title":46,"icon":78},{"title":71,"description":606},"Create MCP resources to expose read-only data sources with static or dynamic URIs.","ZOZE22SDbXZD7D_xd57sW0UCh8rESnRC0yhFWMKFOg4",[609,611],{"title":66,"path":67,"stem":68,"description":610,"icon":69,"children":-1},"group and tags, directory layout, type safety, and enabled guards for tools.",{"title":80,"path":81,"stem":82,"description":612,"icon":83,"children":-1},"File-backed resources, naming, and the shape of defineMcpResource.",1777888634299]