@mediagraph/mcp 1.0.7 → 1.0.9
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 +365 -96
- 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
|
{
|
|
@@ -2392,8 +2521,15 @@ var workflowTools = {
|
|
|
2392
2521
|
},
|
|
2393
2522
|
{
|
|
2394
2523
|
name: "approve_workflow_step",
|
|
2395
|
-
description: "Approve a workflow step",
|
|
2396
|
-
inputSchema: {
|
|
2524
|
+
description: "Approve selected assets in a workflow step, moving them to the next step",
|
|
2525
|
+
inputSchema: {
|
|
2526
|
+
type: "object",
|
|
2527
|
+
properties: {
|
|
2528
|
+
id: idParam,
|
|
2529
|
+
asset_ids: { type: "array", items: { type: "number" }, description: "Array of asset IDs to approve" }
|
|
2530
|
+
},
|
|
2531
|
+
required: ["id", "asset_ids"]
|
|
2532
|
+
}
|
|
2397
2533
|
}
|
|
2398
2534
|
],
|
|
2399
2535
|
handlers: {
|
|
@@ -2404,7 +2540,7 @@ var workflowTools = {
|
|
|
2404
2540
|
return successResult(await client2.getWorkflow(args.id));
|
|
2405
2541
|
},
|
|
2406
2542
|
async approve_workflow_step(args, { client: client2 }) {
|
|
2407
|
-
return successResult(await client2.approveWorkflowStep(args.id));
|
|
2543
|
+
return successResult(await client2.approveWorkflowStep(args.id, args.asset_ids));
|
|
2408
2544
|
}
|
|
2409
2545
|
}
|
|
2410
2546
|
};
|
|
@@ -2415,34 +2551,45 @@ var socialTools = {
|
|
|
2415
2551
|
// Comments
|
|
2416
2552
|
{
|
|
2417
2553
|
name: "list_comments",
|
|
2418
|
-
description: "List comments on a
|
|
2554
|
+
description: "List comments on a Lightbox or Collection",
|
|
2419
2555
|
inputSchema: {
|
|
2420
2556
|
type: "object",
|
|
2421
2557
|
properties: {
|
|
2422
|
-
|
|
2423
|
-
|
|
2558
|
+
type: { type: "string", enum: ["Lightbox", "Collection"], description: "Type of commentable object" },
|
|
2559
|
+
id: { type: "number", description: "ID of the commentable object" },
|
|
2424
2560
|
...paginationParams
|
|
2425
2561
|
},
|
|
2426
|
-
required: ["
|
|
2562
|
+
required: ["type", "id"]
|
|
2427
2563
|
}
|
|
2428
2564
|
},
|
|
2429
2565
|
{
|
|
2430
2566
|
name: "create_comment",
|
|
2431
|
-
description: "Create a comment",
|
|
2567
|
+
description: "Create a new comment on a Lightbox or Collection. Supports markdown and @mentions.",
|
|
2432
2568
|
inputSchema: {
|
|
2433
2569
|
type: "object",
|
|
2434
2570
|
properties: {
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2571
|
+
type: { type: "string", enum: ["Lightbox", "Collection"], description: "Type of commentable object" },
|
|
2572
|
+
id: { type: "number", description: "ID of the commentable object" },
|
|
2573
|
+
text: { type: "string", description: "Comment text (supports markdown and @mentions)" }
|
|
2574
|
+
},
|
|
2575
|
+
required: ["type", "id", "text"]
|
|
2576
|
+
}
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
name: "update_comment",
|
|
2580
|
+
description: "Update a comment. Only the comment author can update their own comments.",
|
|
2581
|
+
inputSchema: {
|
|
2582
|
+
type: "object",
|
|
2583
|
+
properties: {
|
|
2584
|
+
id: idParam,
|
|
2585
|
+
text: { type: "string", description: "Updated comment text" }
|
|
2439
2586
|
},
|
|
2440
|
-
required: ["
|
|
2587
|
+
required: ["id", "text"]
|
|
2441
2588
|
}
|
|
2442
2589
|
},
|
|
2443
2590
|
{
|
|
2444
2591
|
name: "delete_comment",
|
|
2445
|
-
description: "Delete a comment",
|
|
2592
|
+
description: "Delete a comment. Only the comment author can delete their own comments.",
|
|
2446
2593
|
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
2447
2594
|
},
|
|
2448
2595
|
// Notifications
|
|
@@ -2463,7 +2610,17 @@ var socialTools = {
|
|
|
2463
2610
|
return successResult(await client2.listComments(args));
|
|
2464
2611
|
},
|
|
2465
2612
|
async create_comment(args, { client: client2 }) {
|
|
2466
|
-
return successResult(await client2.createComment(
|
|
2613
|
+
return successResult(await client2.createComment(
|
|
2614
|
+
args.type,
|
|
2615
|
+
args.id,
|
|
2616
|
+
{ text: args.text }
|
|
2617
|
+
));
|
|
2618
|
+
},
|
|
2619
|
+
async update_comment(args, { client: client2 }) {
|
|
2620
|
+
return successResult(await client2.updateComment(
|
|
2621
|
+
args.id,
|
|
2622
|
+
{ text: args.text }
|
|
2623
|
+
));
|
|
2467
2624
|
},
|
|
2468
2625
|
async delete_comment(args, { client: client2 }) {
|
|
2469
2626
|
await client2.deleteComment(args.id);
|
|
@@ -2489,7 +2646,11 @@ var downloadTools = {
|
|
|
2489
2646
|
type: "object",
|
|
2490
2647
|
properties: {
|
|
2491
2648
|
asset_ids: { type: "array", items: { type: "number" } },
|
|
2492
|
-
|
|
2649
|
+
size: {
|
|
2650
|
+
type: "string",
|
|
2651
|
+
enum: ["small", "small-watermark", "permalink", "permalink-watermark", "full", "full-watermark", "original"],
|
|
2652
|
+
description: "Maximum size requested for assets in the download"
|
|
2653
|
+
}
|
|
2493
2654
|
},
|
|
2494
2655
|
required: ["asset_ids"]
|
|
2495
2656
|
}
|
|
@@ -2565,7 +2726,10 @@ var uploadTools = {
|
|
|
2565
2726
|
|
|
2566
2727
|
This creates a new asset in the user's Mediagraph library.
|
|
2567
2728
|
Supports images, videos, audio, documents, and other media files.
|
|
2568
|
-
The file will be processed and thumbnails/previews generated automatically
|
|
2729
|
+
The file will be processed and thumbnails/previews generated automatically.
|
|
2730
|
+
|
|
2731
|
+
By default, assets are uploaded to the default storage folder. To upload to a specific destination,
|
|
2732
|
+
provide a contribution_id - the asset will go to the contribution's configured storage folder or lightbox.`,
|
|
2569
2733
|
inputSchema: {
|
|
2570
2734
|
type: "object",
|
|
2571
2735
|
properties: {
|
|
@@ -2581,9 +2745,9 @@ The file will be processed and thumbnails/previews generated automatically.`,
|
|
|
2581
2745
|
type: "string",
|
|
2582
2746
|
description: "Filename with extension (required when using file_data)"
|
|
2583
2747
|
},
|
|
2584
|
-
|
|
2748
|
+
contribution_id: {
|
|
2585
2749
|
type: "number",
|
|
2586
|
-
description: "Optional: ID of the storage folder
|
|
2750
|
+
description: "Optional: ID of a contribution (upload link) to upload through. Assets will go to the contribution's configured storage folder or lightbox."
|
|
2587
2751
|
}
|
|
2588
2752
|
},
|
|
2589
2753
|
required: []
|
|
@@ -2593,7 +2757,10 @@ The file will be processed and thumbnails/previews generated automatically.`,
|
|
|
2593
2757
|
name: "upload_files",
|
|
2594
2758
|
description: `Upload multiple files from the local filesystem to Mediagraph.
|
|
2595
2759
|
Creates new assets for each file in the user's Mediagraph library.
|
|
2596
|
-
All files are uploaded in a single upload session
|
|
2760
|
+
All files are uploaded in a single upload session.
|
|
2761
|
+
|
|
2762
|
+
By default, assets are uploaded to the default storage folder. To upload to a specific destination,
|
|
2763
|
+
provide a contribution_id - assets will go to the contribution's configured storage folder or lightbox.`,
|
|
2597
2764
|
inputSchema: {
|
|
2598
2765
|
type: "object",
|
|
2599
2766
|
properties: {
|
|
@@ -2602,9 +2769,9 @@ All files are uploaded in a single upload session.`,
|
|
|
2602
2769
|
items: { type: "string" },
|
|
2603
2770
|
description: "Array of absolute paths to files on the local filesystem"
|
|
2604
2771
|
},
|
|
2605
|
-
|
|
2772
|
+
contribution_id: {
|
|
2606
2773
|
type: "number",
|
|
2607
|
-
description: "Optional: ID of the storage folder
|
|
2774
|
+
description: "Optional: ID of a contribution (upload link) to upload through. Assets will go to the contribution's configured storage folder or lightbox."
|
|
2608
2775
|
}
|
|
2609
2776
|
},
|
|
2610
2777
|
required: ["file_paths"]
|
|
@@ -2616,6 +2783,7 @@ All files are uploaded in a single upload session.`,
|
|
|
2616
2783
|
const filePath = args.file_path;
|
|
2617
2784
|
const fileDataB64 = args.file_data;
|
|
2618
2785
|
const providedFilename = args.filename;
|
|
2786
|
+
const contributionId = args.contribution_id;
|
|
2619
2787
|
let fileData;
|
|
2620
2788
|
let filename;
|
|
2621
2789
|
let fileSize;
|
|
@@ -2643,7 +2811,7 @@ All files are uploaded in a single upload session.`,
|
|
|
2643
2811
|
return errorResult("Either file_path or file_data (with filename) is required");
|
|
2644
2812
|
}
|
|
2645
2813
|
const contentType = getMimeType(filename);
|
|
2646
|
-
const upload = await client2.createUpload();
|
|
2814
|
+
const upload = contributionId ? await client2.createUploadFromContribution(contributionId) : await client2.createUpload();
|
|
2647
2815
|
const preparedAsset = await client2.prepareAssetUpload(upload.guid, {
|
|
2648
2816
|
filename,
|
|
2649
2817
|
file_size: fileSize,
|
|
@@ -2653,7 +2821,7 @@ All files are uploaded in a single upload session.`,
|
|
|
2653
2821
|
const asset = await client2.setAssetUploaded(preparedAsset.guid);
|
|
2654
2822
|
await client2.setUploadDone(upload.id);
|
|
2655
2823
|
return successResult({
|
|
2656
|
-
message: `Successfully uploaded ${filename}`,
|
|
2824
|
+
message: `Successfully uploaded ${filename}${contributionId ? ` via contribution ${contributionId}` : ""}`,
|
|
2657
2825
|
asset: {
|
|
2658
2826
|
id: asset.id,
|
|
2659
2827
|
guid: asset.guid,
|
|
@@ -2661,15 +2829,17 @@ All files are uploaded in a single upload session.`,
|
|
|
2661
2829
|
file_size: asset.file_size,
|
|
2662
2830
|
mime_type: asset.mime_type
|
|
2663
2831
|
},
|
|
2664
|
-
upload_guid: upload.guid
|
|
2832
|
+
upload_guid: upload.guid,
|
|
2833
|
+
contribution_id: contributionId
|
|
2665
2834
|
});
|
|
2666
2835
|
},
|
|
2667
2836
|
async upload_files(args, { client: client2 }) {
|
|
2668
2837
|
const filePaths = args.file_paths;
|
|
2838
|
+
const contributionId = args.contribution_id;
|
|
2669
2839
|
if (!filePaths || filePaths.length === 0) {
|
|
2670
2840
|
return errorResult("No files provided");
|
|
2671
2841
|
}
|
|
2672
|
-
const upload = await client2.createUpload();
|
|
2842
|
+
const upload = contributionId ? await client2.createUploadFromContribution(contributionId) : await client2.createUpload();
|
|
2673
2843
|
const results = [];
|
|
2674
2844
|
for (const filePath of filePaths) {
|
|
2675
2845
|
try {
|
|
@@ -2705,8 +2875,9 @@ All files are uploaded in a single upload session.`,
|
|
|
2705
2875
|
await client2.setUploadDone(upload.id);
|
|
2706
2876
|
const successCount = results.filter((r) => r.success).length;
|
|
2707
2877
|
return successResult({
|
|
2708
|
-
message: `Uploaded ${successCount} of ${filePaths.length} files`,
|
|
2878
|
+
message: `Uploaded ${successCount} of ${filePaths.length} files${contributionId ? ` via contribution ${contributionId}` : ""}`,
|
|
2709
2879
|
upload_guid: upload.guid,
|
|
2880
|
+
contribution_id: contributionId,
|
|
2710
2881
|
results
|
|
2711
2882
|
});
|
|
2712
2883
|
}
|
|
@@ -2728,15 +2899,24 @@ var webhookTools = {
|
|
|
2728
2899
|
},
|
|
2729
2900
|
{
|
|
2730
2901
|
name: "create_webhook",
|
|
2731
|
-
description: "Create a webhook",
|
|
2902
|
+
description: "Create a webhook to receive event notifications",
|
|
2732
2903
|
inputSchema: {
|
|
2733
2904
|
type: "object",
|
|
2734
2905
|
properties: {
|
|
2735
|
-
name: { type: "string" },
|
|
2736
|
-
url: { type: "string" },
|
|
2737
|
-
events: {
|
|
2906
|
+
name: { type: "string", description: "Webhook name" },
|
|
2907
|
+
url: { type: "string", description: "Destination URL to POST events to" },
|
|
2908
|
+
events: {
|
|
2909
|
+
type: "string",
|
|
2910
|
+
description: "Comma-separated list of events: asset.created, asset.updated, asset.deleted, asset.restored, collection.updated"
|
|
2911
|
+
},
|
|
2912
|
+
enabled: { type: "boolean", description: "Enable the webhook (default: true)" },
|
|
2913
|
+
asset_group_id: { type: "number", description: "Scope to specific Collection or StorageFolder" },
|
|
2914
|
+
include_download_url: { type: "boolean", description: "Include asset download URL in payload" },
|
|
2915
|
+
group_assets: { type: "boolean", description: "Group multiple asset events into single request" },
|
|
2916
|
+
trash: { type: "boolean", description: "Include trash events" },
|
|
2917
|
+
note: { type: "string", description: "Internal notes" }
|
|
2738
2918
|
},
|
|
2739
|
-
required: ["name", "url"
|
|
2919
|
+
required: ["name", "url"]
|
|
2740
2920
|
}
|
|
2741
2921
|
},
|
|
2742
2922
|
{
|
|
@@ -2800,21 +2980,22 @@ var adminTools = {
|
|
|
2800
2980
|
inputSchema: {
|
|
2801
2981
|
type: "object",
|
|
2802
2982
|
properties: {
|
|
2803
|
-
email: { type: "string" },
|
|
2804
|
-
|
|
2983
|
+
email: { type: "string", description: "Email address(es) to invite (comma/semicolon separated for multiple)" },
|
|
2984
|
+
role_level: { type: "string", enum: ["admin", "global_content", "global_library", "global_tagger", "general", "restricted"] },
|
|
2985
|
+
note: { type: "string", description: "Note to include in invite email" }
|
|
2805
2986
|
},
|
|
2806
|
-
required: ["email", "
|
|
2987
|
+
required: ["email", "role_level"]
|
|
2807
2988
|
}
|
|
2808
2989
|
},
|
|
2809
2990
|
{
|
|
2810
2991
|
name: "update_invite",
|
|
2811
|
-
description: "Update an invite (change
|
|
2992
|
+
description: "Update an invite (change role or note)",
|
|
2812
2993
|
inputSchema: {
|
|
2813
2994
|
type: "object",
|
|
2814
2995
|
properties: {
|
|
2815
2996
|
id: idParam,
|
|
2816
|
-
|
|
2817
|
-
|
|
2997
|
+
role_level: { type: "string", enum: ["admin", "global_content", "global_library", "global_tagger", "general", "restricted"] },
|
|
2998
|
+
note: { type: "string" }
|
|
2818
2999
|
},
|
|
2819
3000
|
required: ["id"]
|
|
2820
3001
|
}
|
|
@@ -2830,37 +3011,97 @@ var adminTools = {
|
|
|
2830
3011
|
description: "List saved filter groups",
|
|
2831
3012
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2832
3013
|
},
|
|
3014
|
+
{
|
|
3015
|
+
name: "get_filter_group",
|
|
3016
|
+
description: "Get filter group details",
|
|
3017
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3018
|
+
},
|
|
2833
3019
|
{
|
|
2834
3020
|
name: "create_filter_group",
|
|
2835
|
-
description: "
|
|
3021
|
+
description: "Create a new filter group with saved filter configurations",
|
|
3022
|
+
inputSchema: {
|
|
3023
|
+
type: "object",
|
|
3024
|
+
properties: {
|
|
3025
|
+
name: { type: "string" },
|
|
3026
|
+
filter_order: { type: "array", items: { type: "string" }, description: "Array of filter names in display order" }
|
|
3027
|
+
},
|
|
3028
|
+
required: ["name"]
|
|
3029
|
+
}
|
|
3030
|
+
},
|
|
3031
|
+
{
|
|
3032
|
+
name: "update_filter_group",
|
|
3033
|
+
description: "Update a filter group",
|
|
2836
3034
|
inputSchema: {
|
|
2837
3035
|
type: "object",
|
|
2838
3036
|
properties: {
|
|
3037
|
+
id: idParam,
|
|
2839
3038
|
name: { type: "string" },
|
|
2840
|
-
|
|
3039
|
+
filter_order: { type: "array", items: { type: "string" }, description: "Array of filter names in display order" }
|
|
3040
|
+
},
|
|
3041
|
+
required: ["id"]
|
|
3042
|
+
}
|
|
3043
|
+
},
|
|
3044
|
+
{
|
|
3045
|
+
name: "update_filter_group_visibility",
|
|
3046
|
+
description: "Update the visibility of a specific filter within a filter group",
|
|
3047
|
+
inputSchema: {
|
|
3048
|
+
type: "object",
|
|
3049
|
+
properties: {
|
|
3050
|
+
id: idParam,
|
|
3051
|
+
name: { type: "string", description: "Filter name" },
|
|
3052
|
+
type: { type: "string", enum: ["explore", "manage"], description: "Visibility type" },
|
|
3053
|
+
visible: { type: "boolean", description: "Visibility status" }
|
|
2841
3054
|
},
|
|
2842
|
-
required: ["name", "
|
|
3055
|
+
required: ["id", "name", "type", "visible"]
|
|
2843
3056
|
}
|
|
2844
3057
|
},
|
|
3058
|
+
{
|
|
3059
|
+
name: "delete_filter_group",
|
|
3060
|
+
description: "Delete a filter group",
|
|
3061
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3062
|
+
},
|
|
2845
3063
|
// Search Queries
|
|
2846
3064
|
{
|
|
2847
3065
|
name: "list_search_queries",
|
|
2848
3066
|
description: "List saved search queries",
|
|
2849
3067
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2850
3068
|
},
|
|
3069
|
+
{
|
|
3070
|
+
name: "get_search_query",
|
|
3071
|
+
description: "Get search query details",
|
|
3072
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3073
|
+
},
|
|
2851
3074
|
{
|
|
2852
3075
|
name: "create_search_query",
|
|
2853
|
-
description: "Save a search query",
|
|
3076
|
+
description: "Save a new search query. The sql field should contain an Elasticsearch SQL WHERE clause.",
|
|
2854
3077
|
inputSchema: {
|
|
2855
3078
|
type: "object",
|
|
2856
3079
|
properties: {
|
|
3080
|
+
name: { type: "string", description: "Search name" },
|
|
3081
|
+
description: { type: "string", description: "Search description" },
|
|
3082
|
+
sql: { type: "string", description: "SQL WHERE clause (Elasticsearch SQL syntax)" }
|
|
3083
|
+
},
|
|
3084
|
+
required: ["name", "sql"]
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
name: "update_search_query",
|
|
3089
|
+
description: "Update a saved search query name or description. Note: The SQL query cannot be changed after creation.",
|
|
3090
|
+
inputSchema: {
|
|
3091
|
+
type: "object",
|
|
3092
|
+
properties: {
|
|
3093
|
+
id: idParam,
|
|
2857
3094
|
name: { type: "string" },
|
|
2858
|
-
|
|
2859
|
-
filters: { type: "object" }
|
|
3095
|
+
description: { type: "string" }
|
|
2860
3096
|
},
|
|
2861
|
-
required: ["
|
|
3097
|
+
required: ["id"]
|
|
2862
3098
|
}
|
|
2863
3099
|
},
|
|
3100
|
+
{
|
|
3101
|
+
name: "delete_search_query",
|
|
3102
|
+
description: "Delete a saved search query",
|
|
3103
|
+
inputSchema: { type: "object", properties: { id: idParam }, required: ["id"] }
|
|
3104
|
+
},
|
|
2864
3105
|
// Crop Presets
|
|
2865
3106
|
{
|
|
2866
3107
|
name: "list_crop_presets",
|
|
@@ -2906,7 +3147,7 @@ var adminTools = {
|
|
|
2906
3147
|
// Contributions
|
|
2907
3148
|
{
|
|
2908
3149
|
name: "list_contributions",
|
|
2909
|
-
description: "List contribution portals",
|
|
3150
|
+
description: "List contribution portals (upload links). Use contribution_id with upload_file/upload_files to upload to a specific storage folder or lightbox.",
|
|
2910
3151
|
inputSchema: { type: "object", properties: { ...paginationParams }, required: [] }
|
|
2911
3152
|
},
|
|
2912
3153
|
{
|
|
@@ -2964,16 +3205,44 @@ var adminTools = {
|
|
|
2964
3205
|
async list_filter_groups(args, { client: client2 }) {
|
|
2965
3206
|
return successResult(await client2.listFilterGroups(args));
|
|
2966
3207
|
},
|
|
3208
|
+
async get_filter_group(args, { client: client2 }) {
|
|
3209
|
+
return successResult(await client2.getFilterGroup(args.id));
|
|
3210
|
+
},
|
|
2967
3211
|
async create_filter_group(args, { client: client2 }) {
|
|
2968
3212
|
return successResult(await client2.createFilterGroup(args));
|
|
2969
3213
|
},
|
|
3214
|
+
async update_filter_group(args, { client: client2 }) {
|
|
3215
|
+
const { id, ...data } = args;
|
|
3216
|
+
return successResult(await client2.updateFilterGroup(id, data));
|
|
3217
|
+
},
|
|
3218
|
+
async update_filter_group_visibility(args, { client: client2 }) {
|
|
3219
|
+
return successResult(await client2.updateFilterGroupVisibility(
|
|
3220
|
+
args.id,
|
|
3221
|
+
{ name: args.name, type: args.type, visible: args.visible }
|
|
3222
|
+
));
|
|
3223
|
+
},
|
|
3224
|
+
async delete_filter_group(args, { client: client2 }) {
|
|
3225
|
+
await client2.deleteFilterGroup(args.id);
|
|
3226
|
+
return successResult({ success: true });
|
|
3227
|
+
},
|
|
2970
3228
|
// Search Queries
|
|
2971
3229
|
async list_search_queries(args, { client: client2 }) {
|
|
2972
3230
|
return successResult(await client2.listSearchQueries(args));
|
|
2973
3231
|
},
|
|
3232
|
+
async get_search_query(args, { client: client2 }) {
|
|
3233
|
+
return successResult(await client2.getSearchQuery(args.id));
|
|
3234
|
+
},
|
|
2974
3235
|
async create_search_query(args, { client: client2 }) {
|
|
2975
3236
|
return successResult(await client2.createSearchQuery(args));
|
|
2976
3237
|
},
|
|
3238
|
+
async update_search_query(args, { client: client2 }) {
|
|
3239
|
+
const { id, ...data } = args;
|
|
3240
|
+
return successResult(await client2.updateSearchQuery(id, data));
|
|
3241
|
+
},
|
|
3242
|
+
async delete_search_query(args, { client: client2 }) {
|
|
3243
|
+
await client2.deleteSearchQuery(args.id);
|
|
3244
|
+
return successResult({ success: true });
|
|
3245
|
+
},
|
|
2977
3246
|
// Crop Presets
|
|
2978
3247
|
async list_crop_presets(args, { client: client2 }) {
|
|
2979
3248
|
return successResult(await client2.listCropPresets(args));
|