Add MCP prompts data loading support
- Load McpPromptsData.xml seed data for prompt templates - Add data load to component.xml
Showing
2 changed files
with
130 additions
and
1 deletions
| ... | @@ -18,8 +18,9 @@ | ... | @@ -18,8 +18,9 @@ |
| 18 | <service-factory load-path="service/" /> | 18 | <service-factory load-path="service/" /> |
| 19 | <screen-factory load-path="screen/" /> | 19 | <screen-factory load-path="screen/" /> |
| 20 | 20 | ||
| 21 | <!-- Load seed data --> | 21 | <!-- Load seed data --> |
| 22 | <entity-factory load-data="data/McpSecuritySeedData.xml" /> | 22 | <entity-factory load-data="data/McpSecuritySeedData.xml" /> |
| 23 | <entity-factory load-data="data/McpPromptsData.xml" /> | ||
| 23 | 24 | ||
| 24 | <!-- Webapp Configuration --> | 25 | <!-- Webapp Configuration --> |
| 25 | <webapp-list> | 26 | <webapp-list> | ... | ... |
data/McpPromptsData.xml
0 → 100644
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- | ||
| 3 | This software is in the public domain under CC0 1.0 Universal plus a | ||
| 4 | Grant of Patent License. | ||
| 5 | |||
| 6 | To the extent possible under law, the author(s) have dedicated all | ||
| 7 | copyright and related and neighboring rights to this software to the | ||
| 8 | public domain worldwide. This software is distributed without any warranty. | ||
| 9 | |||
| 10 | You should have received a copy of the CC0 Public Domain Dedication | ||
| 11 | along with this software. If not, see | ||
| 12 | <http://creativecommons.org/publicdomain/zero/1.0/>. | ||
| 13 | --> | ||
| 14 | <entity-facade-xml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| 15 | xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/entity-facade-3.xsd"> | ||
| 16 | |||
| 17 | <!-- MCP Prompts Wiki Space --> | ||
| 18 | <moqui.resource.wiki.WikiSpace wikiSpaceId="MCP_PROMPTS" | ||
| 19 | description="MCP Prompt Templates for AI assistants" | ||
| 20 | restrictView="N" | ||
| 21 | restrictUpdate="Y" | ||
| 22 | rootPageLocation="dbresource://WikiSpace/MCP_PROMPTS.md"/> | ||
| 23 | |||
| 24 | <!-- Parent DbResource for WikiSpace --> | ||
| 25 | <moqui.resource.DbResource | ||
| 26 | resourceId="WIKI_MCP_PROMPTS" | ||
| 27 | parentResourceId="" | ||
| 28 | filename="MCP_PROMPTS.md" | ||
| 29 | isFile="Y"/> | ||
| 30 | <moqui.resource.DbResourceFile | ||
| 31 | resourceId="WIKI_MCP_PROMPTS" | ||
| 32 | mimeType="text/markdown" | ||
| 33 | versionName="v1">This server provides access to Moqui ERP through MCP. | ||
| 34 | </moqui.resource.DbResourceFile> | ||
| 35 | |||
| 36 | <!-- DbResource for root page --> | ||
| 37 | <moqui.resource.DbResource | ||
| 38 | resourceId="WIKI_MCP_PROMPTS_ROOT" | ||
| 39 | parentResourceId="WIKI_MCP_PROMPTS" | ||
| 40 | filename="get-started.md" | ||
| 41 | isFile="Y"/> | ||
| 42 | |||
| 43 | <!-- "Get Started" Prompt Template --> | ||
| 44 | <moqui.resource.wiki.WikiPage | ||
| 45 | wikiPageId="MCP_PROMPTS/get-started" | ||
| 46 | wikiSpaceId="MCP_PROMPTS" | ||
| 47 | pagePath="get-started" | ||
| 48 | publishedVersionName="v1" | ||
| 49 | restrictView="N"> | ||
| 50 | </moqui.resource.wiki.WikiPage> | ||
| 51 | |||
| 52 | <!-- WikiPageHistory for version tracking --> | ||
| 53 | <moqui.resource.wiki.WikiPageHistory | ||
| 54 | wikiPageId="MCP_PROMPTS/get-started" | ||
| 55 | historySeqId="01" | ||
| 56 | versionName="v1" | ||
| 57 | userId="EX_JOHN_DOE" | ||
| 58 | changeDateTime="2025-12-29 00:00:00.000"/> | ||
| 59 | |||
| 60 | <!-- DbResourceFile: Template content with Groovy GString syntax --> | ||
| 61 | <moqui.resource.DbResourceFile | ||
| 62 | resourceId="WIKI_MCP_PROMPTS_ROOT" | ||
| 63 | mimeType="text/markdown" | ||
| 64 | versionName="v1"> | ||
| 65 | This server provides access to Moqui ERP through MCP. | ||
| 66 | For ${focus?.capitalize() ?: 'General'} operations: | ||
| 67 | |||
| 68 | ${focus == 'catalog' ? ''' | ||
| 69 | ## Catalog Operations | ||
| 70 | - **FindProduct**: Use `PopCommerce.PopCommerceAdmin.Catalog.Product.FindProduct` for product catalog | ||
| 71 | - **FindFeature**: Use `PopCommerce.PopCommerceAdmin.Catalog.Feature.FindFeature` to search by features like color or size | ||
| 72 | - **EditPrices**: Use `PopCommerce.PopCommerceAdmin.Catalog.Product.EditPrices` to check prices | ||
| 73 | ''' : ''} | ||
| 74 | |||
| 75 | ${focus == 'orders' ? ''' | ||
| 76 | ## Order Operations | ||
| 77 | - **FindOrder**: Use `PopCommerce.PopCommerceAdmin.Order.FindOrder` for order status and lookup | ||
| 78 | - **QuickSearch**: Use `PopCommerce.PopCommerceAdmin.QuickSearch` for general order searches | ||
| 79 | ''' : ''} | ||
| 80 | |||
| 81 | ${focus == 'customers' ? ''' | ||
| 82 | ## Customer Operations | ||
| 83 | - **CustomerRoot**: Use `PopCommerce.PopCommerceRoot.Customer` for customer management | ||
| 84 | - **QuickSearch**: Use `PopCommerce.PopCommerceAdmin.QuickSearch` for customer lookup | ||
| 85 | ''' : ''} | ||
| 86 | |||
| 87 | ${detailLevel == 'advanced' ? ''' | ||
| 88 | ## Advanced Features | ||
| 89 | - Use screen rendering for complex workflows with `moqui_render_screen` | ||
| 90 | - Subscribe to wiki and document resources for real-time updates | ||
| 91 | - All screens support parameterized queries for filtering results | ||
| 92 | ''' : ''} | ||
| 93 | |||
| 94 | Use following discovery tools to explore available functionality: | ||
| 95 | - `moqui_browse_screens`: Browse Moqui screen hierarchy | ||
| 96 | - `moqui_search_screens`: Search for screens by name to find their paths. | ||
| 97 | - `moqui_get_screen_details`: Get input parameters for specific screens. | ||
| 98 | </moqui.resource.DbResourceFile> | ||
| 99 | |||
| 100 | <!-- Argument Schema Attachment --> | ||
| 101 | <moqui.resource.DbResource | ||
| 102 | resourceId="WIKI_MCP_GET_STARTED_ARGS" | ||
| 103 | parentResourceId="WIKI_MCP_PROMPTS" | ||
| 104 | filename="get-started/arguments.json" | ||
| 105 | isFile="Y"/> | ||
| 106 | <moqui.resource.DbResourceFile | ||
| 107 | resourceId="WIKI_MCP_GET_STARTED_ARGS" | ||
| 108 | mimeType="application/json" | ||
| 109 | versionName="v1">[ | ||
| 110 | { | ||
| 111 | "name": "focus", | ||
| 112 | "title": "Focus Area", | ||
| 113 | "description": "Area of operations to focus on", | ||
| 114 | "type": "string", | ||
| 115 | "enum": ["general", "catalog", "orders", "customers"], | ||
| 116 | "required": false | ||
| 117 | }, | ||
| 118 | { | ||
| 119 | "name": "detailLevel", | ||
| 120 | "title": "Detail Level", | ||
| 121 | "description": "Level of instruction detail", | ||
| 122 | "type": "string", | ||
| 123 | "enum": ["basic", "advanced"], | ||
| 124 | "required": false | ||
| 125 | } | ||
| 126 | ] | ||
| 127 | </moqui.resource.DbResourceFile> | ||
| 128 | </entity-facade-xml> |
-
Please register or sign in to post a comment