@mediagraph/mcp 1.0.6 → 1.0.8
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.
- package/dist/index.js +396 -106
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -651,7 +651,7 @@ var MediagraphClient = class {
|
|
|
651
651
|
return this.request("GET", "/api/assets/updated_since_last_sync", { params });
|
|
652
652
|
}
|
|
653
653
|
async addTagsToAsset(id, tags) {
|
|
654
|
-
return this.request("
|
|
654
|
+
return this.request("PUT", `/api/assets/${id}/tag`, { body: { asset: { add_tag_names: tags } } });
|
|
655
655
|
}
|
|
656
656
|
async getAssetAutoTags(id) {
|
|
657
657
|
return this.request("GET", `/api/assets/${id}/auto_tags`);
|
|
@@ -659,16 +659,20 @@ var MediagraphClient = class {
|
|
|
659
659
|
async getAssetFaceTaggings(id) {
|
|
660
660
|
return this.request("GET", `/api/assets/${id}/face_taggings`);
|
|
661
661
|
}
|
|
662
|
-
async getAssetDownload(id,
|
|
662
|
+
async getAssetDownload(id, options) {
|
|
663
663
|
const params = {};
|
|
664
|
-
if (
|
|
664
|
+
if (options?.size) params.size = options.size;
|
|
665
|
+
if (options?.watermarked) params.watermarked = true;
|
|
666
|
+
if (options?.version_number) params.version_number = options.version_number;
|
|
667
|
+
if (options?.via) params.via = options.via;
|
|
668
|
+
if (options?.skip_meta) params.skip_meta = true;
|
|
665
669
|
return this.request("GET", `/api/assets/${id}/download`, { params });
|
|
666
670
|
}
|
|
667
671
|
async addAssetVersion(id, data) {
|
|
668
672
|
return this.request("POST", `/api/assets/${id}/add_version`, { body: data });
|
|
669
673
|
}
|
|
670
|
-
async revertAsset(id,
|
|
671
|
-
return this.request("POST", `/api/assets/${id}/revert`, { body: {
|
|
674
|
+
async revertAsset(id, version) {
|
|
675
|
+
return this.request("POST", `/api/assets/${id}/revert`, { body: { version } });
|
|
672
676
|
}
|
|
673
677
|
async requestAssetOptimization(id) {
|
|
674
678
|
return this.request("POST", `/api/assets/${id}/request_optimization`);
|
|
@@ -677,14 +681,17 @@ var MediagraphClient = class {
|
|
|
677
681
|
return this.request("POST", `/api/assets/${id}/complete_optimization`);
|
|
678
682
|
}
|
|
679
683
|
async removeAssetOptimizationRequest(id) {
|
|
680
|
-
return this.request("
|
|
684
|
+
return this.request("POST", `/api/assets/${id}/remove_optimization_request`);
|
|
681
685
|
}
|
|
682
686
|
async updateAssetCollectiveWork(id, data) {
|
|
683
687
|
return this.request("PUT", `/api/assets/${id}/update_collective_work`, { body: data });
|
|
684
688
|
}
|
|
685
|
-
async addAssetsToGroup(assetIds, groupId
|
|
689
|
+
async addAssetsToGroup(assetIds, groupId) {
|
|
686
690
|
await this.request("POST", "/api/assets/add_group", {
|
|
687
|
-
body: {
|
|
691
|
+
body: {
|
|
692
|
+
ids: assetIds,
|
|
693
|
+
asset_group_id: groupId
|
|
694
|
+
}
|
|
688
695
|
});
|
|
689
696
|
}
|
|
690
697
|
// ============================================================================
|
|
@@ -721,7 +728,9 @@ var MediagraphClient = class {
|
|
|
721
728
|
return this.request("GET", "/api/collections/tree");
|
|
722
729
|
}
|
|
723
730
|
async getCollectionVisibleAssetCounts(ids) {
|
|
724
|
-
return this.request("
|
|
731
|
+
return this.request("POST", "/api/collections/visible_asset_counts", {
|
|
732
|
+
body: { asset_groups: ids.map((id) => ({ id })) }
|
|
733
|
+
});
|
|
725
734
|
}
|
|
726
735
|
async addAssetToCollection(collectionId, assetId) {
|
|
727
736
|
await this.request("POST", `/api/collections/${collectionId}/add_asset`, { body: { asset_id: assetId } });
|
|
@@ -751,7 +760,7 @@ var MediagraphClient = class {
|
|
|
751
760
|
return this.request("POST", `/api/lightboxes/${id}/transfer_ownership`, { body: { user_id: userId } });
|
|
752
761
|
}
|
|
753
762
|
async addAssetToLightbox(lightboxId, assetId) {
|
|
754
|
-
await this.
|
|
763
|
+
await this.addAssetsToGroup([Number(assetId)], Number(lightboxId));
|
|
755
764
|
}
|
|
756
765
|
// ============================================================================
|
|
757
766
|
// Storage Folders
|
|
@@ -799,10 +808,10 @@ var MediagraphClient = class {
|
|
|
799
808
|
return this.request("POST", "/api/tags/bulk_find", { body: { names } });
|
|
800
809
|
}
|
|
801
810
|
async addTagToTaxonomy(id, taxonomyId) {
|
|
802
|
-
return this.request("
|
|
811
|
+
return this.request("PUT", `/api/tags/${id}/add_taxonomy`, { body: { taxonomy_id: taxonomyId } });
|
|
803
812
|
}
|
|
804
813
|
async mergeTagInto(id, targetTagId) {
|
|
805
|
-
await this.request("POST", `/api/tags/${id}/merge_into`, { body: {
|
|
814
|
+
await this.request("POST", `/api/tags/${id}/merge_into`, { body: { tag_2_id: targetTagId } });
|
|
806
815
|
}
|
|
807
816
|
async getTagEvents(params) {
|
|
808
817
|
return this.request("GET", "/api/tags/events", { params });
|
|
@@ -816,8 +825,11 @@ var MediagraphClient = class {
|
|
|
816
825
|
async getAutoTag(id) {
|
|
817
826
|
return this.request("GET", `/api/auto_tags/${id}`);
|
|
818
827
|
}
|
|
819
|
-
async bulkFindAutoTags(
|
|
820
|
-
return this.request("POST", "/api/auto_tags/bulk_find", { body: {
|
|
828
|
+
async bulkFindAutoTags(tagNames) {
|
|
829
|
+
return this.request("POST", "/api/auto_tags/bulk_find", { body: { tag_names: tagNames } });
|
|
830
|
+
}
|
|
831
|
+
async deleteAutoTag(id) {
|
|
832
|
+
await this.request("DELETE", `/api/auto_tags/${id}`);
|
|
821
833
|
}
|
|
822
834
|
// ============================================================================
|
|
823
835
|
// Taggings
|
|
@@ -936,8 +948,10 @@ var MediagraphClient = class {
|
|
|
936
948
|
async getShareLink(id) {
|
|
937
949
|
return this.request("GET", `/api/share_links/${id}`);
|
|
938
950
|
}
|
|
939
|
-
async createShareLink(data) {
|
|
940
|
-
return this.request("POST",
|
|
951
|
+
async createShareLink(assetGroupId, data) {
|
|
952
|
+
return this.request("POST", `/api/asset_groups/${assetGroupId}/share_links`, {
|
|
953
|
+
body: data ? { share_link: data } : void 0
|
|
954
|
+
});
|
|
941
955
|
}
|
|
942
956
|
async updateShareLink(id, data) {
|
|
943
957
|
return this.request("PUT", `/api/share_links/${id}`, { body: { share_link: data } });
|
|
@@ -1014,8 +1028,14 @@ var MediagraphClient = class {
|
|
|
1014
1028
|
async listUploads(params) {
|
|
1015
1029
|
return this.request("GET", "/api/uploads", { params });
|
|
1016
1030
|
}
|
|
1017
|
-
async createUpload() {
|
|
1018
|
-
return this.request("POST", "/api/uploads");
|
|
1031
|
+
async createUpload(data) {
|
|
1032
|
+
return this.request("POST", "/api/uploads", data ? { body: { upload: data } } : void 0);
|
|
1033
|
+
}
|
|
1034
|
+
/**
|
|
1035
|
+
* Create upload session from a contribution - assets will go to the contribution's configured destination
|
|
1036
|
+
*/
|
|
1037
|
+
async createUploadFromContribution(contributionId, data) {
|
|
1038
|
+
return this.request("POST", `/api/contributions/${contributionId}/uploads`, data ? { body: { upload: data } } : void 0);
|
|
1019
1039
|
}
|
|
1020
1040
|
async getUploadAssets(guid, params) {
|
|
1021
1041
|
return this.request("GET", `/api/uploads/${guid}/assets`, { params });
|
|
@@ -1054,7 +1074,7 @@ var MediagraphClient = class {
|
|
|
1054
1074
|
}
|
|
1055
1075
|
}
|
|
1056
1076
|
async setUploadDone(id) {
|
|
1057
|
-
return this.request("
|
|
1077
|
+
return this.request("PUT", `/api/uploads/${id}/set_done`);
|
|
1058
1078
|
}
|
|
1059
1079
|
async canUpload() {
|
|
1060
1080
|
return this.request("GET", "/api/can_upload");
|
|
@@ -1143,8 +1163,8 @@ var MediagraphClient = class {
|
|
|
1143
1163
|
async exportCustomMetaField(id) {
|
|
1144
1164
|
return this.request("GET", `/api/custom_meta_fields/${id}/export`);
|
|
1145
1165
|
}
|
|
1146
|
-
async importCustomMetaFields(
|
|
1147
|
-
return this.request("POST", "/api/custom_meta_fields/import", { body:
|
|
1166
|
+
async importCustomMetaFields(settings) {
|
|
1167
|
+
return this.request("POST", "/api/custom_meta_fields/import", { body: { settings } });
|
|
1148
1168
|
}
|
|
1149
1169
|
async getAccessRequestCustomMetaFields() {
|
|
1150
1170
|
return this.request("GET", "/api/custom_meta_fields/access_requests");
|
|
@@ -1185,8 +1205,8 @@ var MediagraphClient = class {
|
|
|
1185
1205
|
async deleteWorkflowStep(id) {
|
|
1186
1206
|
await this.request("DELETE", `/api/workflow_steps/${id}`);
|
|
1187
1207
|
}
|
|
1188
|
-
async approveWorkflowStep(id) {
|
|
1189
|
-
return this.request("POST", `/api/workflow_steps/${id}/approve
|
|
1208
|
+
async approveWorkflowStep(id, assetIds) {
|
|
1209
|
+
return this.request("POST", `/api/workflow_steps/${id}/approve`, { body: { asset_ids: assetIds } });
|
|
1190
1210
|
}
|
|
1191
1211
|
// ============================================================================
|
|
1192
1212
|
// Comments
|
|
@@ -1197,8 +1217,11 @@ var MediagraphClient = class {
|
|
|
1197
1217
|
async getComment(id) {
|
|
1198
1218
|
return this.request("GET", `/api/comments/${id}`);
|
|
1199
1219
|
}
|
|
1200
|
-
async createComment(data) {
|
|
1201
|
-
return this.request("POST", "/api/comments", {
|
|
1220
|
+
async createComment(type, id, data) {
|
|
1221
|
+
return this.request("POST", "/api/comments", {
|
|
1222
|
+
params: { type, id },
|
|
1223
|
+
body: { comment: data }
|
|
1224
|
+
});
|
|
1202
1225
|
}
|
|
1203
1226
|
async updateComment(id, data) {
|
|
1204
1227
|
return this.request("PUT", `/api/comments/${id}`, { body: { comment: data } });
|
|
@@ -1248,8 +1271,8 @@ var MediagraphClient = class {
|
|
|
1248
1271
|
async getWebhookLogs(id, params) {
|
|
1249
1272
|
return this.request("GET", `/api/webhooks/${id}/logs`, { params });
|
|
1250
1273
|
}
|
|
1251
|
-
async testWebhook(
|
|
1252
|
-
return this.request("POST", "/api/webhooks/test", { body:
|
|
1274
|
+
async testWebhook(url) {
|
|
1275
|
+
return this.request("POST", "/api/webhooks/test", { body: { url } });
|
|
1253
1276
|
}
|
|
1254
1277
|
async getWebhookPayload() {
|
|
1255
1278
|
return this.request("GET", "/api/webhooks/payload");
|
|
@@ -1300,7 +1323,7 @@ var MediagraphClient = class {
|
|
|
1300
1323
|
return this.request("GET", "/api/invites/find", { params });
|
|
1301
1324
|
}
|
|
1302
1325
|
async checkInviteEmail(email) {
|
|
1303
|
-
return this.request("
|
|
1326
|
+
return this.request("POST", "/api/invites/check_email", { body: { email } });
|
|
1304
1327
|
}
|
|
1305
1328
|
async getAvailableRoleLevels() {
|
|
1306
1329
|
return this.request("GET", "/api/invites/available_role_levels");
|
|
@@ -1323,8 +1346,10 @@ var MediagraphClient = class {
|
|
|
1323
1346
|
async deleteFilterGroup(id) {
|
|
1324
1347
|
await this.request("DELETE", `/api/filter_groups/${id}`);
|
|
1325
1348
|
}
|
|
1326
|
-
async updateFilterGroupVisibility(id,
|
|
1327
|
-
return this.request("PUT", `/api/filter_groups/${id}/update_visibility`, {
|
|
1349
|
+
async updateFilterGroupVisibility(id, data) {
|
|
1350
|
+
return this.request("PUT", `/api/filter_groups/${id}/update_visibility`, {
|
|
1351
|
+
body: { name: data.name, type: data.type, visible: String(data.visible) }
|
|
1352
|
+
});
|
|
1328
1353
|
}
|
|
1329
1354
|
// ============================================================================
|
|
1330
1355
|
// Search Queries
|
|
@@ -1362,8 +1387,8 @@ var MediagraphClient = class {
|
|
|
1362
1387
|
async deleteCropPreset(id) {
|
|
1363
1388
|
await this.request("DELETE", `/api/crop_presets/${id}`);
|
|
1364
1389
|
}
|
|
1365
|
-
async updateCropPresetPosition(
|
|
1366
|
-
return this.request("PUT", "/api/crop_presets/update_position", { body: {
|
|
1390
|
+
async updateCropPresetPosition(oldIndex, newIndex) {
|
|
1391
|
+
return this.request("PUT", "/api/crop_presets/update_position", { body: { oldIndex, newIndex } });
|
|
1367
1392
|
}
|
|
1368
1393
|
// ============================================================================
|
|
1369
1394
|
// Ingestions
|
|
@@ -1614,7 +1639,13 @@ COMMON SEARCH FIELDS:
|
|
|
1614
1639
|
type: "object",
|
|
1615
1640
|
properties: {
|
|
1616
1641
|
id: idParam,
|
|
1617
|
-
|
|
1642
|
+
size: {
|
|
1643
|
+
type: "string",
|
|
1644
|
+
enum: ["small", "permalink", "full", "original"],
|
|
1645
|
+
description: "Maximum size for the download (default: original)"
|
|
1646
|
+
},
|
|
1647
|
+
watermarked: { type: "boolean", description: "Request watermarked version" },
|
|
1648
|
+
version_number: { type: "number", description: "Specific version number to download" }
|
|
1618
1649
|
},
|
|
1619
1650
|
required: ["id"]
|
|
1620
1651
|
}
|
|
@@ -1641,9 +1672,9 @@ COMMON SEARCH FIELDS:
|
|
|
1641
1672
|
type: "object",
|
|
1642
1673
|
properties: {
|
|
1643
1674
|
id: idParam,
|
|
1644
|
-
|
|
1675
|
+
version: { type: "number", description: "Version number to revert to" }
|
|
1645
1676
|
},
|
|
1646
|
-
required: ["id", "
|
|
1677
|
+
required: ["id", "version"]
|
|
1647
1678
|
}
|
|
1648
1679
|
},
|
|
1649
1680
|
{
|
|
@@ -1692,7 +1723,11 @@ COMMON SEARCH FIELDS:
|
|
|
1692
1723
|
return successResult(await client2.addTagsToAsset(args.id, args.tags));
|
|
1693
1724
|
},
|
|
1694
1725
|
async get_asset_download(args, { client: client2 }) {
|
|
1695
|
-
return successResult(await client2.getAssetDownload(args.id,
|
|
1726
|
+
return successResult(await client2.getAssetDownload(args.id, {
|
|
1727
|
+
size: args.size,
|
|
1728
|
+
watermarked: args.watermarked,
|
|
1729
|
+
version_number: args.version_number
|
|
1730
|
+
}));
|
|
1696
1731
|
},
|
|
1697
1732
|
async get_asset_auto_tags(args, { client: client2 }) {
|
|
1698
1733
|
return successResult(await client2.getAssetAutoTags(args.id));
|
|
@@ -1704,7 +1739,7 @@ COMMON SEARCH FIELDS:
|
|
|
1704
1739
|
return successResult(await client2.getAssetDataVersions(args.asset_id));
|
|
1705
1740
|
},
|
|
1706
1741
|
async revert_asset(args, { client: client2 }) {
|
|
1707
|
-
return successResult(await client2.revertAsset(args.id, args.
|
|
1742
|
+
return successResult(await client2.revertAsset(args.id, args.version));
|
|
1708
1743
|
},
|
|
1709
1744
|
async get_asset_counts(args, { client: client2 }) {
|
|
1710
1745
|
return successResult(await client2.getAssetCounts(args));
|
|
@@ -1781,6 +1816,19 @@ var groupTools = {
|
|
|
1781
1816
|
description: "Get collections hierarchy as a tree",
|
|
1782
1817
|
inputSchema: { type: "object", properties: {}, required: [] }
|
|
1783
1818
|
},
|
|
1819
|
+
// Multi-asset group operations
|
|
1820
|
+
{
|
|
1821
|
+
name: "add_assets_to_group",
|
|
1822
|
+
description: "Add multiple assets to a Collection or Lightbox at once",
|
|
1823
|
+
inputSchema: {
|
|
1824
|
+
type: "object",
|
|
1825
|
+
properties: {
|
|
1826
|
+
ids: { type: "array", items: { type: "number" }, description: "Array of asset IDs to add" },
|
|
1827
|
+
asset_group_id: { ...idParam, description: "ID of Collection or Lightbox" }
|
|
1828
|
+
},
|
|
1829
|
+
required: ["ids", "asset_group_id"]
|
|
1830
|
+
}
|
|
1831
|
+
},
|
|
1784
1832
|
// Lightboxes
|
|
1785
1833
|
{
|
|
1786
1834
|
name: "list_lightboxes",
|
|
@@ -1893,6 +1941,13 @@ var groupTools = {
|
|
|
1893
1941
|
async get_collections_tree(_args, { client: client2 }) {
|
|
1894
1942
|
return successResult(await client2.getCollectionsTree());
|
|
1895
1943
|
},
|
|
1944
|
+
async add_assets_to_group(args, { client: client2 }) {
|
|
1945
|
+
await client2.addAssetsToGroup(
|
|
1946
|
+
args.ids,
|
|
1947
|
+
args.asset_group_id
|
|
1948
|
+
);
|
|
1949
|
+
return successResult({ success: true, added_count: args.ids.length });
|
|
1950
|
+
},
|
|
1896
1951
|
// Lightboxes
|
|
1897
1952
|
async list_lightboxes(args, { client: client2 }) {
|
|
1898
1953
|
return successResult(await client2.listLightboxes(args));
|
|
@@ -1990,6 +2045,11 @@ var tagTools = {
|
|
|
1990
2045
|
description: "Get details of a specific tagging (tag-to-asset relationship)",
|
|
1991
2046
|
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
1992
2047
|
},
|
|
2048
|
+
{
|
|
2049
|
+
name: "delete_tagging",
|
|
2050
|
+
description: "Remove a tagging (untag an asset)",
|
|
2051
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
2052
|
+
},
|
|
1993
2053
|
// Auto Tags
|
|
1994
2054
|
{
|
|
1995
2055
|
name: "list_auto_tags",
|
|
@@ -2000,6 +2060,25 @@ var tagTools = {
|
|
|
2000
2060
|
required: []
|
|
2001
2061
|
}
|
|
2002
2062
|
},
|
|
2063
|
+
{
|
|
2064
|
+
name: "get_auto_tag",
|
|
2065
|
+
description: "Get auto tag details",
|
|
2066
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
2067
|
+
},
|
|
2068
|
+
{
|
|
2069
|
+
name: "bulk_find_auto_tags",
|
|
2070
|
+
description: "Find multiple auto tags by their names at once",
|
|
2071
|
+
inputSchema: {
|
|
2072
|
+
type: "object",
|
|
2073
|
+
properties: { tag_names: { type: "array", items: { type: "string" }, description: "Array of auto tag names to find" } },
|
|
2074
|
+
required: ["tag_names"]
|
|
2075
|
+
}
|
|
2076
|
+
},
|
|
2077
|
+
{
|
|
2078
|
+
name: "delete_auto_tag",
|
|
2079
|
+
description: "Delete/dismiss an auto tag",
|
|
2080
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
2081
|
+
},
|
|
2003
2082
|
// Taxonomies
|
|
2004
2083
|
{
|
|
2005
2084
|
name: "list_taxonomies",
|
|
@@ -2085,10 +2164,24 @@ var tagTools = {
|
|
|
2085
2164
|
async get_tagging(args, { client: client2 }) {
|
|
2086
2165
|
return successResult(await client2.getTagging(args.id));
|
|
2087
2166
|
},
|
|
2167
|
+
async delete_tagging(args, { client: client2 }) {
|
|
2168
|
+
await client2.deleteTagging(args.id);
|
|
2169
|
+
return successResult({ success: true });
|
|
2170
|
+
},
|
|
2088
2171
|
// Auto Tags
|
|
2089
2172
|
async list_auto_tags(args, { client: client2 }) {
|
|
2090
2173
|
return successResult(await client2.listAutoTags(args));
|
|
2091
2174
|
},
|
|
2175
|
+
async get_auto_tag(args, { client: client2 }) {
|
|
2176
|
+
return successResult(await client2.getAutoTag(args.id));
|
|
2177
|
+
},
|
|
2178
|
+
async bulk_find_auto_tags(args, { client: client2 }) {
|
|
2179
|
+
return successResult(await client2.bulkFindAutoTags(args.tag_names));
|
|
2180
|
+
},
|
|
2181
|
+
async delete_auto_tag(args, { client: client2 }) {
|
|
2182
|
+
await client2.deleteAutoTag(args.id);
|
|
2183
|
+
return successResult({ success: true });
|
|
2184
|
+
},
|
|
2092
2185
|
// Taxonomies
|
|
2093
2186
|
async list_taxonomies(args, { client: client2 }) {
|
|
2094
2187
|
return successResult(await client2.listTaxonomies(args));
|
|
@@ -2173,18 +2266,27 @@ var sharingTools = {
|
|
|
2173
2266
|
},
|
|
2174
2267
|
{
|
|
2175
2268
|
name: "create_share_link",
|
|
2176
|
-
description: "Create a share link for
|
|
2269
|
+
description: "Create a share link for a Collection, Lightbox, or Storage Folder",
|
|
2177
2270
|
inputSchema: {
|
|
2178
2271
|
type: "object",
|
|
2179
2272
|
properties: {
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2273
|
+
asset_group_id: { ...idParam, description: "ID of the Collection, Lightbox, or Storage Folder to share" },
|
|
2274
|
+
enabled: { type: "boolean", description: "Enable the share link (default: true)" },
|
|
2275
|
+
image_and_video_permission: {
|
|
2276
|
+
type: "string",
|
|
2277
|
+
enum: ["view", "download_small", "download_large", "download_original"],
|
|
2278
|
+
description: "Permission level for images and videos"
|
|
2279
|
+
},
|
|
2280
|
+
other_permission: {
|
|
2281
|
+
type: "string",
|
|
2282
|
+
enum: ["view", "download"],
|
|
2283
|
+
description: "Permission level for other file types"
|
|
2284
|
+
},
|
|
2285
|
+
watermark_all: { type: "boolean", description: "Apply watermark to all downloads" },
|
|
2286
|
+
note: { type: "string", description: "Internal note" },
|
|
2287
|
+
expires_at: { type: "string", description: "Expiration date/time in ISO 8601 format" }
|
|
2186
2288
|
},
|
|
2187
|
-
required: []
|
|
2289
|
+
required: ["asset_group_id"]
|
|
2188
2290
|
}
|
|
2189
2291
|
},
|
|
2190
2292
|
{
|
|
@@ -2226,7 +2328,8 @@ var sharingTools = {
|
|
|
2226
2328
|
return successResult(await client2.getShareLink(args.id));
|
|
2227
2329
|
},
|
|
2228
2330
|
async create_share_link(args, { client: client2 }) {
|
|
2229
|
-
|
|
2331
|
+
const { asset_group_id, ...data } = args;
|
|
2332
|
+
return successResult(await client2.createShareLink(asset_group_id, data));
|
|
2230
2333
|
},
|
|
2231
2334
|
async delete_share_link(args, { client: client2 }) {
|
|
2232
2335
|
await client2.deleteShareLink(args.id);
|
|
@@ -2261,15 +2364,41 @@ var jobTools = {
|
|
|
2261
2364
|
},
|
|
2262
2365
|
{
|
|
2263
2366
|
name: "create_bulk_job",
|
|
2264
|
-
description:
|
|
2367
|
+
description: `Create a bulk job for batch operations on assets. Supports multiple operation types:
|
|
2368
|
+
- Tag management: use tag_names + tag_mode (add/remove/replace)
|
|
2369
|
+
- Metadata updates: use description + description_mode (set/append/prepend), rating, rights_package_id
|
|
2370
|
+
- Organization: use add_asset_group_id + add_asset_group_type (Collection/Lightbox/StorageFolder)
|
|
2371
|
+
- AI processing: use run_custom_meta_field_ids + cmf_overwrite_mode (skip/overwrite)
|
|
2372
|
+
- Bulk actions: use destroy_all, restore_all, or generate_alt_text`,
|
|
2265
2373
|
inputSchema: {
|
|
2266
2374
|
type: "object",
|
|
2267
2375
|
properties: {
|
|
2268
2376
|
asset_ids: { type: "array", items: { type: "number" }, description: "Asset IDs to process" },
|
|
2269
|
-
|
|
2270
|
-
|
|
2377
|
+
// Tag operations
|
|
2378
|
+
tag_names: { type: "array", items: { type: "string" }, description: "Tag names to add/remove/replace" },
|
|
2379
|
+
tag_mode: { type: "string", enum: ["add", "remove", "replace"], description: "Tag operation mode" },
|
|
2380
|
+
// Metadata operations
|
|
2381
|
+
description: { type: "string", description: "Description text to set/append/prepend" },
|
|
2382
|
+
description_mode: { type: "string", enum: ["set", "append", "prepend"], description: "Description operation mode" },
|
|
2383
|
+
rights_package_id: { type: "number", description: "Rights Package ID to assign" },
|
|
2384
|
+
rights_status: { type: "string", description: "Rights status code" },
|
|
2385
|
+
rating: { type: "number", minimum: 0, maximum: 5, description: "Rating value (0-5)" },
|
|
2386
|
+
// Organization operations
|
|
2387
|
+
add_asset_group_id: { type: "number", description: "ID of Collection/Lightbox/StorageFolder to add assets to" },
|
|
2388
|
+
add_asset_group_type: { type: "string", enum: ["Collection", "Lightbox", "StorageFolder"], description: "Type of asset group" },
|
|
2389
|
+
remove_asset_group_id: { type: "number", description: "ID of Collection/Lightbox to remove assets from" },
|
|
2390
|
+
remove_asset_group_type: { type: "string", description: "Type of asset group to remove from" },
|
|
2391
|
+
// Custom meta operations
|
|
2392
|
+
custom_meta: { type: "object", description: "Custom meta field values to set (keyed by field name)" },
|
|
2393
|
+
run_custom_meta_field_ids: { type: "array", items: { type: "number" }, description: "Custom Meta Field IDs to run AI on" },
|
|
2394
|
+
cmf_overwrite_mode: { type: "string", enum: ["skip", "overwrite"], description: "Whether to overwrite existing values when running AI" },
|
|
2395
|
+
// Bulk actions
|
|
2396
|
+
destroy_all: { type: "boolean", description: "Delete all specified assets" },
|
|
2397
|
+
restore_all: { type: "boolean", description: "Restore all specified assets from trash" },
|
|
2398
|
+
generate_alt_text: { type: "boolean", description: "Generate alt text using AI" },
|
|
2399
|
+
alt_text_generation_prompt: { type: "string", description: "Custom prompt for alt text generation" }
|
|
2271
2400
|
},
|
|
2272
|
-
required: ["asset_ids"
|
|
2401
|
+
required: ["asset_ids"]
|
|
2273
2402
|
}
|
|
2274
2403
|
},
|
|
2275
2404
|
{
|
|
@@ -2415,34 +2544,45 @@ var socialTools = {
|
|
|
2415
2544
|
// Comments
|
|
2416
2545
|
{
|
|
2417
2546
|
name: "list_comments",
|
|
2418
|
-
description: "List comments on a
|
|
2547
|
+
description: "List comments on a Lightbox or Collection",
|
|
2419
2548
|
inputSchema: {
|
|
2420
2549
|
type: "object",
|
|
2421
2550
|
properties: {
|
|
2422
|
-
|
|
2423
|
-
|
|
2551
|
+
type: { type: "string", enum: ["Lightbox", "Collection"], description: "Type of commentable object" },
|
|
2552
|
+
id: { type: "number", description: "ID of the commentable object" },
|
|
2424
2553
|
...paginationParams
|
|
2425
2554
|
},
|
|
2426
|
-
required: ["
|
|
2555
|
+
required: ["type", "id"]
|
|
2427
2556
|
}
|
|
2428
2557
|
},
|
|
2429
2558
|
{
|
|
2430
2559
|
name: "create_comment",
|
|
2431
|
-
description: "Create a comment",
|
|
2560
|
+
description: "Create a new comment on a Lightbox or Collection. Supports markdown and @mentions.",
|
|
2432
2561
|
inputSchema: {
|
|
2433
2562
|
type: "object",
|
|
2434
2563
|
properties: {
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
parent_id: { type: "number" }
|
|
2564
|
+
type: { type: "string", enum: ["Lightbox", "Collection"], description: "Type of commentable object" },
|
|
2565
|
+
id: { type: "number", description: "ID of the commentable object" },
|
|
2566
|
+
text: { type: "string", description: "Comment text (supports markdown and @mentions)" }
|
|
2439
2567
|
},
|
|
2440
|
-
required: ["
|
|
2568
|
+
required: ["type", "id", "text"]
|
|
2569
|
+
}
|
|
2570
|
+
},
|
|
2571
|
+
{
|
|
2572
|
+
name: "update_comment",
|
|
2573
|
+
description: "Update a comment. Only the comment author can update their own comments.",
|
|
2574
|
+
inputSchema: {
|
|
2575
|
+
type: "object",
|
|
2576
|
+
properties: {
|
|
2577
|
+
id: idParam,
|
|
2578
|
+
text: { type: "string", description: "Updated comment text" }
|
|
2579
|
+
},
|
|
2580
|
+
required: ["id", "text"]
|
|
2441
2581
|
}
|
|
2442
2582
|
},
|
|
2443
2583
|
{
|
|
2444
2584
|
name: "delete_comment",
|
|
2445
|
-
description: "Delete a comment",
|
|
2585
|
+
description: "Delete a comment. Only the comment author can delete their own comments.",
|
|
2446
2586
|
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
2447
2587
|
},
|
|
2448
2588
|
// Notifications
|
|
@@ -2463,7 +2603,17 @@ var socialTools = {
|
|
|
2463
2603
|
return successResult(await client2.listComments(args));
|
|
2464
2604
|
},
|
|
2465
2605
|
async create_comment(args, { client: client2 }) {
|
|
2466
|
-
return successResult(await client2.createComment(
|
|
2606
|
+
return successResult(await client2.createComment(
|
|
2607
|
+
args.type,
|
|
2608
|
+
args.id,
|
|
2609
|
+
{ text: args.text }
|
|
2610
|
+
));
|
|
2611
|
+
},
|
|
2612
|
+
async update_comment(args, { client: client2 }) {
|
|
2613
|
+
return successResult(await client2.updateComment(
|
|
2614
|
+
args.id,
|
|
2615
|
+
{ text: args.text }
|
|
2616
|
+
));
|
|
2467
2617
|
},
|
|
2468
2618
|
async delete_comment(args, { client: client2 }) {
|
|
2469
2619
|
await client2.deleteComment(args.id);
|
|
@@ -2489,7 +2639,11 @@ var downloadTools = {
|
|
|
2489
2639
|
type: "object",
|
|
2490
2640
|
properties: {
|
|
2491
2641
|
asset_ids: { type: "array", items: { type: "number" } },
|
|
2492
|
-
|
|
2642
|
+
size: {
|
|
2643
|
+
type: "string",
|
|
2644
|
+
enum: ["small", "small-watermark", "permalink", "permalink-watermark", "full", "full-watermark", "original"],
|
|
2645
|
+
description: "Maximum size requested for assets in the download"
|
|
2646
|
+
}
|
|
2493
2647
|
},
|
|
2494
2648
|
required: ["asset_ids"]
|
|
2495
2649
|
}
|
|
@@ -2559,10 +2713,16 @@ var uploadTools = {
|
|
|
2559
2713
|
definitions: [
|
|
2560
2714
|
{
|
|
2561
2715
|
name: "upload_file",
|
|
2562
|
-
description: `Upload a file
|
|
2716
|
+
description: `Upload a file to Mediagraph. Supports two modes:
|
|
2717
|
+
1. Local file: Provide file_path for files on the user's local filesystem
|
|
2718
|
+
2. Direct upload: Provide file_data (base64-encoded) with filename for files from other sources
|
|
2719
|
+
|
|
2563
2720
|
This creates a new asset in the user's Mediagraph library.
|
|
2564
2721
|
Supports images, videos, audio, documents, and other media files.
|
|
2565
|
-
The file will be processed and thumbnails/previews generated automatically
|
|
2722
|
+
The file will be processed and thumbnails/previews generated automatically.
|
|
2723
|
+
|
|
2724
|
+
By default, assets are uploaded to the default storage folder. To upload to a specific destination,
|
|
2725
|
+
provide a contribution_id - the asset will go to the contribution's configured storage folder or lightbox.`,
|
|
2566
2726
|
inputSchema: {
|
|
2567
2727
|
type: "object",
|
|
2568
2728
|
properties: {
|
|
@@ -2570,19 +2730,30 @@ The file will be processed and thumbnails/previews generated automatically.`,
|
|
|
2570
2730
|
type: "string",
|
|
2571
2731
|
description: "Absolute path to the file on the local filesystem"
|
|
2572
2732
|
},
|
|
2573
|
-
|
|
2733
|
+
file_data: {
|
|
2734
|
+
type: "string",
|
|
2735
|
+
description: "Base64-encoded file content (use this when file_path is not available)"
|
|
2736
|
+
},
|
|
2737
|
+
filename: {
|
|
2738
|
+
type: "string",
|
|
2739
|
+
description: "Filename with extension (required when using file_data)"
|
|
2740
|
+
},
|
|
2741
|
+
contribution_id: {
|
|
2574
2742
|
type: "number",
|
|
2575
|
-
description: "Optional: ID of the storage folder
|
|
2743
|
+
description: "Optional: ID of a contribution (upload link) to upload through. Assets will go to the contribution's configured storage folder or lightbox."
|
|
2576
2744
|
}
|
|
2577
2745
|
},
|
|
2578
|
-
required: [
|
|
2746
|
+
required: []
|
|
2579
2747
|
}
|
|
2580
2748
|
},
|
|
2581
2749
|
{
|
|
2582
2750
|
name: "upload_files",
|
|
2583
2751
|
description: `Upload multiple files from the local filesystem to Mediagraph.
|
|
2584
2752
|
Creates new assets for each file in the user's Mediagraph library.
|
|
2585
|
-
All files are uploaded in a single upload session
|
|
2753
|
+
All files are uploaded in a single upload session.
|
|
2754
|
+
|
|
2755
|
+
By default, assets are uploaded to the default storage folder. To upload to a specific destination,
|
|
2756
|
+
provide a contribution_id - assets will go to the contribution's configured storage folder or lightbox.`,
|
|
2586
2757
|
inputSchema: {
|
|
2587
2758
|
type: "object",
|
|
2588
2759
|
properties: {
|
|
@@ -2591,9 +2762,9 @@ All files are uploaded in a single upload session.`,
|
|
|
2591
2762
|
items: { type: "string" },
|
|
2592
2763
|
description: "Array of absolute paths to files on the local filesystem"
|
|
2593
2764
|
},
|
|
2594
|
-
|
|
2765
|
+
contribution_id: {
|
|
2595
2766
|
type: "number",
|
|
2596
|
-
description: "Optional: ID of the storage folder
|
|
2767
|
+
description: "Optional: ID of a contribution (upload link) to upload through. Assets will go to the contribution's configured storage folder or lightbox."
|
|
2597
2768
|
}
|
|
2598
2769
|
},
|
|
2599
2770
|
required: ["file_paths"]
|
|
@@ -2603,29 +2774,47 @@ All files are uploaded in a single upload session.`,
|
|
|
2603
2774
|
handlers: {
|
|
2604
2775
|
async upload_file(args, { client: client2 }) {
|
|
2605
2776
|
const filePath = args.file_path;
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
if (
|
|
2613
|
-
|
|
2777
|
+
const fileDataB64 = args.file_data;
|
|
2778
|
+
const providedFilename = args.filename;
|
|
2779
|
+
const contributionId = args.contribution_id;
|
|
2780
|
+
let fileData;
|
|
2781
|
+
let filename;
|
|
2782
|
+
let fileSize;
|
|
2783
|
+
if (fileDataB64) {
|
|
2784
|
+
if (!providedFilename) {
|
|
2785
|
+
return errorResult("filename is required when using file_data");
|
|
2786
|
+
}
|
|
2787
|
+
fileData = Buffer.from(fileDataB64, "base64");
|
|
2788
|
+
filename = providedFilename;
|
|
2789
|
+
fileSize = fileData.length;
|
|
2790
|
+
} else if (filePath) {
|
|
2791
|
+
let fileStats;
|
|
2792
|
+
try {
|
|
2793
|
+
fileStats = await stat(filePath);
|
|
2794
|
+
} catch {
|
|
2795
|
+
return errorResult(`File not found: ${filePath}`);
|
|
2796
|
+
}
|
|
2797
|
+
if (!fileStats.isFile()) {
|
|
2798
|
+
return errorResult(`Not a file: ${filePath}`);
|
|
2799
|
+
}
|
|
2800
|
+
fileData = await readFile(filePath);
|
|
2801
|
+
filename = basename(filePath);
|
|
2802
|
+
fileSize = fileStats.size;
|
|
2803
|
+
} else {
|
|
2804
|
+
return errorResult("Either file_path or file_data (with filename) is required");
|
|
2614
2805
|
}
|
|
2615
|
-
const fileData = await readFile(filePath);
|
|
2616
|
-
const filename = basename(filePath);
|
|
2617
2806
|
const contentType = getMimeType(filename);
|
|
2618
|
-
const upload = await client2.createUpload();
|
|
2807
|
+
const upload = contributionId ? await client2.createUploadFromContribution(contributionId) : await client2.createUpload();
|
|
2619
2808
|
const preparedAsset = await client2.prepareAssetUpload(upload.guid, {
|
|
2620
2809
|
filename,
|
|
2621
|
-
file_size:
|
|
2810
|
+
file_size: fileSize,
|
|
2622
2811
|
created_via: "mcp"
|
|
2623
2812
|
});
|
|
2624
2813
|
await client2.uploadToSignedUrl(preparedAsset.signed_upload_url, fileData, contentType);
|
|
2625
2814
|
const asset = await client2.setAssetUploaded(preparedAsset.guid);
|
|
2626
2815
|
await client2.setUploadDone(upload.id);
|
|
2627
2816
|
return successResult({
|
|
2628
|
-
message: `Successfully uploaded ${filename}`,
|
|
2817
|
+
message: `Successfully uploaded ${filename}${contributionId ? ` via contribution ${contributionId}` : ""}`,
|
|
2629
2818
|
asset: {
|
|
2630
2819
|
id: asset.id,
|
|
2631
2820
|
guid: asset.guid,
|
|
@@ -2633,15 +2822,17 @@ All files are uploaded in a single upload session.`,
|
|
|
2633
2822
|
file_size: asset.file_size,
|
|
2634
2823
|
mime_type: asset.mime_type
|
|
2635
2824
|
},
|
|
2636
|
-
upload_guid: upload.guid
|
|
2825
|
+
upload_guid: upload.guid,
|
|
2826
|
+
contribution_id: contributionId
|
|
2637
2827
|
});
|
|
2638
2828
|
},
|
|
2639
2829
|
async upload_files(args, { client: client2 }) {
|
|
2640
2830
|
const filePaths = args.file_paths;
|
|
2831
|
+
const contributionId = args.contribution_id;
|
|
2641
2832
|
if (!filePaths || filePaths.length === 0) {
|
|
2642
2833
|
return errorResult("No files provided");
|
|
2643
2834
|
}
|
|
2644
|
-
const upload = await client2.createUpload();
|
|
2835
|
+
const upload = contributionId ? await client2.createUploadFromContribution(contributionId) : await client2.createUpload();
|
|
2645
2836
|
const results = [];
|
|
2646
2837
|
for (const filePath of filePaths) {
|
|
2647
2838
|
try {
|
|
@@ -2677,8 +2868,9 @@ All files are uploaded in a single upload session.`,
|
|
|
2677
2868
|
await client2.setUploadDone(upload.id);
|
|
2678
2869
|
const successCount = results.filter((r) => r.success).length;
|
|
2679
2870
|
return successResult({
|
|
2680
|
-
message: `Uploaded ${successCount} of ${filePaths.length} files`,
|
|
2871
|
+
message: `Uploaded ${successCount} of ${filePaths.length} files${contributionId ? ` via contribution ${contributionId}` : ""}`,
|
|
2681
2872
|
upload_guid: upload.guid,
|
|
2873
|
+
contribution_id: contributionId,
|
|
2682
2874
|
results
|
|
2683
2875
|
});
|
|
2684
2876
|
}
|
|
@@ -2700,15 +2892,24 @@ var webhookTools = {
|
|
|
2700
2892
|
},
|
|
2701
2893
|
{
|
|
2702
2894
|
name: "create_webhook",
|
|
2703
|
-
description: "Create a webhook",
|
|
2895
|
+
description: "Create a webhook to receive event notifications",
|
|
2704
2896
|
inputSchema: {
|
|
2705
2897
|
type: "object",
|
|
2706
2898
|
properties: {
|
|
2707
|
-
name: { type: "string" },
|
|
2708
|
-
url: { type: "string" },
|
|
2709
|
-
events: {
|
|
2899
|
+
name: { type: "string", description: "Webhook name" },
|
|
2900
|
+
url: { type: "string", description: "Destination URL to POST events to" },
|
|
2901
|
+
events: {
|
|
2902
|
+
type: "string",
|
|
2903
|
+
description: "Comma-separated list of events: asset.created, asset.updated, asset.deleted, asset.restored, collection.updated"
|
|
2904
|
+
},
|
|
2905
|
+
enabled: { type: "boolean", description: "Enable the webhook (default: true)" },
|
|
2906
|
+
asset_group_id: { type: "number", description: "Scope to specific Collection or StorageFolder" },
|
|
2907
|
+
include_download_url: { type: "boolean", description: "Include asset download URL in payload" },
|
|
2908
|
+
group_assets: { type: "boolean", description: "Group multiple asset events into single request" },
|
|
2909
|
+
trash: { type: "boolean", description: "Include trash events" },
|
|
2910
|
+
note: { type: "string", description: "Internal notes" }
|
|
2710
2911
|
},
|
|
2711
|
-
required: ["name", "url"
|
|
2912
|
+
required: ["name", "url"]
|
|
2712
2913
|
}
|
|
2713
2914
|
},
|
|
2714
2915
|
{
|
|
@@ -2772,21 +2973,22 @@ var adminTools = {
|
|
|
2772
2973
|
inputSchema: {
|
|
2773
2974
|
type: "object",
|
|
2774
2975
|
properties: {
|
|
2775
|
-
email: { type: "string" },
|
|
2776
|
-
|
|
2976
|
+
email: { type: "string", description: "Email address(es) to invite (comma/semicolon separated for multiple)" },
|
|
2977
|
+
role_level: { type: "string", enum: ["admin", "global_content", "global_library", "global_tagger", "general", "restricted"] },
|
|
2978
|
+
note: { type: "string", description: "Note to include in invite email" }
|
|
2777
2979
|
},
|
|
2778
|
-
required: ["email", "
|
|
2980
|
+
required: ["email", "role_level"]
|
|
2779
2981
|
}
|
|
2780
2982
|
},
|
|
2781
2983
|
{
|
|
2782
2984
|
name: "update_invite",
|
|
2783
|
-
description: "Update an invite (change
|
|
2985
|
+
description: "Update an invite (change role or note)",
|
|
2784
2986
|
inputSchema: {
|
|
2785
2987
|
type: "object",
|
|
2786
2988
|
properties: {
|
|
2787
2989
|
id: idParam,
|
|
2788
|
-
|
|
2789
|
-
|
|
2990
|
+
role_level: { type: "string", enum: ["admin", "global_content", "global_library", "global_tagger", "general", "restricted"] },
|
|
2991
|
+
note: { type: "string" }
|
|
2790
2992
|
},
|
|
2791
2993
|
required: ["id"]
|
|
2792
2994
|
}
|
|
@@ -2802,37 +3004,97 @@ var adminTools = {
|
|
|
2802
3004
|
description: "List saved filter groups",
|
|
2803
3005
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2804
3006
|
},
|
|
3007
|
+
{
|
|
3008
|
+
name: "get_filter_group",
|
|
3009
|
+
description: "Get filter group details",
|
|
3010
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3011
|
+
},
|
|
2805
3012
|
{
|
|
2806
3013
|
name: "create_filter_group",
|
|
2807
|
-
description: "
|
|
3014
|
+
description: "Create a new filter group with saved filter configurations",
|
|
2808
3015
|
inputSchema: {
|
|
2809
3016
|
type: "object",
|
|
2810
3017
|
properties: {
|
|
2811
3018
|
name: { type: "string" },
|
|
2812
|
-
|
|
3019
|
+
filter_order: { type: "array", items: { type: "string" }, description: "Array of filter names in display order" }
|
|
3020
|
+
},
|
|
3021
|
+
required: ["name"]
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
name: "update_filter_group",
|
|
3026
|
+
description: "Update a filter group",
|
|
3027
|
+
inputSchema: {
|
|
3028
|
+
type: "object",
|
|
3029
|
+
properties: {
|
|
3030
|
+
id: idParam,
|
|
3031
|
+
name: { type: "string" },
|
|
3032
|
+
filter_order: { type: "array", items: { type: "string" }, description: "Array of filter names in display order" }
|
|
3033
|
+
},
|
|
3034
|
+
required: ["id"]
|
|
3035
|
+
}
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
name: "update_filter_group_visibility",
|
|
3039
|
+
description: "Update the visibility of a specific filter within a filter group",
|
|
3040
|
+
inputSchema: {
|
|
3041
|
+
type: "object",
|
|
3042
|
+
properties: {
|
|
3043
|
+
id: idParam,
|
|
3044
|
+
name: { type: "string", description: "Filter name" },
|
|
3045
|
+
type: { type: "string", enum: ["explore", "manage"], description: "Visibility type" },
|
|
3046
|
+
visible: { type: "boolean", description: "Visibility status" }
|
|
2813
3047
|
},
|
|
2814
|
-
required: ["name", "
|
|
3048
|
+
required: ["id", "name", "type", "visible"]
|
|
2815
3049
|
}
|
|
2816
3050
|
},
|
|
3051
|
+
{
|
|
3052
|
+
name: "delete_filter_group",
|
|
3053
|
+
description: "Delete a filter group",
|
|
3054
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3055
|
+
},
|
|
2817
3056
|
// Search Queries
|
|
2818
3057
|
{
|
|
2819
3058
|
name: "list_search_queries",
|
|
2820
3059
|
description: "List saved search queries",
|
|
2821
3060
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2822
3061
|
},
|
|
3062
|
+
{
|
|
3063
|
+
name: "get_search_query",
|
|
3064
|
+
description: "Get search query details",
|
|
3065
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3066
|
+
},
|
|
2823
3067
|
{
|
|
2824
3068
|
name: "create_search_query",
|
|
2825
|
-
description: "Save a search query",
|
|
3069
|
+
description: "Save a new search query. The sql field should contain an Elasticsearch SQL WHERE clause.",
|
|
2826
3070
|
inputSchema: {
|
|
2827
3071
|
type: "object",
|
|
2828
3072
|
properties: {
|
|
3073
|
+
name: { type: "string", description: "Search name" },
|
|
3074
|
+
description: { type: "string", description: "Search description" },
|
|
3075
|
+
sql: { type: "string", description: "SQL WHERE clause (Elasticsearch SQL syntax)" }
|
|
3076
|
+
},
|
|
3077
|
+
required: ["name", "sql"]
|
|
3078
|
+
}
|
|
3079
|
+
},
|
|
3080
|
+
{
|
|
3081
|
+
name: "update_search_query",
|
|
3082
|
+
description: "Update a saved search query name or description. Note: The SQL query cannot be changed after creation.",
|
|
3083
|
+
inputSchema: {
|
|
3084
|
+
type: "object",
|
|
3085
|
+
properties: {
|
|
3086
|
+
id: idParam,
|
|
2829
3087
|
name: { type: "string" },
|
|
2830
|
-
|
|
2831
|
-
filters: { type: "object" }
|
|
3088
|
+
description: { type: "string" }
|
|
2832
3089
|
},
|
|
2833
|
-
required: ["
|
|
3090
|
+
required: ["id"]
|
|
2834
3091
|
}
|
|
2835
3092
|
},
|
|
3093
|
+
{
|
|
3094
|
+
name: "delete_search_query",
|
|
3095
|
+
description: "Delete a saved search query",
|
|
3096
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3097
|
+
},
|
|
2836
3098
|
// Crop Presets
|
|
2837
3099
|
{
|
|
2838
3100
|
name: "list_crop_presets",
|
|
@@ -2878,7 +3140,7 @@ var adminTools = {
|
|
|
2878
3140
|
// Contributions
|
|
2879
3141
|
{
|
|
2880
3142
|
name: "list_contributions",
|
|
2881
|
-
description: "List contribution portals",
|
|
3143
|
+
description: "List contribution portals (upload links). Use contribution_id with upload_file/upload_files to upload to a specific storage folder or lightbox.",
|
|
2882
3144
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2883
3145
|
},
|
|
2884
3146
|
{
|
|
@@ -2936,16 +3198,44 @@ var adminTools = {
|
|
|
2936
3198
|
async list_filter_groups(args, { client: client2 }) {
|
|
2937
3199
|
return successResult(await client2.listFilterGroups(args));
|
|
2938
3200
|
},
|
|
3201
|
+
async get_filter_group(args, { client: client2 }) {
|
|
3202
|
+
return successResult(await client2.getFilterGroup(args.id));
|
|
3203
|
+
},
|
|
2939
3204
|
async create_filter_group(args, { client: client2 }) {
|
|
2940
3205
|
return successResult(await client2.createFilterGroup(args));
|
|
2941
3206
|
},
|
|
3207
|
+
async update_filter_group(args, { client: client2 }) {
|
|
3208
|
+
const { id, ...data } = args;
|
|
3209
|
+
return successResult(await client2.updateFilterGroup(id, data));
|
|
3210
|
+
},
|
|
3211
|
+
async update_filter_group_visibility(args, { client: client2 }) {
|
|
3212
|
+
return successResult(await client2.updateFilterGroupVisibility(
|
|
3213
|
+
args.id,
|
|
3214
|
+
{ name: args.name, type: args.type, visible: args.visible }
|
|
3215
|
+
));
|
|
3216
|
+
},
|
|
3217
|
+
async delete_filter_group(args, { client: client2 }) {
|
|
3218
|
+
await client2.deleteFilterGroup(args.id);
|
|
3219
|
+
return successResult({ success: true });
|
|
3220
|
+
},
|
|
2942
3221
|
// Search Queries
|
|
2943
3222
|
async list_search_queries(args, { client: client2 }) {
|
|
2944
3223
|
return successResult(await client2.listSearchQueries(args));
|
|
2945
3224
|
},
|
|
3225
|
+
async get_search_query(args, { client: client2 }) {
|
|
3226
|
+
return successResult(await client2.getSearchQuery(args.id));
|
|
3227
|
+
},
|
|
2946
3228
|
async create_search_query(args, { client: client2 }) {
|
|
2947
3229
|
return successResult(await client2.createSearchQuery(args));
|
|
2948
3230
|
},
|
|
3231
|
+
async update_search_query(args, { client: client2 }) {
|
|
3232
|
+
const { id, ...data } = args;
|
|
3233
|
+
return successResult(await client2.updateSearchQuery(id, data));
|
|
3234
|
+
},
|
|
3235
|
+
async delete_search_query(args, { client: client2 }) {
|
|
3236
|
+
await client2.deleteSearchQuery(args.id);
|
|
3237
|
+
return successResult({ success: true });
|
|
3238
|
+
},
|
|
2949
3239
|
// Crop Presets
|
|
2950
3240
|
async list_crop_presets(args, { client: client2 }) {
|
|
2951
3241
|
return successResult(await client2.listCropPresets(args));
|