@antonytm/mcp-sitecore-server 0.13.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (23) hide show
  1. package/README.md +12 -2
  2. package/dist/bundle.js +155 -1
  3. package/dist/register.js +13 -1
  4. package/dist/register.js.map +1 -1
  5. package/dist/tools/powershell/simple/common/get-item-reference-by-id.d.ts +3 -0
  6. package/dist/tools/powershell/simple/common/get-item-reference-by-id.js +31 -0
  7. package/dist/tools/powershell/simple/common/get-item-reference-by-id.js.map +1 -0
  8. package/dist/tools/powershell/simple/common/get-item-reference-by-path.d.ts +3 -0
  9. package/dist/tools/powershell/simple/common/get-item-reference-by-path.js +31 -0
  10. package/dist/tools/powershell/simple/common/get-item-reference-by-path.js.map +1 -0
  11. package/dist/tools/powershell/simple/common/get-item-referrer-by-id.d.ts +3 -0
  12. package/dist/tools/powershell/simple/common/get-item-referrer-by-id.js +31 -0
  13. package/dist/tools/powershell/simple/common/get-item-referrer-by-id.js.map +1 -0
  14. package/dist/tools/powershell/simple/common/get-item-referrer-by-path.d.ts +3 -0
  15. package/dist/tools/powershell/simple/common/get-item-referrer-by-path.js +31 -0
  16. package/dist/tools/powershell/simple/common/get-item-referrer-by-path.js.map +1 -0
  17. package/dist/tools/powershell/simple/common/get-item-template-by-id.d.ts +3 -0
  18. package/dist/tools/powershell/simple/common/get-item-template-by-id.js +21 -0
  19. package/dist/tools/powershell/simple/common/get-item-template-by-id.js.map +1 -0
  20. package/dist/tools/powershell/simple/common/get-item-template-by-path.d.ts +3 -0
  21. package/dist/tools/powershell/simple/common/get-item-template-by-path.js +21 -0
  22. package/dist/tools/powershell/simple/common/get-item-template-by-path.js.map +1 -0
  23. package/package.json +1 -1
package/README.md CHANGED
@@ -72,11 +72,12 @@
72
72
  - [x] `provider-get-item-by-id`: returns an item by ID
73
73
  - [x] `provider-get-item-by-path`: returns an item by path
74
74
  - [x] `provider-get-item-by-query`: returns an item by query
75
- - [x] `provider-get-item-by-path`: returns an item by path
75
+ - [x] `provider-get-item-by-path`: returns an item by path
76
76
  - [x] Indexing
77
77
  - [x] `indexing-initialize-search-index`: initializes one or more search indexes
78
78
  - [x] `indexing-get-search-index`: returns a search index
79
- - [x] `indexing-find-item`: finds an item in a search index - [x] `indexing-suspend-search-index`: suspends one or more running search indexes
79
+ - [x] `indexing-find-item`: finds an item in a search index
80
+ - [x] `indexing-suspend-search-index`: suspends one or more running search indexes
80
81
  - [x] `indexing-stop-search-index`: stops one or more running search indexes
81
82
  - [x] `indexing-resume-search-index`: resumes one or more paused search indexes
82
83
  - [x] `indexing-initialize-search-index-item-by-id`: rebuilds the index for a given tree with the specified root item by ID and index name
@@ -84,6 +85,15 @@
84
85
  - [x] `indexing-remove-search-index-item-by-id`: removes the item with the specified ID from the search index
85
86
  - [x] `indexing-remove-search-index-item-by-path`: removes the item with the specified path from the search index
86
87
  - [ ] ~~`indexing-initialize-item`: initializes items with the PowerShell automatic properties for each field.~~ Skipped, no value for MCP server.
88
+ - [x] Common
89
+ - [x] `common-get-database`: returns information about Sitecore databases
90
+ - [x] `common-get-cache`: returns information about Sitecore caches
91
+ - [x] `common-get-item-template-by-id`: returns template information for a Sitecore item by ID
92
+ - [x] `common-get-item-template-by-path`: returns template information for a Sitecore item by path
93
+ - [x] `common-get-item-reference-by-id`: returns item references (where it is used) for a Sitecore item by ID
94
+ - [x] `common-get-item-reference-by-path`: returns item references (where it is used) for a Sitecore item by path
95
+ - [x] `common-get-item-referrer-by-id`: returns items referring to a Sitecore item by ID (which items reference it)
96
+ - [x] `common-get-item-referrer-by-path`: returns items referring to a Sitecore item by path (which items reference it)
87
97
 
88
98
  - [ ] Sitecore CLI
89
99
 
package/dist/bundle.js CHANGED
@@ -25636,6 +25636,154 @@ function getCachePowerShellTool(server, config) {
25636
25636
  });
25637
25637
  }
25638
25638
 
25639
+ function getItemTemplateByIdPowerShellTool(server, config) {
25640
+ server.tool("common-get-item-template-by-id", "Gets template information for a Sitecore item by its ID.", {
25641
+ id: stringType()
25642
+ .describe("The ID of the item to retrieve template information for."),
25643
+ database: stringType().optional()
25644
+ .describe("The database containing the item (defaults to the context database).")
25645
+ }, async (params) => {
25646
+ const options = {
25647
+ "Id": params.id
25648
+ };
25649
+ const command = `Get-ItemTemplate`;
25650
+ if (params.database) {
25651
+ options["Database"] = params.database;
25652
+ }
25653
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25654
+ });
25655
+ }
25656
+
25657
+ function getItemTemplateByPathPowerShellTool(server, config) {
25658
+ server.tool("common-get-item-template-by-path", "Gets template information for a Sitecore item by its path.", {
25659
+ path: stringType()
25660
+ .describe("The path of the item to retrieve template information for (e.g. /sitecore/content/Home)."),
25661
+ database: stringType().optional()
25662
+ .describe("The database containing the item (defaults to the context database).")
25663
+ }, async (params) => {
25664
+ const options = {
25665
+ "Path": params.path
25666
+ };
25667
+ const command = `Get-ItemTemplate`;
25668
+ if (params.database) {
25669
+ options["Database"] = params.database;
25670
+ }
25671
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25672
+ });
25673
+ }
25674
+
25675
+ function getItemReferenceByIdPowerShellTool(server, config) {
25676
+ server.tool("common-get-item-reference-by-id", "Gets item references for a Sitecore item by its ID, showing where it is used throughout the system.", {
25677
+ id: stringType()
25678
+ .describe("The ID of the item to retrieve references for"),
25679
+ database: stringType().optional()
25680
+ .describe("The database containing the item (defaults to the context database)"),
25681
+ language: stringType().optional()
25682
+ .describe("The language of the item to check references for"),
25683
+ version: stringType().optional()
25684
+ .describe("The version of the item to check references for"),
25685
+ }, async (params) => {
25686
+ const command = `Get-ItemReference`;
25687
+ const options = {
25688
+ "ID": params.id,
25689
+ };
25690
+ if (params.database) {
25691
+ options["Database"] = params.database;
25692
+ }
25693
+ if (params.language) {
25694
+ options["Language"] = params.language;
25695
+ }
25696
+ if (params.version) {
25697
+ options["Version"] = params.version;
25698
+ }
25699
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25700
+ });
25701
+ }
25702
+
25703
+ function getItemReferenceByPathPowerShellTool(server, config) {
25704
+ server.tool("common-get-item-reference-by-path", "Gets item references for a Sitecore item by its path, showing where it is used throughout the system.", {
25705
+ path: stringType()
25706
+ .describe("The path of the item to retrieve references for (e.g. /sitecore/content/Home)"),
25707
+ database: stringType().optional()
25708
+ .describe("The database containing the item (defaults to the context database)"),
25709
+ language: stringType().optional()
25710
+ .describe("The language of the item to check references for"),
25711
+ version: stringType().optional()
25712
+ .describe("The version of the item to check references for"),
25713
+ }, async (params) => {
25714
+ const command = `Get-ItemReference`;
25715
+ const options = {
25716
+ "Path": params.path,
25717
+ };
25718
+ if (params.database) {
25719
+ options["Database"] = params.database;
25720
+ }
25721
+ if (params.language) {
25722
+ options["Language"] = params.language;
25723
+ }
25724
+ if (params.version) {
25725
+ options["Version"] = params.version;
25726
+ }
25727
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25728
+ });
25729
+ }
25730
+
25731
+ function getItemReferrerByIdPowerShellTool(server, config) {
25732
+ server.tool("common-get-item-referrer-by-id", "Gets items referring to a Sitecore item by its ID, showing which items reference it.", {
25733
+ id: stringType()
25734
+ .describe("The ID of the item to retrieve referrers for"),
25735
+ database: stringType().optional()
25736
+ .describe("The database containing the item (defaults to the context database)"),
25737
+ language: stringType().optional()
25738
+ .describe("The language of the item to check referrers for"),
25739
+ version: stringType().optional()
25740
+ .describe("The version of the item to check referrers for"),
25741
+ }, async (params) => {
25742
+ const command = `Get-ItemReferrer`;
25743
+ const options = {
25744
+ "ID": params.id,
25745
+ };
25746
+ if (params.database) {
25747
+ options["Database"] = params.database;
25748
+ }
25749
+ if (params.language) {
25750
+ options["Language"] = params.language;
25751
+ }
25752
+ if (params.version) {
25753
+ options["Version"] = params.version;
25754
+ }
25755
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25756
+ });
25757
+ }
25758
+
25759
+ function getItemReferrerByPathPowerShellTool(server, config) {
25760
+ server.tool("common-get-item-referrer-by-path", "Gets items referring to a Sitecore item by its path, showing which items reference it.", {
25761
+ path: stringType()
25762
+ .describe("The path of the item to retrieve referrers for (e.g. /sitecore/content/Home)"),
25763
+ database: stringType().optional()
25764
+ .describe("The database containing the item (defaults to the context database)"),
25765
+ language: stringType().optional()
25766
+ .describe("The language of the item to check referrers for"),
25767
+ version: stringType().optional()
25768
+ .describe("The version of the item to check referrers for"),
25769
+ }, async (params) => {
25770
+ const command = `Get-ItemReferrer`;
25771
+ const options = {
25772
+ "Path": params.path,
25773
+ };
25774
+ if (params.database) {
25775
+ options["Database"] = params.database;
25776
+ }
25777
+ if (params.language) {
25778
+ options["Language"] = params.language;
25779
+ }
25780
+ if (params.version) {
25781
+ options["Version"] = params.version;
25782
+ }
25783
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
25784
+ });
25785
+ }
25786
+
25639
25787
  async function register(array, server, config) {
25640
25788
  for (const register of array) {
25641
25789
  await register(server, config);
@@ -25698,9 +25846,15 @@ async function registerAll(server, config) {
25698
25846
  setItemAclByIdPowerShellTool,
25699
25847
  setItemAclByPathPowerShellTool,
25700
25848
  //Common PowerShell Tools
25701
- //Simple Common PowerShell Tools
25849
+ //Simple Common PowerShell Tools
25702
25850
  getDatabasePowerShellTool,
25703
25851
  getCachePowerShellTool,
25852
+ getItemTemplateByIdPowerShellTool,
25853
+ getItemTemplateByPathPowerShellTool,
25854
+ getItemReferenceByIdPowerShellTool,
25855
+ getItemReferenceByPathPowerShellTool,
25856
+ getItemReferrerByIdPowerShellTool,
25857
+ getItemReferrerByPathPowerShellTool,
25704
25858
  //Provider
25705
25859
  getItemPowerShellTool,
25706
25860
  //Indexing PowerShell Tools
package/dist/register.js CHANGED
@@ -58,6 +58,12 @@ import { getDomainByNamePowerShellTool } from "./tools/powershell/simple/securit
58
58
  import { getAllDomainsPowerShellTool } from "./tools/powershell/simple/security/get-all-domains.js";
59
59
  import { getDatabasePowerShellTool } from "./tools/powershell/simple/common/get-database.js";
60
60
  import { getCachePowerShellTool } from "./tools/powershell/simple/common/get-cache.js";
61
+ import { getItemTemplateByIdPowerShellTool } from "./tools/powershell/simple/common/get-item-template-by-id.js";
62
+ import { getItemTemplateByPathPowerShellTool } from "./tools/powershell/simple/common/get-item-template-by-path.js";
63
+ import { getItemReferenceByIdPowerShellTool } from "./tools/powershell/simple/common/get-item-reference-by-id.js";
64
+ import { getItemReferenceByPathPowerShellTool } from "./tools/powershell/simple/common/get-item-reference-by-path.js";
65
+ import { getItemReferrerByIdPowerShellTool } from "./tools/powershell/simple/common/get-item-referrer-by-id.js";
66
+ import { getItemReferrerByPathPowerShellTool } from "./tools/powershell/simple/common/get-item-referrer-by-path.js";
61
67
  export async function register(array, server, config) {
62
68
  for (const register of array) {
63
69
  await register(server, config);
@@ -120,9 +126,15 @@ export async function registerAll(server, config) {
120
126
  setItemAclByIdPowerShellTool,
121
127
  setItemAclByPathPowerShellTool,
122
128
  //Common PowerShell Tools
123
- //Simple Common PowerShell Tools
129
+ //Simple Common PowerShell Tools
124
130
  getDatabasePowerShellTool,
125
131
  getCachePowerShellTool,
132
+ getItemTemplateByIdPowerShellTool,
133
+ getItemTemplateByPathPowerShellTool,
134
+ getItemReferenceByIdPowerShellTool,
135
+ getItemReferenceByPathPowerShellTool,
136
+ getItemReferrerByIdPowerShellTool,
137
+ getItemReferrerByPathPowerShellTool,
126
138
  //Provider
127
139
  getItemPowerShellTool,
128
140
  //Indexing PowerShell Tools
@@ -1 +1 @@
1
- {"version":3,"file":"register.js","sourceRoot":"","sources":["../src/register.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,uDAAuD,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAClF,OAA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A6B;QAC7B,2BAA2B;QAC3B,2BAA2B;QAC3B,8BAA8B;QAC9B,0BAA0B;QAC1B,4BAA4B;QAC5B,wBAAwB;QACxB,+BAA+B;QAC/B,6BAA6B;QAC7B,+BAA+B;QAC/B,iCAAiC;QACjC,qBAAqB;QACrB,wBAAwB;QACxB,uBAAuB;QACvB,0BAA0B;QAC1B,yBAAyB;QACzB,wBAAwB;QACxB,yBAAyB;QACzB,wBAAwB;QACxB,0BAA0B;QAC1B,qCAAqC;QACrC,4BAA4B;QAC5B,8BAA8B;QAC9B,yBAAyB;QACzB,wCAAwC;QACxC,yBAAyB;QACzB,sBAAsB;QACtB,iCAAiC;QACjC,mCAAmC;QACnC,kCAAkC;QAClC,oCAAoC;QACpC,iCAAiC;QACjC,mCAAmC;QAEnC,UAAU;QACV,qBAAqB;QACrB,2BAA2B;QAC3B,mCAAmC;QACnC,4BAA4B;QAC5B,sBAAsB;QACtB,+BAA+B;QAC/B,gCAAgC;QAChC,6BAA6B;QAC7B,qCAAqC;QACrC,8CAA8C;QAC9C,gDAAgD;QAChD,uCAAuC;QACvC,yCAAyC;KAE5C,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AACvB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemReferenceByIdPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function getItemReferenceByIdPowerShellTool(server, config) {
5
+ server.tool("common-get-item-reference-by-id", "Gets item references for a Sitecore item by its ID, showing where it is used throughout the system.", {
6
+ id: z.string()
7
+ .describe("The ID of the item to retrieve references for"),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database)"),
10
+ language: z.string().optional()
11
+ .describe("The language of the item to check references for"),
12
+ version: z.string().optional()
13
+ .describe("The version of the item to check references for"),
14
+ }, async (params) => {
15
+ const command = `Get-ItemReference`;
16
+ const options = {
17
+ "ID": params.id,
18
+ };
19
+ if (params.database) {
20
+ options["Database"] = params.database;
21
+ }
22
+ if (params.language) {
23
+ options["Language"] = params.language;
24
+ }
25
+ if (params.version) {
26
+ options["Version"] = params.version;
27
+ }
28
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
29
+ });
30
+ }
31
+ //# sourceMappingURL=get-item-reference-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-reference-by-id.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-reference-by-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,kCAAkC,CAAC,MAAiB,EAAE,MAAc;IAChF,MAAM,CAAC,IAAI,CACP,iCAAiC,EACjC,qGAAqG,EACrG;QACI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;aACT,QAAQ,CAAC,+CAA+C,CAAC;QAC9D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,qEAAqE,CAAC;QACpF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,kDAAkD,CAAC;QACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACzB,QAAQ,CAAC,iDAAiD,CAAC;KACnE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,OAAO,GAAwB;YACjC,IAAI,EAAE,MAAM,CAAC,EAAE;SAClB,CAAC;QAEF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemReferenceByPathPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function getItemReferenceByPathPowerShellTool(server, config) {
5
+ server.tool("common-get-item-reference-by-path", "Gets item references for a Sitecore item by its path, showing where it is used throughout the system.", {
6
+ path: z.string()
7
+ .describe("The path of the item to retrieve references for (e.g. /sitecore/content/Home)"),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database)"),
10
+ language: z.string().optional()
11
+ .describe("The language of the item to check references for"),
12
+ version: z.string().optional()
13
+ .describe("The version of the item to check references for"),
14
+ }, async (params) => {
15
+ const command = `Get-ItemReference`;
16
+ const options = {
17
+ "Path": params.path,
18
+ };
19
+ if (params.database) {
20
+ options["Database"] = params.database;
21
+ }
22
+ if (params.language) {
23
+ options["Language"] = params.language;
24
+ }
25
+ if (params.version) {
26
+ options["Version"] = params.version;
27
+ }
28
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
29
+ });
30
+ }
31
+ //# sourceMappingURL=get-item-reference-by-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-reference-by-path.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-reference-by-path.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,oCAAoC,CAAC,MAAiB,EAAE,MAAc;IAClF,MAAM,CAAC,IAAI,CACP,mCAAmC,EACnC,uGAAuG,EACvG;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACX,QAAQ,CAAC,+EAA+E,CAAC;QAC9F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,qEAAqE,CAAC;QACpF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,kDAAkD,CAAC;QACjE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACzB,QAAQ,CAAC,iDAAiD,CAAC;KACnE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,mBAAmB,CAAC;QACpC,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QAEF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemReferrerByIdPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function getItemReferrerByIdPowerShellTool(server, config) {
5
+ server.tool("common-get-item-referrer-by-id", "Gets items referring to a Sitecore item by its ID, showing which items reference it.", {
6
+ id: z.string()
7
+ .describe("The ID of the item to retrieve referrers for"),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database)"),
10
+ language: z.string().optional()
11
+ .describe("The language of the item to check referrers for"),
12
+ version: z.string().optional()
13
+ .describe("The version of the item to check referrers for"),
14
+ }, async (params) => {
15
+ const command = `Get-ItemReferrer`;
16
+ const options = {
17
+ "ID": params.id,
18
+ };
19
+ if (params.database) {
20
+ options["Database"] = params.database;
21
+ }
22
+ if (params.language) {
23
+ options["Language"] = params.language;
24
+ }
25
+ if (params.version) {
26
+ options["Version"] = params.version;
27
+ }
28
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
29
+ });
30
+ }
31
+ //# sourceMappingURL=get-item-referrer-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-referrer-by-id.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-referrer-by-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,iCAAiC,CAAC,MAAiB,EAAE,MAAc;IAC/E,MAAM,CAAC,IAAI,CACP,gCAAgC,EAChC,sFAAsF,EACtF;QACI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;aACT,QAAQ,CAAC,8CAA8C,CAAC;QAC7D,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,qEAAqE,CAAC;QACpF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,iDAAiD,CAAC;QAChE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACzB,QAAQ,CAAC,gDAAgD,CAAC;KAClE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,kBAAkB,CAAC;QACnC,MAAM,OAAO,GAAwB;YACjC,IAAI,EAAE,MAAM,CAAC,EAAE;SAClB,CAAC;QAEF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemReferrerByPathPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,31 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic.js";
4
+ export function getItemReferrerByPathPowerShellTool(server, config) {
5
+ server.tool("common-get-item-referrer-by-path", "Gets items referring to a Sitecore item by its path, showing which items reference it.", {
6
+ path: z.string()
7
+ .describe("The path of the item to retrieve referrers for (e.g. /sitecore/content/Home)"),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database)"),
10
+ language: z.string().optional()
11
+ .describe("The language of the item to check referrers for"),
12
+ version: z.string().optional()
13
+ .describe("The version of the item to check referrers for"),
14
+ }, async (params) => {
15
+ const command = `Get-ItemReferrer`;
16
+ const options = {
17
+ "Path": params.path,
18
+ };
19
+ if (params.database) {
20
+ options["Database"] = params.database;
21
+ }
22
+ if (params.language) {
23
+ options["Language"] = params.language;
24
+ }
25
+ if (params.version) {
26
+ options["Version"] = params.version;
27
+ }
28
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
29
+ });
30
+ }
31
+ //# sourceMappingURL=get-item-referrer-by-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-referrer-by-path.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-referrer-by-path.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,UAAU,mCAAmC,CAAC,MAAiB,EAAE,MAAc;IACjF,MAAM,CAAC,IAAI,CACP,kCAAkC,EAClC,wFAAwF,EACxF;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACX,QAAQ,CAAC,8EAA8E,CAAC;QAC7F,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,qEAAqE,CAAC;QACpF,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,iDAAiD,CAAC;QAChE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aACzB,QAAQ,CAAC,gDAAgD,CAAC;KAClE,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAG,kBAAkB,CAAC;QACnC,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QAEF,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACjB,OAAO,CAAC,SAAS,CAAC,GAAG,MAAM,CAAC,OAAO,CAAC;QACxC,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemTemplateByIdPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic";
4
+ export function getItemTemplateByIdPowerShellTool(server, config) {
5
+ server.tool("common-get-item-template-by-id", "Gets template information for a Sitecore item by its ID.", {
6
+ id: z.string()
7
+ .describe("The ID of the item to retrieve template information for."),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database).")
10
+ }, async (params) => {
11
+ const options = {
12
+ "Id": params.id
13
+ };
14
+ const command = `Get-ItemTemplate`;
15
+ if (params.database) {
16
+ options["Database"] = params.database;
17
+ }
18
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
19
+ });
20
+ }
21
+ //# sourceMappingURL=get-item-template-by-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-template-by-id.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-template-by-id.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,UAAU,iCAAiC,CAAC,MAAiB,EAAE,MAAc;IAC/E,MAAM,CAAC,IAAI,CACP,gCAAgC,EAChC,0DAA0D,EAC1D;QACI,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;aACT,QAAQ,CAAC,0DAA0D,CAAC;QACzE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,sEAAsE,CAAC;KACxF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAwB;YACjC,IAAI,EAAE,MAAM,CAAC,EAAE;SAClB,CAAC;QACF,MAAM,OAAO,GAAG,kBAAkB,CAAC;QAEnC,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp";
2
+ import type { Config } from "../../../../config.js";
3
+ export declare function getItemTemplateByPathPowerShellTool(server: McpServer, config: Config): void;
@@ -0,0 +1,21 @@
1
+ import { z } from "zod";
2
+ import { safeMcpResponse } from "../../../../helper.js";
3
+ import { runGenericPowershellCommand } from "../generic";
4
+ export function getItemTemplateByPathPowerShellTool(server, config) {
5
+ server.tool("common-get-item-template-by-path", "Gets template information for a Sitecore item by its path.", {
6
+ path: z.string()
7
+ .describe("The path of the item to retrieve template information for (e.g. /sitecore/content/Home)."),
8
+ database: z.string().optional()
9
+ .describe("The database containing the item (defaults to the context database).")
10
+ }, async (params) => {
11
+ const options = {
12
+ "Path": params.path
13
+ };
14
+ const command = `Get-ItemTemplate`;
15
+ if (params.database) {
16
+ options["Database"] = params.database;
17
+ }
18
+ return safeMcpResponse(runGenericPowershellCommand(config, command, options));
19
+ });
20
+ }
21
+ //# sourceMappingURL=get-item-template-by-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-item-template-by-path.js","sourceRoot":"","sources":["../../../../../src/tools/powershell/simple/common/get-item-template-by-path.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,UAAU,mCAAmC,CAAC,MAAiB,EAAE,MAAc;IACjF,MAAM,CAAC,IAAI,CACP,kCAAkC,EAClC,4DAA4D,EAC5D;QACI,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;aACX,QAAQ,CAAC,0FAA0F,CAAC;QACzG,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;aAC1B,QAAQ,CAAC,sEAAsE,CAAC;KACxF,EACD,KAAK,EAAE,MAAM,EAAE,EAAE;QACb,MAAM,OAAO,GAAwB;YACjC,MAAM,EAAE,MAAM,CAAC,IAAI;SACtB,CAAC;QACF,MAAM,OAAO,GAAG,kBAAkB,CAAC;QAEnC,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;YAClB,OAAO,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;QAC1C,CAAC;QAED,OAAO,eAAe,CAAC,2BAA2B,CAAC,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;IAClF,CAAC,CACJ,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antonytm/mcp-sitecore-server",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "A Model Context Protocol server for Sitecore",
5
5
  "files": [
6
6
  "dist",