[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-strapi-strapi-mcp-capabilities":3,"mdc--998ian-key":34,"related-org-strapi-strapi-mcp-capabilities":2522,"related-repo-strapi-strapi-mcp-capabilities":2558},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"strapi-mcp-capabilities","create custom MCP capabilities for Strapi","Create custom MCP capabilities (tools, prompts, resources) in a Strapi 5 plugin via the strapi.ai.mcp service. Use when adding a custom MCP tool\u002Fprompt\u002Fresource to Strapi, extending the Strapi MCP server.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"strapi","Strapi","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fstrapi.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"CMS","cms",{"name":18,"slug":19,"type":13},"MCP","mcp",{"name":21,"slug":22,"type":13},"Plugin Development","plugin-development",2,"https:\u002F\u002Fgithub.com\u002Fstrapi\u002Fskills","2026-07-16T06:03:02.629114",null,1,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"AI Agent Skills A collection of skills for AI coding agents. Skills are packaged instructions and scripts that extend agent capabilities.","https:\u002F\u002Fgithub.com\u002Fstrapi\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fcms\u002Fstrapi-mcp-capabilities","---\nname: strapi-mcp-capabilities\ndescription: Create custom MCP capabilities (tools, prompts, resources) in a Strapi 5 plugin via the strapi.ai.mcp service. Use when adding a custom MCP tool\u002Fprompt\u002Fresource to Strapi, extending the Strapi MCP server.\n---\n\n# Strapi MCP Capabilities\n\nRegister custom MCP tools\u002Fprompts\u002Fresources so AI clients can trigger plugin-specific actions on a running Strapi instance. Strapi 5.47.0+. API source of truth: `@strapi\u002Ftypes`, search `mcp`.\n\n## Hard rules\n\n1. **Enable the server**: `config\u002Fserver.ts` must set `mcp: { enabled: true }`. Endpoint is `POST \u002Fmcp`.\n2. **Register only in the `register()` phase.** The capability list is locked once the MCP server starts (during bootstrap). Registering later throws.\n3. **Use Zod from `@strapi\u002Futils`** (`import { z } from '@strapi\u002Futils'`), not standalone `zod`.\n4. **Never use global `strapi` at module top-level.** Either register inline (have `strapi`) or use `ai.mcp.defineTool(...)` to define at module scope, then register with the injected `strapi`.\n\n## Two registration patterns\n\n**Inline** — when `strapi` is in scope (a function called from `register()`):\n\n```ts\n\u002F\u002F mcp\u002Ftools\u002Fget-store-kpis.ts\nimport type { Core } from '@strapi\u002Fstrapi';\nimport { z } from '@strapi\u002Futils';\n\nexport const registerGetStoreKpisTool = (strapi: Core.Strapi) => {\n  strapi.ai.mcp.registerTool({ \u002F* definition *\u002F });\n};\n```\n\n**Builder** — define at module scope (no `strapi`), register later. `defineTool` is an identity helper that narrows the access variant for type inference:\n\n```ts\n\u002F\u002F mcp\u002Ftools\u002Fget-top-products.ts\nimport { ai } from '@strapi\u002Fstrapi';\nimport { z } from '@strapi\u002Futils';\n\nexport const getTopProductsTool = ai.mcp.defineTool({ \u002F* definition *\u002F });\n\n\u002F\u002F register.ts\nstrapi.ai.mcp.registerTool(getTopProductsTool);\n```\n\nWire both from the plugin `register()`:\n\n```ts\n\u002F\u002F register.ts\nexport const register = ({ strapi }: { strapi: Core.Strapi }) => {\n  registerGetStoreKpisTool(strapi);          \u002F\u002F inline\n  strapi.ai.mcp.registerTool(getTopProductsTool); \u002F\u002F builder\n};\n```\n\n## Tool definition (the core unit)\n\n```ts\nstrapi.ai.mcp.registerTool({\n  name: 'get_store_kpis',          \u002F\u002F snake_case, unique\n  title: 'Get Store KPIs',\n  description: 'What it returns + when to use it. The AI reads this to choose the tool.',\n  auth: { policies: [{ action: 'plugin::store-analytics.read' }] }, \u002F\u002F OR devModeOnly: true\n  resolveInputSchema: () => inputSchema,   \u002F\u002F optional; omit if no args\n  resolveOutputSchema: () => outputSchema, \u002F\u002F required; a z.object\n  createHandler: (strapi, context) => async ({ args, extra }) => {\n    const result = await strapi\n      .plugin('store-analytics')\n      .service('analytics')\n      .getStoreKpis(args);\n\n    return {\n      content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],\n      structuredContent: result, \u002F\u002F must match resolveOutputSchema\n    };\n  },\n});\n```\n\nKey points:\n- `createHandler(strapi, context) => handler`. The handler receives a single object `{ args, extra }`. `args` is `z.infer\u003CinputSchema>` (typed); if no `resolveInputSchema`, omit `args`.\n- `context: { userAbility, user }` — use `userAbility` for entity\u002Ffield permission checks and `user` (token owner) for `setCreatorFields` on writes.\n- Keep handlers thin: delegate to a plugin **service**; the tool is just the MCP surface.\n- `name`\u002F`title`\u002F`description`\u002F`resolveOutputSchema` are required. `description` quality drives AI tool selection — state what it returns and when to use it.\n\n## Schemas\n\n- Define `z.object` input\u002Foutput schemas; reuse shared field schemas (e.g. an `isoDateSchema` with `.describe(...)`).\n- `.describe()` every non-obvious field — descriptions reach the AI client.\n- `structuredContent` returned by the handler must satisfy `resolveOutputSchema`.\n\n## Auth (choose exactly one access variant)\n\n- `auth: { policies: [{ action, subject? }] }` — CASL check; session passes if the token's ability satisfies **any** policy. `action` is typically a registered admin permission, e.g. `plugin::\u003Cplugin-id>.\u003Cpermission>`.\n- `devModeOnly: true` — no auth; only available when `autoReload` is on (dev). Use for debug tools.\n\nFor `auth` to be grantable to a token, register the permission action in `bootstrap()`:\n\n```ts\nawait strapi.service('admin::permission').actionProvider.registerMany([\n  { section: 'plugins', displayName: 'Access store analytics',\n    uid: 'read', pluginName: 'store-analytics' },\n]);\n\u002F\u002F → action becomes 'plugin::store-analytics.read'\n```\n\n## Handler return shape\n\n```ts\n\u002F\u002F success\nreturn { content: [{ type: 'text', text }], structuredContent: result };\n\u002F\u002F error\nreturn { content: [{ type: 'text', text: 'message' }], isError: true };\n```\n`structuredContent` and `isError` are mutually exclusive.\n\n## Folder convention\n\n```\nserver\u002Fsrc\u002F\n├── register.ts            # calls registrations (register phase only)\n├── bootstrap.ts           # registerMany permission actions\n├── mcp\u002F\n│   ├── index.ts           # registerAllMcpTools(strapi)\n│   ├── schemas.ts         # shared zod field schemas\n│   └── tools\u002F\u003Ctool>.ts    # one capability per file\n└── services\u002F              # business logic the handlers call\n```\n\n## Verify\n\n1. `mcp: { enabled: true }` in `config\u002Fserver.ts`; restart Strapi.\n2. Connect a client to `http:\u002F\u002Flocalhost:1337\u002Fmcp` with `Authorization: Bearer \u003Cadmin-token>` whose permissions include the tool's `auth` action.\n3. Confirm the tool appears and returns `structuredContent` matching its output schema.\n\n## Prompts & resources\n\nSame lifecycle\u002Fauth rules, different builders: `ai.mcp.definePrompt` \u002F `strapi.ai.mcp.registerPrompt` and `ai.mcp.defineResource` \u002F `strapi.ai.mcp.registerResource`. See [reference.md](reference.md) for their field tables and signatures.\n\n## Docs\n\n- [MCP server](https:\u002F\u002Fdocs.strapi.io\u002Fcms\u002Ffeatures\u002Fstrapi-mcp-server) (config, permission boundaries, stateless architecture, limitations)\n- API types: `@strapi\u002Ftypes`\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,69,76,202,208,232,502,527,748,759,935,941,1619,1624,1762,1768,1828,1834,1889,1909,2115,2121,2336,2354,2360,2370,2376,2435,2441,2484,2490,2516],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Strapi MCP Capabilities",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51,53,60,62,67],{"type":45,"value":52},"Register custom MCP tools\u002Fprompts\u002Fresources so AI clients can trigger plugin-specific actions on a running Strapi instance. Strapi 5.47.0+. API source of truth: ",{"type":40,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"@strapi\u002Ftypes",{"type":45,"value":61},", search ",{"type":40,"tag":54,"props":63,"children":65},{"className":64},[],[66],{"type":45,"value":19},{"type":45,"value":68},".",{"type":40,"tag":70,"props":71,"children":73},"h2",{"id":72},"hard-rules",[74],{"type":45,"value":75},"Hard rules",{"type":40,"tag":77,"props":78,"children":79},"ol",{},[80,115,133,164],{"type":40,"tag":81,"props":82,"children":83},"li",{},[84,90,92,98,100,106,108,114],{"type":40,"tag":85,"props":86,"children":87},"strong",{},[88],{"type":45,"value":89},"Enable the server",{"type":45,"value":91},": ",{"type":40,"tag":54,"props":93,"children":95},{"className":94},[],[96],{"type":45,"value":97},"config\u002Fserver.ts",{"type":45,"value":99}," must set ",{"type":40,"tag":54,"props":101,"children":103},{"className":102},[],[104],{"type":45,"value":105},"mcp: { enabled: true }",{"type":45,"value":107},". Endpoint is ",{"type":40,"tag":54,"props":109,"children":111},{"className":110},[],[112],{"type":45,"value":113},"POST \u002Fmcp",{"type":45,"value":68},{"type":40,"tag":81,"props":116,"children":117},{},[118,131],{"type":40,"tag":85,"props":119,"children":120},{},[121,123,129],{"type":45,"value":122},"Register only in the ",{"type":40,"tag":54,"props":124,"children":126},{"className":125},[],[127],{"type":45,"value":128},"register()",{"type":45,"value":130}," phase.",{"type":45,"value":132}," The capability list is locked once the MCP server starts (during bootstrap). Registering later throws.",{"type":40,"tag":81,"props":134,"children":135},{},[136,147,149,155,157,163],{"type":40,"tag":85,"props":137,"children":138},{},[139,141],{"type":45,"value":140},"Use Zod from ",{"type":40,"tag":54,"props":142,"children":144},{"className":143},[],[145],{"type":45,"value":146},"@strapi\u002Futils",{"type":45,"value":148}," (",{"type":40,"tag":54,"props":150,"children":152},{"className":151},[],[153],{"type":45,"value":154},"import { z } from '@strapi\u002Futils'",{"type":45,"value":156},"), not standalone ",{"type":40,"tag":54,"props":158,"children":160},{"className":159},[],[161],{"type":45,"value":162},"zod",{"type":45,"value":68},{"type":40,"tag":81,"props":165,"children":166},{},[167,179,181,186,188,194,196,201],{"type":40,"tag":85,"props":168,"children":169},{},[170,172,177],{"type":45,"value":171},"Never use global ",{"type":40,"tag":54,"props":173,"children":175},{"className":174},[],[176],{"type":45,"value":8},{"type":45,"value":178}," at module top-level.",{"type":45,"value":180}," Either register inline (have ",{"type":40,"tag":54,"props":182,"children":184},{"className":183},[],[185],{"type":45,"value":8},{"type":45,"value":187},") or use ",{"type":40,"tag":54,"props":189,"children":191},{"className":190},[],[192],{"type":45,"value":193},"ai.mcp.defineTool(...)",{"type":45,"value":195}," to define at module scope, then register with the injected ",{"type":40,"tag":54,"props":197,"children":199},{"className":198},[],[200],{"type":45,"value":8},{"type":45,"value":68},{"type":40,"tag":70,"props":203,"children":205},{"id":204},"two-registration-patterns",[206],{"type":45,"value":207},"Two registration patterns",{"type":40,"tag":48,"props":209,"children":210},{},[211,216,218,223,225,230],{"type":40,"tag":85,"props":212,"children":213},{},[214],{"type":45,"value":215},"Inline",{"type":45,"value":217}," — when ",{"type":40,"tag":54,"props":219,"children":221},{"className":220},[],[222],{"type":45,"value":8},{"type":45,"value":224}," is in scope (a function called from ",{"type":40,"tag":54,"props":226,"children":228},{"className":227},[],[229],{"type":45,"value":128},{"type":45,"value":231},"):",{"type":40,"tag":233,"props":234,"children":239},"pre",{"className":235,"code":236,"language":237,"meta":238,"style":238},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F mcp\u002Ftools\u002Fget-store-kpis.ts\nimport type { Core } from '@strapi\u002Fstrapi';\nimport { z } from '@strapi\u002Futils';\n\nexport const registerGetStoreKpisTool = (strapi: Core.Strapi) => {\n  strapi.ai.mcp.registerTool({ \u002F* definition *\u002F });\n};\n","ts","",[240],{"type":40,"tag":54,"props":241,"children":242},{"__ignoreMap":238},[243,254,311,352,362,429,493],{"type":40,"tag":244,"props":245,"children":247},"span",{"class":246,"line":27},"line",[248],{"type":40,"tag":244,"props":249,"children":251},{"style":250},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[252],{"type":45,"value":253},"\u002F\u002F mcp\u002Ftools\u002Fget-store-kpis.ts\n",{"type":40,"tag":244,"props":255,"children":256},{"class":246,"line":23},[257,263,268,274,280,285,290,295,301,306],{"type":40,"tag":244,"props":258,"children":260},{"style":259},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[261],{"type":45,"value":262},"import",{"type":40,"tag":244,"props":264,"children":265},{"style":259},[266],{"type":45,"value":267}," type",{"type":40,"tag":244,"props":269,"children":271},{"style":270},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[272],{"type":45,"value":273}," {",{"type":40,"tag":244,"props":275,"children":277},{"style":276},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[278],{"type":45,"value":279}," Core",{"type":40,"tag":244,"props":281,"children":282},{"style":270},[283],{"type":45,"value":284}," }",{"type":40,"tag":244,"props":286,"children":287},{"style":259},[288],{"type":45,"value":289}," from",{"type":40,"tag":244,"props":291,"children":292},{"style":270},[293],{"type":45,"value":294}," '",{"type":40,"tag":244,"props":296,"children":298},{"style":297},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[299],{"type":45,"value":300},"@strapi\u002Fstrapi",{"type":40,"tag":244,"props":302,"children":303},{"style":270},[304],{"type":45,"value":305},"'",{"type":40,"tag":244,"props":307,"children":308},{"style":270},[309],{"type":45,"value":310},";\n",{"type":40,"tag":244,"props":312,"children":314},{"class":246,"line":313},3,[315,319,323,328,332,336,340,344,348],{"type":40,"tag":244,"props":316,"children":317},{"style":259},[318],{"type":45,"value":262},{"type":40,"tag":244,"props":320,"children":321},{"style":270},[322],{"type":45,"value":273},{"type":40,"tag":244,"props":324,"children":325},{"style":276},[326],{"type":45,"value":327}," z",{"type":40,"tag":244,"props":329,"children":330},{"style":270},[331],{"type":45,"value":284},{"type":40,"tag":244,"props":333,"children":334},{"style":259},[335],{"type":45,"value":289},{"type":40,"tag":244,"props":337,"children":338},{"style":270},[339],{"type":45,"value":294},{"type":40,"tag":244,"props":341,"children":342},{"style":297},[343],{"type":45,"value":146},{"type":40,"tag":244,"props":345,"children":346},{"style":270},[347],{"type":45,"value":305},{"type":40,"tag":244,"props":349,"children":350},{"style":270},[351],{"type":45,"value":310},{"type":40,"tag":244,"props":353,"children":355},{"class":246,"line":354},4,[356],{"type":40,"tag":244,"props":357,"children":359},{"emptyLinePlaceholder":358},true,[360],{"type":45,"value":361},"\n",{"type":40,"tag":244,"props":363,"children":365},{"class":246,"line":364},5,[366,371,377,382,387,391,396,401,406,410,414,419,424],{"type":40,"tag":244,"props":367,"children":368},{"style":259},[369],{"type":45,"value":370},"export",{"type":40,"tag":244,"props":372,"children":374},{"style":373},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[375],{"type":45,"value":376}," const",{"type":40,"tag":244,"props":378,"children":379},{"style":276},[380],{"type":45,"value":381}," registerGetStoreKpisTool ",{"type":40,"tag":244,"props":383,"children":384},{"style":270},[385],{"type":45,"value":386},"=",{"type":40,"tag":244,"props":388,"children":389},{"style":270},[390],{"type":45,"value":148},{"type":40,"tag":244,"props":392,"children":394},{"style":393},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[395],{"type":45,"value":8},{"type":40,"tag":244,"props":397,"children":398},{"style":270},[399],{"type":45,"value":400},":",{"type":40,"tag":244,"props":402,"children":404},{"style":403},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[405],{"type":45,"value":279},{"type":40,"tag":244,"props":407,"children":408},{"style":270},[409],{"type":45,"value":68},{"type":40,"tag":244,"props":411,"children":412},{"style":403},[413],{"type":45,"value":9},{"type":40,"tag":244,"props":415,"children":416},{"style":270},[417],{"type":45,"value":418},")",{"type":40,"tag":244,"props":420,"children":421},{"style":373},[422],{"type":45,"value":423}," =>",{"type":40,"tag":244,"props":425,"children":426},{"style":270},[427],{"type":45,"value":428}," {\n",{"type":40,"tag":244,"props":430,"children":432},{"class":246,"line":431},6,[433,438,442,447,451,455,459,465,471,476,481,485,489],{"type":40,"tag":244,"props":434,"children":435},{"style":276},[436],{"type":45,"value":437},"  strapi",{"type":40,"tag":244,"props":439,"children":440},{"style":270},[441],{"type":45,"value":68},{"type":40,"tag":244,"props":443,"children":444},{"style":276},[445],{"type":45,"value":446},"ai",{"type":40,"tag":244,"props":448,"children":449},{"style":270},[450],{"type":45,"value":68},{"type":40,"tag":244,"props":452,"children":453},{"style":276},[454],{"type":45,"value":19},{"type":40,"tag":244,"props":456,"children":457},{"style":270},[458],{"type":45,"value":68},{"type":40,"tag":244,"props":460,"children":462},{"style":461},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[463],{"type":45,"value":464},"registerTool",{"type":40,"tag":244,"props":466,"children":468},{"style":467},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[469],{"type":45,"value":470},"(",{"type":40,"tag":244,"props":472,"children":473},{"style":270},[474],{"type":45,"value":475},"{",{"type":40,"tag":244,"props":477,"children":478},{"style":250},[479],{"type":45,"value":480}," \u002F* definition *\u002F",{"type":40,"tag":244,"props":482,"children":483},{"style":270},[484],{"type":45,"value":284},{"type":40,"tag":244,"props":486,"children":487},{"style":467},[488],{"type":45,"value":418},{"type":40,"tag":244,"props":490,"children":491},{"style":270},[492],{"type":45,"value":310},{"type":40,"tag":244,"props":494,"children":496},{"class":246,"line":495},7,[497],{"type":40,"tag":244,"props":498,"children":499},{"style":270},[500],{"type":45,"value":501},"};\n",{"type":40,"tag":48,"props":503,"children":504},{},[505,510,512,517,519,525],{"type":40,"tag":85,"props":506,"children":507},{},[508],{"type":45,"value":509},"Builder",{"type":45,"value":511}," — define at module scope (no ",{"type":40,"tag":54,"props":513,"children":515},{"className":514},[],[516],{"type":45,"value":8},{"type":45,"value":518},"), register later. ",{"type":40,"tag":54,"props":520,"children":522},{"className":521},[],[523],{"type":45,"value":524},"defineTool",{"type":45,"value":526}," is an identity helper that narrows the access variant for type inference:",{"type":40,"tag":233,"props":528,"children":530},{"className":235,"code":529,"language":237,"meta":238,"style":238},"\u002F\u002F mcp\u002Ftools\u002Fget-top-products.ts\nimport { ai } from '@strapi\u002Fstrapi';\nimport { z } from '@strapi\u002Futils';\n\nexport const getTopProductsTool = ai.mcp.defineTool({ \u002F* definition *\u002F });\n\n\u002F\u002F register.ts\nstrapi.ai.mcp.registerTool(getTopProductsTool);\n",[531],{"type":40,"tag":54,"props":532,"children":533},{"__ignoreMap":238},[534,542,582,621,628,692,699,707],{"type":40,"tag":244,"props":535,"children":536},{"class":246,"line":27},[537],{"type":40,"tag":244,"props":538,"children":539},{"style":250},[540],{"type":45,"value":541},"\u002F\u002F mcp\u002Ftools\u002Fget-top-products.ts\n",{"type":40,"tag":244,"props":543,"children":544},{"class":246,"line":23},[545,549,553,558,562,566,570,574,578],{"type":40,"tag":244,"props":546,"children":547},{"style":259},[548],{"type":45,"value":262},{"type":40,"tag":244,"props":550,"children":551},{"style":270},[552],{"type":45,"value":273},{"type":40,"tag":244,"props":554,"children":555},{"style":276},[556],{"type":45,"value":557}," ai",{"type":40,"tag":244,"props":559,"children":560},{"style":270},[561],{"type":45,"value":284},{"type":40,"tag":244,"props":563,"children":564},{"style":259},[565],{"type":45,"value":289},{"type":40,"tag":244,"props":567,"children":568},{"style":270},[569],{"type":45,"value":294},{"type":40,"tag":244,"props":571,"children":572},{"style":297},[573],{"type":45,"value":300},{"type":40,"tag":244,"props":575,"children":576},{"style":270},[577],{"type":45,"value":305},{"type":40,"tag":244,"props":579,"children":580},{"style":270},[581],{"type":45,"value":310},{"type":40,"tag":244,"props":583,"children":584},{"class":246,"line":313},[585,589,593,597,601,605,609,613,617],{"type":40,"tag":244,"props":586,"children":587},{"style":259},[588],{"type":45,"value":262},{"type":40,"tag":244,"props":590,"children":591},{"style":270},[592],{"type":45,"value":273},{"type":40,"tag":244,"props":594,"children":595},{"style":276},[596],{"type":45,"value":327},{"type":40,"tag":244,"props":598,"children":599},{"style":270},[600],{"type":45,"value":284},{"type":40,"tag":244,"props":602,"children":603},{"style":259},[604],{"type":45,"value":289},{"type":40,"tag":244,"props":606,"children":607},{"style":270},[608],{"type":45,"value":294},{"type":40,"tag":244,"props":610,"children":611},{"style":297},[612],{"type":45,"value":146},{"type":40,"tag":244,"props":614,"children":615},{"style":270},[616],{"type":45,"value":305},{"type":40,"tag":244,"props":618,"children":619},{"style":270},[620],{"type":45,"value":310},{"type":40,"tag":244,"props":622,"children":623},{"class":246,"line":354},[624],{"type":40,"tag":244,"props":625,"children":626},{"emptyLinePlaceholder":358},[627],{"type":45,"value":361},{"type":40,"tag":244,"props":629,"children":630},{"class":246,"line":364},[631,635,639,644,648,652,656,660,664,668,672,676,680,684,688],{"type":40,"tag":244,"props":632,"children":633},{"style":259},[634],{"type":45,"value":370},{"type":40,"tag":244,"props":636,"children":637},{"style":373},[638],{"type":45,"value":376},{"type":40,"tag":244,"props":640,"children":641},{"style":276},[642],{"type":45,"value":643}," getTopProductsTool ",{"type":40,"tag":244,"props":645,"children":646},{"style":270},[647],{"type":45,"value":386},{"type":40,"tag":244,"props":649,"children":650},{"style":276},[651],{"type":45,"value":557},{"type":40,"tag":244,"props":653,"children":654},{"style":270},[655],{"type":45,"value":68},{"type":40,"tag":244,"props":657,"children":658},{"style":276},[659],{"type":45,"value":19},{"type":40,"tag":244,"props":661,"children":662},{"style":270},[663],{"type":45,"value":68},{"type":40,"tag":244,"props":665,"children":666},{"style":461},[667],{"type":45,"value":524},{"type":40,"tag":244,"props":669,"children":670},{"style":276},[671],{"type":45,"value":470},{"type":40,"tag":244,"props":673,"children":674},{"style":270},[675],{"type":45,"value":475},{"type":40,"tag":244,"props":677,"children":678},{"style":250},[679],{"type":45,"value":480},{"type":40,"tag":244,"props":681,"children":682},{"style":270},[683],{"type":45,"value":284},{"type":40,"tag":244,"props":685,"children":686},{"style":276},[687],{"type":45,"value":418},{"type":40,"tag":244,"props":689,"children":690},{"style":270},[691],{"type":45,"value":310},{"type":40,"tag":244,"props":693,"children":694},{"class":246,"line":431},[695],{"type":40,"tag":244,"props":696,"children":697},{"emptyLinePlaceholder":358},[698],{"type":45,"value":361},{"type":40,"tag":244,"props":700,"children":701},{"class":246,"line":495},[702],{"type":40,"tag":244,"props":703,"children":704},{"style":250},[705],{"type":45,"value":706},"\u002F\u002F register.ts\n",{"type":40,"tag":244,"props":708,"children":710},{"class":246,"line":709},8,[711,715,719,723,727,731,735,739,744],{"type":40,"tag":244,"props":712,"children":713},{"style":276},[714],{"type":45,"value":8},{"type":40,"tag":244,"props":716,"children":717},{"style":270},[718],{"type":45,"value":68},{"type":40,"tag":244,"props":720,"children":721},{"style":276},[722],{"type":45,"value":446},{"type":40,"tag":244,"props":724,"children":725},{"style":270},[726],{"type":45,"value":68},{"type":40,"tag":244,"props":728,"children":729},{"style":276},[730],{"type":45,"value":19},{"type":40,"tag":244,"props":732,"children":733},{"style":270},[734],{"type":45,"value":68},{"type":40,"tag":244,"props":736,"children":737},{"style":461},[738],{"type":45,"value":464},{"type":40,"tag":244,"props":740,"children":741},{"style":276},[742],{"type":45,"value":743},"(getTopProductsTool)",{"type":40,"tag":244,"props":745,"children":746},{"style":270},[747],{"type":45,"value":310},{"type":40,"tag":48,"props":749,"children":750},{},[751,753,758],{"type":45,"value":752},"Wire both from the plugin ",{"type":40,"tag":54,"props":754,"children":756},{"className":755},[],[757],{"type":45,"value":128},{"type":45,"value":400},{"type":40,"tag":233,"props":760,"children":762},{"className":235,"code":761,"language":237,"meta":238,"style":238},"\u002F\u002F register.ts\nexport const register = ({ strapi }: { strapi: Core.Strapi }) => {\n  registerGetStoreKpisTool(strapi);          \u002F\u002F inline\n  strapi.ai.mcp.registerTool(getTopProductsTool); \u002F\u002F builder\n};\n",[763],{"type":40,"tag":54,"props":764,"children":765},{"__ignoreMap":238},[766,773,845,875,928],{"type":40,"tag":244,"props":767,"children":768},{"class":246,"line":27},[769],{"type":40,"tag":244,"props":770,"children":771},{"style":250},[772],{"type":45,"value":706},{"type":40,"tag":244,"props":774,"children":775},{"class":246,"line":23},[776,780,784,789,793,798,803,808,812,816,820,824,828,832,837,841],{"type":40,"tag":244,"props":777,"children":778},{"style":259},[779],{"type":45,"value":370},{"type":40,"tag":244,"props":781,"children":782},{"style":373},[783],{"type":45,"value":376},{"type":40,"tag":244,"props":785,"children":786},{"style":276},[787],{"type":45,"value":788}," register ",{"type":40,"tag":244,"props":790,"children":791},{"style":270},[792],{"type":45,"value":386},{"type":40,"tag":244,"props":794,"children":795},{"style":270},[796],{"type":45,"value":797}," ({",{"type":40,"tag":244,"props":799,"children":800},{"style":393},[801],{"type":45,"value":802}," strapi",{"type":40,"tag":244,"props":804,"children":805},{"style":270},[806],{"type":45,"value":807}," }:",{"type":40,"tag":244,"props":809,"children":810},{"style":270},[811],{"type":45,"value":273},{"type":40,"tag":244,"props":813,"children":814},{"style":467},[815],{"type":45,"value":802},{"type":40,"tag":244,"props":817,"children":818},{"style":270},[819],{"type":45,"value":400},{"type":40,"tag":244,"props":821,"children":822},{"style":403},[823],{"type":45,"value":279},{"type":40,"tag":244,"props":825,"children":826},{"style":270},[827],{"type":45,"value":68},{"type":40,"tag":244,"props":829,"children":830},{"style":403},[831],{"type":45,"value":9},{"type":40,"tag":244,"props":833,"children":834},{"style":270},[835],{"type":45,"value":836}," })",{"type":40,"tag":244,"props":838,"children":839},{"style":373},[840],{"type":45,"value":423},{"type":40,"tag":244,"props":842,"children":843},{"style":270},[844],{"type":45,"value":428},{"type":40,"tag":244,"props":846,"children":847},{"class":246,"line":313},[848,853,857,861,865,870],{"type":40,"tag":244,"props":849,"children":850},{"style":461},[851],{"type":45,"value":852},"  registerGetStoreKpisTool",{"type":40,"tag":244,"props":854,"children":855},{"style":467},[856],{"type":45,"value":470},{"type":40,"tag":244,"props":858,"children":859},{"style":276},[860],{"type":45,"value":8},{"type":40,"tag":244,"props":862,"children":863},{"style":467},[864],{"type":45,"value":418},{"type":40,"tag":244,"props":866,"children":867},{"style":270},[868],{"type":45,"value":869},";",{"type":40,"tag":244,"props":871,"children":872},{"style":250},[873],{"type":45,"value":874},"          \u002F\u002F inline\n",{"type":40,"tag":244,"props":876,"children":877},{"class":246,"line":354},[878,882,886,890,894,898,902,906,910,915,919,923],{"type":40,"tag":244,"props":879,"children":880},{"style":276},[881],{"type":45,"value":437},{"type":40,"tag":244,"props":883,"children":884},{"style":270},[885],{"type":45,"value":68},{"type":40,"tag":244,"props":887,"children":888},{"style":276},[889],{"type":45,"value":446},{"type":40,"tag":244,"props":891,"children":892},{"style":270},[893],{"type":45,"value":68},{"type":40,"tag":244,"props":895,"children":896},{"style":276},[897],{"type":45,"value":19},{"type":40,"tag":244,"props":899,"children":900},{"style":270},[901],{"type":45,"value":68},{"type":40,"tag":244,"props":903,"children":904},{"style":461},[905],{"type":45,"value":464},{"type":40,"tag":244,"props":907,"children":908},{"style":467},[909],{"type":45,"value":470},{"type":40,"tag":244,"props":911,"children":912},{"style":276},[913],{"type":45,"value":914},"getTopProductsTool",{"type":40,"tag":244,"props":916,"children":917},{"style":467},[918],{"type":45,"value":418},{"type":40,"tag":244,"props":920,"children":921},{"style":270},[922],{"type":45,"value":869},{"type":40,"tag":244,"props":924,"children":925},{"style":250},[926],{"type":45,"value":927}," \u002F\u002F builder\n",{"type":40,"tag":244,"props":929,"children":930},{"class":246,"line":364},[931],{"type":40,"tag":244,"props":932,"children":933},{"style":270},[934],{"type":45,"value":501},{"type":40,"tag":70,"props":936,"children":938},{"id":937},"tool-definition-the-core-unit",[939],{"type":45,"value":940},"Tool definition (the core unit)",{"type":40,"tag":233,"props":942,"children":944},{"className":235,"code":943,"language":237,"meta":238,"style":238},"strapi.ai.mcp.registerTool({\n  name: 'get_store_kpis',          \u002F\u002F snake_case, unique\n  title: 'Get Store KPIs',\n  description: 'What it returns + when to use it. The AI reads this to choose the tool.',\n  auth: { policies: [{ action: 'plugin::store-analytics.read' }] }, \u002F\u002F OR devModeOnly: true\n  resolveInputSchema: () => inputSchema,   \u002F\u002F optional; omit if no args\n  resolveOutputSchema: () => outputSchema, \u002F\u002F required; a z.object\n  createHandler: (strapi, context) => async ({ args, extra }) => {\n    const result = await strapi\n      .plugin('store-analytics')\n      .service('analytics')\n      .getStoreKpis(args);\n\n    return {\n      content: [{ type: 'text', text: JSON.stringify(result, null, 2) }],\n      structuredContent: result, \u002F\u002F must match resolveOutputSchema\n    };\n  },\n});\n",[945],{"type":40,"tag":54,"props":946,"children":947},{"__ignoreMap":238},[948,988,1023,1053,1082,1157,1192,1226,1298,1327,1363,1397,1427,1435,1448,1559,1585,1594,1603],{"type":40,"tag":244,"props":949,"children":950},{"class":246,"line":27},[951,955,959,963,967,971,975,979,983],{"type":40,"tag":244,"props":952,"children":953},{"style":276},[954],{"type":45,"value":8},{"type":40,"tag":244,"props":956,"children":957},{"style":270},[958],{"type":45,"value":68},{"type":40,"tag":244,"props":960,"children":961},{"style":276},[962],{"type":45,"value":446},{"type":40,"tag":244,"props":964,"children":965},{"style":270},[966],{"type":45,"value":68},{"type":40,"tag":244,"props":968,"children":969},{"style":276},[970],{"type":45,"value":19},{"type":40,"tag":244,"props":972,"children":973},{"style":270},[974],{"type":45,"value":68},{"type":40,"tag":244,"props":976,"children":977},{"style":461},[978],{"type":45,"value":464},{"type":40,"tag":244,"props":980,"children":981},{"style":276},[982],{"type":45,"value":470},{"type":40,"tag":244,"props":984,"children":985},{"style":270},[986],{"type":45,"value":987},"{\n",{"type":40,"tag":244,"props":989,"children":990},{"class":246,"line":23},[991,996,1000,1004,1009,1013,1018],{"type":40,"tag":244,"props":992,"children":993},{"style":467},[994],{"type":45,"value":995},"  name",{"type":40,"tag":244,"props":997,"children":998},{"style":270},[999],{"type":45,"value":400},{"type":40,"tag":244,"props":1001,"children":1002},{"style":270},[1003],{"type":45,"value":294},{"type":40,"tag":244,"props":1005,"children":1006},{"style":297},[1007],{"type":45,"value":1008},"get_store_kpis",{"type":40,"tag":244,"props":1010,"children":1011},{"style":270},[1012],{"type":45,"value":305},{"type":40,"tag":244,"props":1014,"children":1015},{"style":270},[1016],{"type":45,"value":1017},",",{"type":40,"tag":244,"props":1019,"children":1020},{"style":250},[1021],{"type":45,"value":1022},"          \u002F\u002F snake_case, unique\n",{"type":40,"tag":244,"props":1024,"children":1025},{"class":246,"line":313},[1026,1031,1035,1039,1044,1048],{"type":40,"tag":244,"props":1027,"children":1028},{"style":467},[1029],{"type":45,"value":1030},"  title",{"type":40,"tag":244,"props":1032,"children":1033},{"style":270},[1034],{"type":45,"value":400},{"type":40,"tag":244,"props":1036,"children":1037},{"style":270},[1038],{"type":45,"value":294},{"type":40,"tag":244,"props":1040,"children":1041},{"style":297},[1042],{"type":45,"value":1043},"Get Store KPIs",{"type":40,"tag":244,"props":1045,"children":1046},{"style":270},[1047],{"type":45,"value":305},{"type":40,"tag":244,"props":1049,"children":1050},{"style":270},[1051],{"type":45,"value":1052},",\n",{"type":40,"tag":244,"props":1054,"children":1055},{"class":246,"line":354},[1056,1061,1065,1069,1074,1078],{"type":40,"tag":244,"props":1057,"children":1058},{"style":467},[1059],{"type":45,"value":1060},"  description",{"type":40,"tag":244,"props":1062,"children":1063},{"style":270},[1064],{"type":45,"value":400},{"type":40,"tag":244,"props":1066,"children":1067},{"style":270},[1068],{"type":45,"value":294},{"type":40,"tag":244,"props":1070,"children":1071},{"style":297},[1072],{"type":45,"value":1073},"What it returns + when to use it. The AI reads this to choose the tool.",{"type":40,"tag":244,"props":1075,"children":1076},{"style":270},[1077],{"type":45,"value":305},{"type":40,"tag":244,"props":1079,"children":1080},{"style":270},[1081],{"type":45,"value":1052},{"type":40,"tag":244,"props":1083,"children":1084},{"class":246,"line":364},[1085,1090,1094,1098,1103,1107,1112,1116,1121,1125,1129,1134,1138,1142,1147,1152],{"type":40,"tag":244,"props":1086,"children":1087},{"style":467},[1088],{"type":45,"value":1089},"  auth",{"type":40,"tag":244,"props":1091,"children":1092},{"style":270},[1093],{"type":45,"value":400},{"type":40,"tag":244,"props":1095,"children":1096},{"style":270},[1097],{"type":45,"value":273},{"type":40,"tag":244,"props":1099,"children":1100},{"style":467},[1101],{"type":45,"value":1102}," policies",{"type":40,"tag":244,"props":1104,"children":1105},{"style":270},[1106],{"type":45,"value":400},{"type":40,"tag":244,"props":1108,"children":1109},{"style":276},[1110],{"type":45,"value":1111}," [",{"type":40,"tag":244,"props":1113,"children":1114},{"style":270},[1115],{"type":45,"value":475},{"type":40,"tag":244,"props":1117,"children":1118},{"style":467},[1119],{"type":45,"value":1120}," action",{"type":40,"tag":244,"props":1122,"children":1123},{"style":270},[1124],{"type":45,"value":400},{"type":40,"tag":244,"props":1126,"children":1127},{"style":270},[1128],{"type":45,"value":294},{"type":40,"tag":244,"props":1130,"children":1131},{"style":297},[1132],{"type":45,"value":1133},"plugin::store-analytics.read",{"type":40,"tag":244,"props":1135,"children":1136},{"style":270},[1137],{"type":45,"value":305},{"type":40,"tag":244,"props":1139,"children":1140},{"style":270},[1141],{"type":45,"value":284},{"type":40,"tag":244,"props":1143,"children":1144},{"style":276},[1145],{"type":45,"value":1146},"] ",{"type":40,"tag":244,"props":1148,"children":1149},{"style":270},[1150],{"type":45,"value":1151},"},",{"type":40,"tag":244,"props":1153,"children":1154},{"style":250},[1155],{"type":45,"value":1156}," \u002F\u002F OR devModeOnly: true\n",{"type":40,"tag":244,"props":1158,"children":1159},{"class":246,"line":431},[1160,1165,1169,1174,1178,1183,1187],{"type":40,"tag":244,"props":1161,"children":1162},{"style":461},[1163],{"type":45,"value":1164},"  resolveInputSchema",{"type":40,"tag":244,"props":1166,"children":1167},{"style":270},[1168],{"type":45,"value":400},{"type":40,"tag":244,"props":1170,"children":1171},{"style":270},[1172],{"type":45,"value":1173}," ()",{"type":40,"tag":244,"props":1175,"children":1176},{"style":373},[1177],{"type":45,"value":423},{"type":40,"tag":244,"props":1179,"children":1180},{"style":276},[1181],{"type":45,"value":1182}," inputSchema",{"type":40,"tag":244,"props":1184,"children":1185},{"style":270},[1186],{"type":45,"value":1017},{"type":40,"tag":244,"props":1188,"children":1189},{"style":250},[1190],{"type":45,"value":1191},"   \u002F\u002F optional; omit if no args\n",{"type":40,"tag":244,"props":1193,"children":1194},{"class":246,"line":495},[1195,1200,1204,1208,1212,1217,1221],{"type":40,"tag":244,"props":1196,"children":1197},{"style":461},[1198],{"type":45,"value":1199},"  resolveOutputSchema",{"type":40,"tag":244,"props":1201,"children":1202},{"style":270},[1203],{"type":45,"value":400},{"type":40,"tag":244,"props":1205,"children":1206},{"style":270},[1207],{"type":45,"value":1173},{"type":40,"tag":244,"props":1209,"children":1210},{"style":373},[1211],{"type":45,"value":423},{"type":40,"tag":244,"props":1213,"children":1214},{"style":276},[1215],{"type":45,"value":1216}," outputSchema",{"type":40,"tag":244,"props":1218,"children":1219},{"style":270},[1220],{"type":45,"value":1017},{"type":40,"tag":244,"props":1222,"children":1223},{"style":250},[1224],{"type":45,"value":1225}," \u002F\u002F required; a z.object\n",{"type":40,"tag":244,"props":1227,"children":1228},{"class":246,"line":709},[1229,1234,1238,1242,1246,1250,1255,1259,1263,1268,1272,1277,1281,1286,1290,1294],{"type":40,"tag":244,"props":1230,"children":1231},{"style":461},[1232],{"type":45,"value":1233},"  createHandler",{"type":40,"tag":244,"props":1235,"children":1236},{"style":270},[1237],{"type":45,"value":400},{"type":40,"tag":244,"props":1239,"children":1240},{"style":270},[1241],{"type":45,"value":148},{"type":40,"tag":244,"props":1243,"children":1244},{"style":393},[1245],{"type":45,"value":8},{"type":40,"tag":244,"props":1247,"children":1248},{"style":270},[1249],{"type":45,"value":1017},{"type":40,"tag":244,"props":1251,"children":1252},{"style":393},[1253],{"type":45,"value":1254}," context",{"type":40,"tag":244,"props":1256,"children":1257},{"style":270},[1258],{"type":45,"value":418},{"type":40,"tag":244,"props":1260,"children":1261},{"style":373},[1262],{"type":45,"value":423},{"type":40,"tag":244,"props":1264,"children":1265},{"style":373},[1266],{"type":45,"value":1267}," async",{"type":40,"tag":244,"props":1269,"children":1270},{"style":270},[1271],{"type":45,"value":797},{"type":40,"tag":244,"props":1273,"children":1274},{"style":393},[1275],{"type":45,"value":1276}," args",{"type":40,"tag":244,"props":1278,"children":1279},{"style":270},[1280],{"type":45,"value":1017},{"type":40,"tag":244,"props":1282,"children":1283},{"style":393},[1284],{"type":45,"value":1285}," extra",{"type":40,"tag":244,"props":1287,"children":1288},{"style":270},[1289],{"type":45,"value":836},{"type":40,"tag":244,"props":1291,"children":1292},{"style":373},[1293],{"type":45,"value":423},{"type":40,"tag":244,"props":1295,"children":1296},{"style":270},[1297],{"type":45,"value":428},{"type":40,"tag":244,"props":1299,"children":1301},{"class":246,"line":1300},9,[1302,1307,1312,1317,1322],{"type":40,"tag":244,"props":1303,"children":1304},{"style":373},[1305],{"type":45,"value":1306},"    const",{"type":40,"tag":244,"props":1308,"children":1309},{"style":276},[1310],{"type":45,"value":1311}," result",{"type":40,"tag":244,"props":1313,"children":1314},{"style":270},[1315],{"type":45,"value":1316}," =",{"type":40,"tag":244,"props":1318,"children":1319},{"style":259},[1320],{"type":45,"value":1321}," await",{"type":40,"tag":244,"props":1323,"children":1324},{"style":276},[1325],{"type":45,"value":1326}," strapi\n",{"type":40,"tag":244,"props":1328,"children":1330},{"class":246,"line":1329},10,[1331,1336,1341,1345,1349,1354,1358],{"type":40,"tag":244,"props":1332,"children":1333},{"style":270},[1334],{"type":45,"value":1335},"      .",{"type":40,"tag":244,"props":1337,"children":1338},{"style":461},[1339],{"type":45,"value":1340},"plugin",{"type":40,"tag":244,"props":1342,"children":1343},{"style":467},[1344],{"type":45,"value":470},{"type":40,"tag":244,"props":1346,"children":1347},{"style":270},[1348],{"type":45,"value":305},{"type":40,"tag":244,"props":1350,"children":1351},{"style":297},[1352],{"type":45,"value":1353},"store-analytics",{"type":40,"tag":244,"props":1355,"children":1356},{"style":270},[1357],{"type":45,"value":305},{"type":40,"tag":244,"props":1359,"children":1360},{"style":467},[1361],{"type":45,"value":1362},")\n",{"type":40,"tag":244,"props":1364,"children":1366},{"class":246,"line":1365},11,[1367,1371,1376,1380,1384,1389,1393],{"type":40,"tag":244,"props":1368,"children":1369},{"style":270},[1370],{"type":45,"value":1335},{"type":40,"tag":244,"props":1372,"children":1373},{"style":461},[1374],{"type":45,"value":1375},"service",{"type":40,"tag":244,"props":1377,"children":1378},{"style":467},[1379],{"type":45,"value":470},{"type":40,"tag":244,"props":1381,"children":1382},{"style":270},[1383],{"type":45,"value":305},{"type":40,"tag":244,"props":1385,"children":1386},{"style":297},[1387],{"type":45,"value":1388},"analytics",{"type":40,"tag":244,"props":1390,"children":1391},{"style":270},[1392],{"type":45,"value":305},{"type":40,"tag":244,"props":1394,"children":1395},{"style":467},[1396],{"type":45,"value":1362},{"type":40,"tag":244,"props":1398,"children":1400},{"class":246,"line":1399},12,[1401,1405,1410,1414,1419,1423],{"type":40,"tag":244,"props":1402,"children":1403},{"style":270},[1404],{"type":45,"value":1335},{"type":40,"tag":244,"props":1406,"children":1407},{"style":461},[1408],{"type":45,"value":1409},"getStoreKpis",{"type":40,"tag":244,"props":1411,"children":1412},{"style":467},[1413],{"type":45,"value":470},{"type":40,"tag":244,"props":1415,"children":1416},{"style":276},[1417],{"type":45,"value":1418},"args",{"type":40,"tag":244,"props":1420,"children":1421},{"style":467},[1422],{"type":45,"value":418},{"type":40,"tag":244,"props":1424,"children":1425},{"style":270},[1426],{"type":45,"value":310},{"type":40,"tag":244,"props":1428,"children":1430},{"class":246,"line":1429},13,[1431],{"type":40,"tag":244,"props":1432,"children":1433},{"emptyLinePlaceholder":358},[1434],{"type":45,"value":361},{"type":40,"tag":244,"props":1436,"children":1438},{"class":246,"line":1437},14,[1439,1444],{"type":40,"tag":244,"props":1440,"children":1441},{"style":259},[1442],{"type":45,"value":1443},"    return",{"type":40,"tag":244,"props":1445,"children":1446},{"style":270},[1447],{"type":45,"value":428},{"type":40,"tag":244,"props":1449,"children":1451},{"class":246,"line":1450},15,[1452,1457,1461,1465,1469,1473,1477,1481,1485,1489,1493,1498,1502,1507,1511,1516,1520,1525,1529,1534,1540,1545,1550,1555],{"type":40,"tag":244,"props":1453,"children":1454},{"style":467},[1455],{"type":45,"value":1456},"      content",{"type":40,"tag":244,"props":1458,"children":1459},{"style":270},[1460],{"type":45,"value":400},{"type":40,"tag":244,"props":1462,"children":1463},{"style":467},[1464],{"type":45,"value":1111},{"type":40,"tag":244,"props":1466,"children":1467},{"style":270},[1468],{"type":45,"value":475},{"type":40,"tag":244,"props":1470,"children":1471},{"style":467},[1472],{"type":45,"value":267},{"type":40,"tag":244,"props":1474,"children":1475},{"style":270},[1476],{"type":45,"value":400},{"type":40,"tag":244,"props":1478,"children":1479},{"style":270},[1480],{"type":45,"value":294},{"type":40,"tag":244,"props":1482,"children":1483},{"style":297},[1484],{"type":45,"value":45},{"type":40,"tag":244,"props":1486,"children":1487},{"style":270},[1488],{"type":45,"value":305},{"type":40,"tag":244,"props":1490,"children":1491},{"style":270},[1492],{"type":45,"value":1017},{"type":40,"tag":244,"props":1494,"children":1495},{"style":467},[1496],{"type":45,"value":1497}," text",{"type":40,"tag":244,"props":1499,"children":1500},{"style":270},[1501],{"type":45,"value":400},{"type":40,"tag":244,"props":1503,"children":1504},{"style":276},[1505],{"type":45,"value":1506}," JSON",{"type":40,"tag":244,"props":1508,"children":1509},{"style":270},[1510],{"type":45,"value":68},{"type":40,"tag":244,"props":1512,"children":1513},{"style":461},[1514],{"type":45,"value":1515},"stringify",{"type":40,"tag":244,"props":1517,"children":1518},{"style":467},[1519],{"type":45,"value":470},{"type":40,"tag":244,"props":1521,"children":1522},{"style":276},[1523],{"type":45,"value":1524},"result",{"type":40,"tag":244,"props":1526,"children":1527},{"style":270},[1528],{"type":45,"value":1017},{"type":40,"tag":244,"props":1530,"children":1531},{"style":270},[1532],{"type":45,"value":1533}," null,",{"type":40,"tag":244,"props":1535,"children":1537},{"style":1536},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1538],{"type":45,"value":1539}," 2",{"type":40,"tag":244,"props":1541,"children":1542},{"style":467},[1543],{"type":45,"value":1544},") ",{"type":40,"tag":244,"props":1546,"children":1547},{"style":270},[1548],{"type":45,"value":1549},"}",{"type":40,"tag":244,"props":1551,"children":1552},{"style":467},[1553],{"type":45,"value":1554},"]",{"type":40,"tag":244,"props":1556,"children":1557},{"style":270},[1558],{"type":45,"value":1052},{"type":40,"tag":244,"props":1560,"children":1562},{"class":246,"line":1561},16,[1563,1568,1572,1576,1580],{"type":40,"tag":244,"props":1564,"children":1565},{"style":467},[1566],{"type":45,"value":1567},"      structuredContent",{"type":40,"tag":244,"props":1569,"children":1570},{"style":270},[1571],{"type":45,"value":400},{"type":40,"tag":244,"props":1573,"children":1574},{"style":276},[1575],{"type":45,"value":1311},{"type":40,"tag":244,"props":1577,"children":1578},{"style":270},[1579],{"type":45,"value":1017},{"type":40,"tag":244,"props":1581,"children":1582},{"style":250},[1583],{"type":45,"value":1584}," \u002F\u002F must match resolveOutputSchema\n",{"type":40,"tag":244,"props":1586,"children":1588},{"class":246,"line":1587},17,[1589],{"type":40,"tag":244,"props":1590,"children":1591},{"style":270},[1592],{"type":45,"value":1593},"    };\n",{"type":40,"tag":244,"props":1595,"children":1597},{"class":246,"line":1596},18,[1598],{"type":40,"tag":244,"props":1599,"children":1600},{"style":270},[1601],{"type":45,"value":1602},"  },\n",{"type":40,"tag":244,"props":1604,"children":1606},{"class":246,"line":1605},19,[1607,1611,1615],{"type":40,"tag":244,"props":1608,"children":1609},{"style":270},[1610],{"type":45,"value":1549},{"type":40,"tag":244,"props":1612,"children":1613},{"style":276},[1614],{"type":45,"value":418},{"type":40,"tag":244,"props":1616,"children":1617},{"style":270},[1618],{"type":45,"value":310},{"type":40,"tag":48,"props":1620,"children":1621},{},[1622],{"type":45,"value":1623},"Key points:",{"type":40,"tag":1625,"props":1626,"children":1627},"ul",{},[1628,1676,1711,1722],{"type":40,"tag":81,"props":1629,"children":1630},{},[1631,1637,1639,1645,1647,1652,1654,1660,1662,1668,1670,1675],{"type":40,"tag":54,"props":1632,"children":1634},{"className":1633},[],[1635],{"type":45,"value":1636},"createHandler(strapi, context) => handler",{"type":45,"value":1638},". The handler receives a single object ",{"type":40,"tag":54,"props":1640,"children":1642},{"className":1641},[],[1643],{"type":45,"value":1644},"{ args, extra }",{"type":45,"value":1646},". ",{"type":40,"tag":54,"props":1648,"children":1650},{"className":1649},[],[1651],{"type":45,"value":1418},{"type":45,"value":1653}," is ",{"type":40,"tag":54,"props":1655,"children":1657},{"className":1656},[],[1658],{"type":45,"value":1659},"z.infer\u003CinputSchema>",{"type":45,"value":1661}," (typed); if no ",{"type":40,"tag":54,"props":1663,"children":1665},{"className":1664},[],[1666],{"type":45,"value":1667},"resolveInputSchema",{"type":45,"value":1669},", omit ",{"type":40,"tag":54,"props":1671,"children":1673},{"className":1672},[],[1674],{"type":45,"value":1418},{"type":45,"value":68},{"type":40,"tag":81,"props":1677,"children":1678},{},[1679,1685,1687,1693,1695,1701,1703,1709],{"type":40,"tag":54,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":45,"value":1684},"context: { userAbility, user }",{"type":45,"value":1686}," — use ",{"type":40,"tag":54,"props":1688,"children":1690},{"className":1689},[],[1691],{"type":45,"value":1692},"userAbility",{"type":45,"value":1694}," for entity\u002Ffield permission checks and ",{"type":40,"tag":54,"props":1696,"children":1698},{"className":1697},[],[1699],{"type":45,"value":1700},"user",{"type":45,"value":1702}," (token owner) for ",{"type":40,"tag":54,"props":1704,"children":1706},{"className":1705},[],[1707],{"type":45,"value":1708},"setCreatorFields",{"type":45,"value":1710}," on writes.",{"type":40,"tag":81,"props":1712,"children":1713},{},[1714,1716,1720],{"type":45,"value":1715},"Keep handlers thin: delegate to a plugin ",{"type":40,"tag":85,"props":1717,"children":1718},{},[1719],{"type":45,"value":1375},{"type":45,"value":1721},"; the tool is just the MCP surface.",{"type":40,"tag":81,"props":1723,"children":1724},{},[1725,1731,1733,1739,1740,1746,1747,1753,1755,1760],{"type":40,"tag":54,"props":1726,"children":1728},{"className":1727},[],[1729],{"type":45,"value":1730},"name",{"type":45,"value":1732},"\u002F",{"type":40,"tag":54,"props":1734,"children":1736},{"className":1735},[],[1737],{"type":45,"value":1738},"title",{"type":45,"value":1732},{"type":40,"tag":54,"props":1741,"children":1743},{"className":1742},[],[1744],{"type":45,"value":1745},"description",{"type":45,"value":1732},{"type":40,"tag":54,"props":1748,"children":1750},{"className":1749},[],[1751],{"type":45,"value":1752},"resolveOutputSchema",{"type":45,"value":1754}," are required. ",{"type":40,"tag":54,"props":1756,"children":1758},{"className":1757},[],[1759],{"type":45,"value":1745},{"type":45,"value":1761}," quality drives AI tool selection — state what it returns and when to use it.",{"type":40,"tag":70,"props":1763,"children":1765},{"id":1764},"schemas",[1766],{"type":45,"value":1767},"Schemas",{"type":40,"tag":1625,"props":1769,"children":1770},{},[1771,1800,1811],{"type":40,"tag":81,"props":1772,"children":1773},{},[1774,1776,1782,1784,1790,1792,1798],{"type":45,"value":1775},"Define ",{"type":40,"tag":54,"props":1777,"children":1779},{"className":1778},[],[1780],{"type":45,"value":1781},"z.object",{"type":45,"value":1783}," input\u002Foutput schemas; reuse shared field schemas (e.g. an ",{"type":40,"tag":54,"props":1785,"children":1787},{"className":1786},[],[1788],{"type":45,"value":1789},"isoDateSchema",{"type":45,"value":1791}," with ",{"type":40,"tag":54,"props":1793,"children":1795},{"className":1794},[],[1796],{"type":45,"value":1797},".describe(...)",{"type":45,"value":1799},").",{"type":40,"tag":81,"props":1801,"children":1802},{},[1803,1809],{"type":40,"tag":54,"props":1804,"children":1806},{"className":1805},[],[1807],{"type":45,"value":1808},".describe()",{"type":45,"value":1810}," every non-obvious field — descriptions reach the AI client.",{"type":40,"tag":81,"props":1812,"children":1813},{},[1814,1820,1822,1827],{"type":40,"tag":54,"props":1815,"children":1817},{"className":1816},[],[1818],{"type":45,"value":1819},"structuredContent",{"type":45,"value":1821}," returned by the handler must satisfy ",{"type":40,"tag":54,"props":1823,"children":1825},{"className":1824},[],[1826],{"type":45,"value":1752},{"type":45,"value":68},{"type":40,"tag":70,"props":1829,"children":1831},{"id":1830},"auth-choose-exactly-one-access-variant",[1832],{"type":45,"value":1833},"Auth (choose exactly one access variant)",{"type":40,"tag":1625,"props":1835,"children":1836},{},[1837,1870],{"type":40,"tag":81,"props":1838,"children":1839},{},[1840,1846,1848,1853,1855,1861,1863,1869],{"type":40,"tag":54,"props":1841,"children":1843},{"className":1842},[],[1844],{"type":45,"value":1845},"auth: { policies: [{ action, subject? }] }",{"type":45,"value":1847}," — CASL check; session passes if the token's ability satisfies ",{"type":40,"tag":85,"props":1849,"children":1850},{},[1851],{"type":45,"value":1852},"any",{"type":45,"value":1854}," policy. ",{"type":40,"tag":54,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":45,"value":1860},"action",{"type":45,"value":1862}," is typically a registered admin permission, e.g. ",{"type":40,"tag":54,"props":1864,"children":1866},{"className":1865},[],[1867],{"type":45,"value":1868},"plugin::\u003Cplugin-id>.\u003Cpermission>",{"type":45,"value":68},{"type":40,"tag":81,"props":1871,"children":1872},{},[1873,1879,1881,1887],{"type":40,"tag":54,"props":1874,"children":1876},{"className":1875},[],[1877],{"type":45,"value":1878},"devModeOnly: true",{"type":45,"value":1880}," — no auth; only available when ",{"type":40,"tag":54,"props":1882,"children":1884},{"className":1883},[],[1885],{"type":45,"value":1886},"autoReload",{"type":45,"value":1888}," is on (dev). Use for debug tools.",{"type":40,"tag":48,"props":1890,"children":1891},{},[1892,1894,1900,1902,1908],{"type":45,"value":1893},"For ",{"type":40,"tag":54,"props":1895,"children":1897},{"className":1896},[],[1898],{"type":45,"value":1899},"auth",{"type":45,"value":1901}," to be grantable to a token, register the permission action in ",{"type":40,"tag":54,"props":1903,"children":1905},{"className":1904},[],[1906],{"type":45,"value":1907},"bootstrap()",{"type":45,"value":400},{"type":40,"tag":233,"props":1910,"children":1912},{"className":235,"code":1911,"language":237,"meta":238,"style":238},"await strapi.service('admin::permission').actionProvider.registerMany([\n  { section: 'plugins', displayName: 'Access store analytics',\n    uid: 'read', pluginName: 'store-analytics' },\n]);\n\u002F\u002F → action becomes 'plugin::store-analytics.read'\n",[1913],{"type":40,"tag":54,"props":1914,"children":1915},{"__ignoreMap":238},[1916,1980,2040,2095,2107],{"type":40,"tag":244,"props":1917,"children":1918},{"class":246,"line":27},[1919,1924,1928,1932,1936,1940,1944,1949,1953,1957,1961,1966,1970,1975],{"type":40,"tag":244,"props":1920,"children":1921},{"style":259},[1922],{"type":45,"value":1923},"await",{"type":40,"tag":244,"props":1925,"children":1926},{"style":276},[1927],{"type":45,"value":802},{"type":40,"tag":244,"props":1929,"children":1930},{"style":270},[1931],{"type":45,"value":68},{"type":40,"tag":244,"props":1933,"children":1934},{"style":461},[1935],{"type":45,"value":1375},{"type":40,"tag":244,"props":1937,"children":1938},{"style":276},[1939],{"type":45,"value":470},{"type":40,"tag":244,"props":1941,"children":1942},{"style":270},[1943],{"type":45,"value":305},{"type":40,"tag":244,"props":1945,"children":1946},{"style":297},[1947],{"type":45,"value":1948},"admin::permission",{"type":40,"tag":244,"props":1950,"children":1951},{"style":270},[1952],{"type":45,"value":305},{"type":40,"tag":244,"props":1954,"children":1955},{"style":276},[1956],{"type":45,"value":418},{"type":40,"tag":244,"props":1958,"children":1959},{"style":270},[1960],{"type":45,"value":68},{"type":40,"tag":244,"props":1962,"children":1963},{"style":276},[1964],{"type":45,"value":1965},"actionProvider",{"type":40,"tag":244,"props":1967,"children":1968},{"style":270},[1969],{"type":45,"value":68},{"type":40,"tag":244,"props":1971,"children":1972},{"style":461},[1973],{"type":45,"value":1974},"registerMany",{"type":40,"tag":244,"props":1976,"children":1977},{"style":276},[1978],{"type":45,"value":1979},"([\n",{"type":40,"tag":244,"props":1981,"children":1982},{"class":246,"line":23},[1983,1988,1993,1997,2001,2006,2010,2014,2019,2023,2027,2032,2036],{"type":40,"tag":244,"props":1984,"children":1985},{"style":270},[1986],{"type":45,"value":1987},"  {",{"type":40,"tag":244,"props":1989,"children":1990},{"style":467},[1991],{"type":45,"value":1992}," section",{"type":40,"tag":244,"props":1994,"children":1995},{"style":270},[1996],{"type":45,"value":400},{"type":40,"tag":244,"props":1998,"children":1999},{"style":270},[2000],{"type":45,"value":294},{"type":40,"tag":244,"props":2002,"children":2003},{"style":297},[2004],{"type":45,"value":2005},"plugins",{"type":40,"tag":244,"props":2007,"children":2008},{"style":270},[2009],{"type":45,"value":305},{"type":40,"tag":244,"props":2011,"children":2012},{"style":270},[2013],{"type":45,"value":1017},{"type":40,"tag":244,"props":2015,"children":2016},{"style":467},[2017],{"type":45,"value":2018}," displayName",{"type":40,"tag":244,"props":2020,"children":2021},{"style":270},[2022],{"type":45,"value":400},{"type":40,"tag":244,"props":2024,"children":2025},{"style":270},[2026],{"type":45,"value":294},{"type":40,"tag":244,"props":2028,"children":2029},{"style":297},[2030],{"type":45,"value":2031},"Access store analytics",{"type":40,"tag":244,"props":2033,"children":2034},{"style":270},[2035],{"type":45,"value":305},{"type":40,"tag":244,"props":2037,"children":2038},{"style":270},[2039],{"type":45,"value":1052},{"type":40,"tag":244,"props":2041,"children":2042},{"class":246,"line":313},[2043,2048,2052,2056,2061,2065,2069,2074,2078,2082,2086,2090],{"type":40,"tag":244,"props":2044,"children":2045},{"style":467},[2046],{"type":45,"value":2047},"    uid",{"type":40,"tag":244,"props":2049,"children":2050},{"style":270},[2051],{"type":45,"value":400},{"type":40,"tag":244,"props":2053,"children":2054},{"style":270},[2055],{"type":45,"value":294},{"type":40,"tag":244,"props":2057,"children":2058},{"style":297},[2059],{"type":45,"value":2060},"read",{"type":40,"tag":244,"props":2062,"children":2063},{"style":270},[2064],{"type":45,"value":305},{"type":40,"tag":244,"props":2066,"children":2067},{"style":270},[2068],{"type":45,"value":1017},{"type":40,"tag":244,"props":2070,"children":2071},{"style":467},[2072],{"type":45,"value":2073}," pluginName",{"type":40,"tag":244,"props":2075,"children":2076},{"style":270},[2077],{"type":45,"value":400},{"type":40,"tag":244,"props":2079,"children":2080},{"style":270},[2081],{"type":45,"value":294},{"type":40,"tag":244,"props":2083,"children":2084},{"style":297},[2085],{"type":45,"value":1353},{"type":40,"tag":244,"props":2087,"children":2088},{"style":270},[2089],{"type":45,"value":305},{"type":40,"tag":244,"props":2091,"children":2092},{"style":270},[2093],{"type":45,"value":2094}," },\n",{"type":40,"tag":244,"props":2096,"children":2097},{"class":246,"line":354},[2098,2103],{"type":40,"tag":244,"props":2099,"children":2100},{"style":276},[2101],{"type":45,"value":2102},"])",{"type":40,"tag":244,"props":2104,"children":2105},{"style":270},[2106],{"type":45,"value":310},{"type":40,"tag":244,"props":2108,"children":2109},{"class":246,"line":364},[2110],{"type":40,"tag":244,"props":2111,"children":2112},{"style":250},[2113],{"type":45,"value":2114},"\u002F\u002F → action becomes 'plugin::store-analytics.read'\n",{"type":40,"tag":70,"props":2116,"children":2118},{"id":2117},"handler-return-shape",[2119],{"type":45,"value":2120},"Handler return shape",{"type":40,"tag":233,"props":2122,"children":2124},{"className":235,"code":2123,"language":237,"meta":238,"style":238},"\u002F\u002F success\nreturn { content: [{ type: 'text', text }], structuredContent: result };\n\u002F\u002F error\nreturn { content: [{ type: 'text', text: 'message' }], isError: true };\n",[2125],{"type":40,"tag":54,"props":2126,"children":2127},{"__ignoreMap":238},[2128,2136,2224,2232],{"type":40,"tag":244,"props":2129,"children":2130},{"class":246,"line":27},[2131],{"type":40,"tag":244,"props":2132,"children":2133},{"style":250},[2134],{"type":45,"value":2135},"\u002F\u002F success\n",{"type":40,"tag":244,"props":2137,"children":2138},{"class":246,"line":23},[2139,2144,2148,2153,2157,2161,2165,2169,2173,2177,2181,2185,2189,2194,2198,2202,2206,2211,2215,2220],{"type":40,"tag":244,"props":2140,"children":2141},{"style":259},[2142],{"type":45,"value":2143},"return",{"type":40,"tag":244,"props":2145,"children":2146},{"style":270},[2147],{"type":45,"value":273},{"type":40,"tag":244,"props":2149,"children":2150},{"style":467},[2151],{"type":45,"value":2152}," content",{"type":40,"tag":244,"props":2154,"children":2155},{"style":270},[2156],{"type":45,"value":400},{"type":40,"tag":244,"props":2158,"children":2159},{"style":276},[2160],{"type":45,"value":1111},{"type":40,"tag":244,"props":2162,"children":2163},{"style":270},[2164],{"type":45,"value":475},{"type":40,"tag":244,"props":2166,"children":2167},{"style":467},[2168],{"type":45,"value":267},{"type":40,"tag":244,"props":2170,"children":2171},{"style":270},[2172],{"type":45,"value":400},{"type":40,"tag":244,"props":2174,"children":2175},{"style":270},[2176],{"type":45,"value":294},{"type":40,"tag":244,"props":2178,"children":2179},{"style":297},[2180],{"type":45,"value":45},{"type":40,"tag":244,"props":2182,"children":2183},{"style":270},[2184],{"type":45,"value":305},{"type":40,"tag":244,"props":2186,"children":2187},{"style":270},[2188],{"type":45,"value":1017},{"type":40,"tag":244,"props":2190,"children":2191},{"style":276},[2192],{"type":45,"value":2193}," text ",{"type":40,"tag":244,"props":2195,"children":2196},{"style":270},[2197],{"type":45,"value":1549},{"type":40,"tag":244,"props":2199,"children":2200},{"style":276},[2201],{"type":45,"value":1554},{"type":40,"tag":244,"props":2203,"children":2204},{"style":270},[2205],{"type":45,"value":1017},{"type":40,"tag":244,"props":2207,"children":2208},{"style":467},[2209],{"type":45,"value":2210}," structuredContent",{"type":40,"tag":244,"props":2212,"children":2213},{"style":270},[2214],{"type":45,"value":400},{"type":40,"tag":244,"props":2216,"children":2217},{"style":276},[2218],{"type":45,"value":2219}," result ",{"type":40,"tag":244,"props":2221,"children":2222},{"style":270},[2223],{"type":45,"value":501},{"type":40,"tag":244,"props":2225,"children":2226},{"class":246,"line":313},[2227],{"type":40,"tag":244,"props":2228,"children":2229},{"style":250},[2230],{"type":45,"value":2231},"\u002F\u002F error\n",{"type":40,"tag":244,"props":2233,"children":2234},{"class":246,"line":354},[2235,2239,2243,2247,2251,2255,2259,2263,2267,2271,2275,2279,2283,2287,2291,2295,2300,2304,2308,2312,2316,2321,2325,2331],{"type":40,"tag":244,"props":2236,"children":2237},{"style":259},[2238],{"type":45,"value":2143},{"type":40,"tag":244,"props":2240,"children":2241},{"style":270},[2242],{"type":45,"value":273},{"type":40,"tag":244,"props":2244,"children":2245},{"style":467},[2246],{"type":45,"value":2152},{"type":40,"tag":244,"props":2248,"children":2249},{"style":270},[2250],{"type":45,"value":400},{"type":40,"tag":244,"props":2252,"children":2253},{"style":276},[2254],{"type":45,"value":1111},{"type":40,"tag":244,"props":2256,"children":2257},{"style":270},[2258],{"type":45,"value":475},{"type":40,"tag":244,"props":2260,"children":2261},{"style":467},[2262],{"type":45,"value":267},{"type":40,"tag":244,"props":2264,"children":2265},{"style":270},[2266],{"type":45,"value":400},{"type":40,"tag":244,"props":2268,"children":2269},{"style":270},[2270],{"type":45,"value":294},{"type":40,"tag":244,"props":2272,"children":2273},{"style":297},[2274],{"type":45,"value":45},{"type":40,"tag":244,"props":2276,"children":2277},{"style":270},[2278],{"type":45,"value":305},{"type":40,"tag":244,"props":2280,"children":2281},{"style":270},[2282],{"type":45,"value":1017},{"type":40,"tag":244,"props":2284,"children":2285},{"style":467},[2286],{"type":45,"value":1497},{"type":40,"tag":244,"props":2288,"children":2289},{"style":270},[2290],{"type":45,"value":400},{"type":40,"tag":244,"props":2292,"children":2293},{"style":270},[2294],{"type":45,"value":294},{"type":40,"tag":244,"props":2296,"children":2297},{"style":297},[2298],{"type":45,"value":2299},"message",{"type":40,"tag":244,"props":2301,"children":2302},{"style":270},[2303],{"type":45,"value":305},{"type":40,"tag":244,"props":2305,"children":2306},{"style":270},[2307],{"type":45,"value":284},{"type":40,"tag":244,"props":2309,"children":2310},{"style":276},[2311],{"type":45,"value":1554},{"type":40,"tag":244,"props":2313,"children":2314},{"style":270},[2315],{"type":45,"value":1017},{"type":40,"tag":244,"props":2317,"children":2318},{"style":467},[2319],{"type":45,"value":2320}," isError",{"type":40,"tag":244,"props":2322,"children":2323},{"style":270},[2324],{"type":45,"value":400},{"type":40,"tag":244,"props":2326,"children":2328},{"style":2327},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[2329],{"type":45,"value":2330}," true",{"type":40,"tag":244,"props":2332,"children":2333},{"style":270},[2334],{"type":45,"value":2335}," };\n",{"type":40,"tag":48,"props":2337,"children":2338},{},[2339,2344,2346,2352],{"type":40,"tag":54,"props":2340,"children":2342},{"className":2341},[],[2343],{"type":45,"value":1819},{"type":45,"value":2345}," and ",{"type":40,"tag":54,"props":2347,"children":2349},{"className":2348},[],[2350],{"type":45,"value":2351},"isError",{"type":45,"value":2353}," are mutually exclusive.",{"type":40,"tag":70,"props":2355,"children":2357},{"id":2356},"folder-convention",[2358],{"type":45,"value":2359},"Folder convention",{"type":40,"tag":233,"props":2361,"children":2365},{"className":2362,"code":2364,"language":45},[2363],"language-text","server\u002Fsrc\u002F\n├── register.ts            # calls registrations (register phase only)\n├── bootstrap.ts           # registerMany permission actions\n├── mcp\u002F\n│   ├── index.ts           # registerAllMcpTools(strapi)\n│   ├── schemas.ts         # shared zod field schemas\n│   └── tools\u002F\u003Ctool>.ts    # one capability per file\n└── services\u002F              # business logic the handlers call\n",[2366],{"type":40,"tag":54,"props":2367,"children":2368},{"__ignoreMap":238},[2369],{"type":45,"value":2364},{"type":40,"tag":70,"props":2371,"children":2373},{"id":2372},"verify",[2374],{"type":45,"value":2375},"Verify",{"type":40,"tag":77,"props":2377,"children":2378},{},[2379,2396,2423],{"type":40,"tag":81,"props":2380,"children":2381},{},[2382,2387,2389,2394],{"type":40,"tag":54,"props":2383,"children":2385},{"className":2384},[],[2386],{"type":45,"value":105},{"type":45,"value":2388}," in ",{"type":40,"tag":54,"props":2390,"children":2392},{"className":2391},[],[2393],{"type":45,"value":97},{"type":45,"value":2395},"; restart Strapi.",{"type":40,"tag":81,"props":2397,"children":2398},{},[2399,2401,2407,2408,2414,2416,2421],{"type":45,"value":2400},"Connect a client to ",{"type":40,"tag":54,"props":2402,"children":2404},{"className":2403},[],[2405],{"type":45,"value":2406},"http:\u002F\u002Flocalhost:1337\u002Fmcp",{"type":45,"value":1791},{"type":40,"tag":54,"props":2409,"children":2411},{"className":2410},[],[2412],{"type":45,"value":2413},"Authorization: Bearer \u003Cadmin-token>",{"type":45,"value":2415}," whose permissions include the tool's ",{"type":40,"tag":54,"props":2417,"children":2419},{"className":2418},[],[2420],{"type":45,"value":1899},{"type":45,"value":2422}," action.",{"type":40,"tag":81,"props":2424,"children":2425},{},[2426,2428,2433],{"type":45,"value":2427},"Confirm the tool appears and returns ",{"type":40,"tag":54,"props":2429,"children":2431},{"className":2430},[],[2432],{"type":45,"value":1819},{"type":45,"value":2434}," matching its output schema.",{"type":40,"tag":70,"props":2436,"children":2438},{"id":2437},"prompts-resources",[2439],{"type":45,"value":2440},"Prompts & resources",{"type":40,"tag":48,"props":2442,"children":2443},{},[2444,2446,2452,2454,2460,2461,2467,2468,2474,2476,2482],{"type":45,"value":2445},"Same lifecycle\u002Fauth rules, different builders: ",{"type":40,"tag":54,"props":2447,"children":2449},{"className":2448},[],[2450],{"type":45,"value":2451},"ai.mcp.definePrompt",{"type":45,"value":2453}," \u002F ",{"type":40,"tag":54,"props":2455,"children":2457},{"className":2456},[],[2458],{"type":45,"value":2459},"strapi.ai.mcp.registerPrompt",{"type":45,"value":2345},{"type":40,"tag":54,"props":2462,"children":2464},{"className":2463},[],[2465],{"type":45,"value":2466},"ai.mcp.defineResource",{"type":45,"value":2453},{"type":40,"tag":54,"props":2469,"children":2471},{"className":2470},[],[2472],{"type":45,"value":2473},"strapi.ai.mcp.registerResource",{"type":45,"value":2475},". See ",{"type":40,"tag":2477,"props":2478,"children":2480},"a",{"href":2479},"reference.md",[2481],{"type":45,"value":2479},{"type":45,"value":2483}," for their field tables and signatures.",{"type":40,"tag":70,"props":2485,"children":2487},{"id":2486},"docs",[2488],{"type":45,"value":2489},"Docs",{"type":40,"tag":1625,"props":2491,"children":2492},{},[2493,2506],{"type":40,"tag":81,"props":2494,"children":2495},{},[2496,2504],{"type":40,"tag":2477,"props":2497,"children":2501},{"href":2498,"rel":2499},"https:\u002F\u002Fdocs.strapi.io\u002Fcms\u002Ffeatures\u002Fstrapi-mcp-server",[2500],"nofollow",[2502],{"type":45,"value":2503},"MCP server",{"type":45,"value":2505}," (config, permission boundaries, stateless architecture, limitations)",{"type":40,"tag":81,"props":2507,"children":2508},{},[2509,2511],{"type":45,"value":2510},"API types: ",{"type":40,"tag":54,"props":2512,"children":2514},{"className":2513},[],[2515],{"type":45,"value":59},{"type":40,"tag":2517,"props":2518,"children":2519},"style",{},[2520],{"type":45,"value":2521},"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);}",{"items":2523,"total":313},[2524,2539,2546],{"slug":2525,"name":2525,"fn":2526,"description":2527,"org":2528,"tags":2529,"stars":23,"repoUrl":24,"updatedAt":2538},"strapi-docs-mcp","search Strapi documentation","Query the official Strapi documentation through the strapi-docs MCP server (powered by Kapa). Use for any Strapi question — API syntax, configuration, features, plugins, upgrades, CLI. If the server is missing, instruct the user how to install it.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2530,2531,2534,2537],{"name":15,"slug":16,"type":13},{"name":2532,"slug":2533,"type":13},"Documentation","documentation",{"name":2535,"slug":2536,"type":13},"Reference","reference",{"name":9,"slug":8,"type":13},"2026-07-16T06:00:16.355045",{"slug":4,"name":4,"fn":5,"description":6,"org":2540,"tags":2541,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2542,2543,2544,2545],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":21,"slug":22,"type":13},{"name":9,"slug":8,"type":13},{"slug":2547,"name":2547,"fn":2548,"description":2549,"org":2550,"tags":2551,"stars":23,"repoUrl":24,"updatedAt":2557},"strapi-version-upgrade","upgrade Strapi applications to new versions","Upgrade a Strapi application to a new version. ALWAYS reviews the relevant breaking changes first (via the strapi-docs MCP server, or by fetching the docs directly if the MCP is unavailable), then performs the upgrade using the official @strapi\u002Fupgrade tool. Use whenever the user wants to upgrade, update, or bump their Strapi version.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2552,2553,2556],{"name":15,"slug":16,"type":13},{"name":2554,"slug":2555,"type":13},"Migration","migration",{"name":9,"slug":8,"type":13},"2026-07-19T06:03:45.306446",{"items":2559,"total":313},[2560,2567,2574],{"slug":2525,"name":2525,"fn":2526,"description":2527,"org":2561,"tags":2562,"stars":23,"repoUrl":24,"updatedAt":2538},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2563,2564,2565,2566],{"name":15,"slug":16,"type":13},{"name":2532,"slug":2533,"type":13},{"name":2535,"slug":2536,"type":13},{"name":9,"slug":8,"type":13},{"slug":4,"name":4,"fn":5,"description":6,"org":2568,"tags":2569,"stars":23,"repoUrl":24,"updatedAt":25},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2570,2571,2572,2573],{"name":15,"slug":16,"type":13},{"name":18,"slug":19,"type":13},{"name":21,"slug":22,"type":13},{"name":9,"slug":8,"type":13},{"slug":2547,"name":2547,"fn":2548,"description":2549,"org":2575,"tags":2576,"stars":23,"repoUrl":24,"updatedAt":2557},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2577,2578,2579],{"name":15,"slug":16,"type":13},{"name":2554,"slug":2555,"type":13},{"name":9,"slug":8,"type":13}]