You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -557,111 +561,110 @@ function liquidMcpTools(server: McpServer) {
557
561
return;
558
562
}
559
563
560
-
constthemeRepositoryDescription=`A theme repository is a directory that MUST contain the following directories: snippets, sections, config, templates. It can optionally contain assets, locales, blocks, layouts.`;
561
-
562
-
server.tool(
563
-
"validate_theme_codeblocks",
564
-
`This tool validates Liquid codeblocks, Liquid files, and supporting Theme files (e.g. JSON locale files, JSON config files, JSON template files, JavaScript files, CSS files, and SVG files) generated or updated by LLMs to ensure they don't have hallucinated Liquid content, or incorrect references.
565
-
566
-
DO NOT use this tool if the user is asking to add, update, or delete files within a Theme repository - Use \`validate_theme\` instead. ${themeRepositoryDescription}
567
-
568
-
Provide every codeblock that was generated or updated by the LLM to this tool.`,
569
-
570
-
withConversationId({
571
-
codeblocks: z
572
-
.array(
573
-
z.object({
574
-
fileName: z
575
-
.string()
576
-
.describe(
577
-
"The filename of the codeblock. If the filename is not provided, the filename should be descriptive of the codeblock's purpose, and should be in dashcase. Include file extension in the filename.",
578
-
),
579
-
fileType: z
580
-
.enum([
581
-
"assets",
582
-
"blocks",
583
-
"config",
584
-
"layout",
585
-
"locales",
586
-
"sections",
587
-
"snippets",
588
-
"templates",
589
-
])
590
-
.default("blocks")
591
-
.describe(
592
-
"The type of codeblock generated. All JavaScript, CSS, and SVG files are in assets folder. Locale files are JSON files located in the locale folder. If the translation is only used in schemas, it should be in `locales/en(.default).schema.json`; if the translation is used anywhere in the liquid code, it should be in `en(.default).json`. The brackets show an optional default locale. The locale code should be the two-letter code for the locale.",
593
-
),
594
-
content: z.string().describe("The content of the file."),
`This tool MUST run if the user asks the LLM to create or modify Liquid code inside their Theme repository. ${themeRepositoryDescription}
564
+
consttoolDescription=`This tool validates Liquid codeblocks, Liquid files, and supporting Theme files (e.g. JSON locale files, JSON config files, JSON template files, JavaScript files, CSS files, and SVG files) generated or updated by LLMs to ensure they don't have hallucinated Liquid content, invalid syntax, or incorrect references`;
565
+
566
+
if(liquidMcpValidationMode==="partial"){
567
+
server.tool(
568
+
"validate_theme_codeblocks",
569
+
`${toolDescription}. Provide every codeblock that was generated or updated by the LLM to this tool.`,
570
+
571
+
withConversationId({
572
+
codeblocks: z
573
+
.array(
574
+
z.object({
575
+
fileName: z
576
+
.string()
577
+
.describe(
578
+
"The filename of the codeblock. If the filename is not provided, the filename should be descriptive of the codeblock's purpose, and should be in dashcase. Include file extension in the filename.",
579
+
),
580
+
fileType: z
581
+
.enum([
582
+
"assets",
583
+
"blocks",
584
+
"config",
585
+
"layout",
586
+
"locales",
587
+
"sections",
588
+
"snippets",
589
+
"templates",
590
+
])
591
+
.default("blocks")
592
+
.describe(
593
+
"The type of codeblock generated. All JavaScript, CSS, and SVG files are in assets folder. Locale files are JSON files located in the locale folder. If the translation is only used in schemas, it should be in `locales/en(.default).schema.json`; if the translation is used anywhere in the liquid code, it should be in `en(.default).json`. The brackets show an optional default locale. The locale code should be the two-letter code for the locale.",
594
+
),
595
+
content: z.string().describe("The content of the file."),
0 commit comments