@imagekit/api-mcp 7.1.1
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/LICENSE +201 -0
- package/README.md +351 -0
- package/code-tool-paths.cjs +6 -0
- package/code-tool-paths.cjs.map +1 -0
- package/code-tool-paths.d.cts +2 -0
- package/code-tool-paths.d.cts.map +1 -0
- package/code-tool-types.d.mts +14 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +14 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool-worker.d.mts +5 -0
- package/code-tool-worker.d.mts.map +1 -0
- package/code-tool-worker.d.ts +5 -0
- package/code-tool-worker.d.ts.map +1 -0
- package/code-tool-worker.js +45 -0
- package/code-tool-worker.js.map +1 -0
- package/code-tool-worker.mjs +40 -0
- package/code-tool-worker.mjs.map +1 -0
- package/code-tool.d.mts +12 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +12 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +159 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +123 -0
- package/code-tool.mjs.map +1 -0
- package/compat.d.mts +58 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +58 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +387 -0
- package/compat.js.map +1 -0
- package/compat.mjs +378 -0
- package/compat.mjs.map +1 -0
- package/docs-search-tool.d.mts +44 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +44 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +43 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +39 -0
- package/docs-search-tool.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +135 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +132 -0
- package/dynamic-tools.mjs.map +1 -0
- package/filtering.d.mts +2 -0
- package/filtering.d.mts.map +1 -0
- package/filtering.d.ts +2 -0
- package/filtering.d.ts.map +1 -0
- package/filtering.js +20 -0
- package/filtering.js.map +1 -0
- package/filtering.mjs +13 -0
- package/filtering.mjs.map +1 -0
- package/headers.d.mts +4 -0
- package/headers.d.mts.map +1 -0
- package/headers.d.ts +4 -0
- package/headers.d.ts.map +1 -0
- package/headers.js +29 -0
- package/headers.js.map +1 -0
- package/headers.mjs +25 -0
- package/headers.mjs.map +1 -0
- package/http.d.mts +9 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +9 -0
- package/http.d.ts.map +1 -0
- package/http.js +108 -0
- package/http.js.map +1 -0
- package/http.mjs +100 -0
- package/http.mjs.map +1 -0
- package/index.d.mts +3 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +91 -0
- package/index.js.map +1 -0
- package/index.mjs +89 -0
- package/index.mjs.map +1 -0
- package/options.d.mts +20 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +20 -0
- package/options.d.ts.map +1 -0
- package/options.js +424 -0
- package/options.js.map +1 -0
- package/options.mjs +417 -0
- package/options.mjs.map +1 -0
- package/package.json +216 -0
- package/server.d.mts +35 -0
- package/server.d.mts.map +1 -0
- package/server.d.ts +35 -0
- package/server.d.ts.map +1 -0
- package/server.js +174 -0
- package/server.js.map +1 -0
- package/server.mjs +160 -0
- package/server.mjs.map +1 -0
- package/src/code-tool-paths.cts +3 -0
- package/src/code-tool-types.ts +14 -0
- package/src/code-tool-worker.ts +46 -0
- package/src/code-tool.ts +148 -0
- package/src/compat.ts +483 -0
- package/src/docs-search-tool.ts +48 -0
- package/src/dynamic-tools.ts +153 -0
- package/src/filtering.ts +14 -0
- package/src/headers.ts +31 -0
- package/src/http.ts +127 -0
- package/src/index.ts +108 -0
- package/src/options.ts +466 -0
- package/src/server.ts +207 -0
- package/src/stdio.ts +13 -0
- package/src/tools/accounts/origins/create-accounts-origins.ts +318 -0
- package/src/tools/accounts/origins/delete-accounts-origins.ts +43 -0
- package/src/tools/accounts/origins/get-accounts-origins.ts +41 -0
- package/src/tools/accounts/origins/list-accounts-origins.ts +35 -0
- package/src/tools/accounts/origins/update-accounts-origins.ts +360 -0
- package/src/tools/accounts/url-endpoints/create-accounts-url-endpoints.ts +103 -0
- package/src/tools/accounts/url-endpoints/delete-accounts-url-endpoints.ts +43 -0
- package/src/tools/accounts/url-endpoints/get-accounts-url-endpoints.ts +49 -0
- package/src/tools/accounts/url-endpoints/list-accounts-url-endpoints.ts +44 -0
- package/src/tools/accounts/url-endpoints/update-accounts-url-endpoints.ts +112 -0
- package/src/tools/accounts/usage/get-accounts-usage.ts +56 -0
- package/src/tools/assets/list-assets.ts +94 -0
- package/src/tools/beta/v2/files/upload-v2-beta-files.ts +316 -0
- package/src/tools/cache/invalidation/create-cache-invalidation.ts +46 -0
- package/src/tools/cache/invalidation/get-cache-invalidation.ts +47 -0
- package/src/tools/custom-metadata-fields/create-custom-metadata-fields.ts +154 -0
- package/src/tools/custom-metadata-fields/delete-custom-metadata-fields.ts +47 -0
- package/src/tools/custom-metadata-fields/list-custom-metadata-fields.ts +53 -0
- package/src/tools/custom-metadata-fields/update-custom-metadata-fields.ts +150 -0
- package/src/tools/files/bulk/add-tags-files-bulk.ts +56 -0
- package/src/tools/files/bulk/delete-files-bulk.ts +49 -0
- package/src/tools/files/bulk/remove-ai-tags-files-bulk.ts +56 -0
- package/src/tools/files/bulk/remove-tags-files-bulk.ts +56 -0
- package/src/tools/files/copy-files.ts +55 -0
- package/src/tools/files/delete-files.ts +41 -0
- package/src/tools/files/get-files.ts +47 -0
- package/src/tools/files/metadata/get-files-metadata.ts +47 -0
- package/src/tools/files/metadata/get-from-url-files-metadata.ts +48 -0
- package/src/tools/files/move-files.ts +50 -0
- package/src/tools/files/rename-files.ts +58 -0
- package/src/tools/files/update-files.ts +196 -0
- package/src/tools/files/upload-files.ts +332 -0
- package/src/tools/files/versions/delete-files-versions.ts +52 -0
- package/src/tools/files/versions/get-files-versions.ts +50 -0
- package/src/tools/files/versions/list-files-versions.ts +47 -0
- package/src/tools/files/versions/restore-files-versions.ts +52 -0
- package/src/tools/folders/copy-folders.ts +55 -0
- package/src/tools/folders/create-folders.ts +52 -0
- package/src/tools/folders/delete-folders.ts +48 -0
- package/src/tools/folders/job/get-folders-job.ts +47 -0
- package/src/tools/folders/move-folders.ts +50 -0
- package/src/tools/folders/rename-folders.ts +56 -0
- package/src/tools/index.ts +153 -0
- package/src/tools/types.ts +103 -0
- package/src/tools.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/tools/accounts/origins/create-accounts-origins.d.mts +45 -0
- package/tools/accounts/origins/create-accounts-origins.d.mts.map +1 -0
- package/tools/accounts/origins/create-accounts-origins.d.ts +45 -0
- package/tools/accounts/origins/create-accounts-origins.d.ts.map +1 -0
- package/tools/accounts/origins/create-accounts-origins.js +314 -0
- package/tools/accounts/origins/create-accounts-origins.js.map +1 -0
- package/tools/accounts/origins/create-accounts-origins.mjs +310 -0
- package/tools/accounts/origins/create-accounts-origins.mjs.map +1 -0
- package/tools/accounts/origins/delete-accounts-origins.d.mts +45 -0
- package/tools/accounts/origins/delete-accounts-origins.d.mts.map +1 -0
- package/tools/accounts/origins/delete-accounts-origins.d.ts +45 -0
- package/tools/accounts/origins/delete-accounts-origins.d.ts.map +1 -0
- package/tools/accounts/origins/delete-accounts-origins.js +38 -0
- package/tools/accounts/origins/delete-accounts-origins.js.map +1 -0
- package/tools/accounts/origins/delete-accounts-origins.mjs +34 -0
- package/tools/accounts/origins/delete-accounts-origins.mjs.map +1 -0
- package/tools/accounts/origins/get-accounts-origins.d.mts +45 -0
- package/tools/accounts/origins/get-accounts-origins.d.mts.map +1 -0
- package/tools/accounts/origins/get-accounts-origins.d.ts +45 -0
- package/tools/accounts/origins/get-accounts-origins.d.ts.map +1 -0
- package/tools/accounts/origins/get-accounts-origins.js +37 -0
- package/tools/accounts/origins/get-accounts-origins.js.map +1 -0
- package/tools/accounts/origins/get-accounts-origins.mjs +33 -0
- package/tools/accounts/origins/get-accounts-origins.mjs.map +1 -0
- package/tools/accounts/origins/list-accounts-origins.d.mts +45 -0
- package/tools/accounts/origins/list-accounts-origins.d.mts.map +1 -0
- package/tools/accounts/origins/list-accounts-origins.d.ts +45 -0
- package/tools/accounts/origins/list-accounts-origins.d.ts.map +1 -0
- package/tools/accounts/origins/list-accounts-origins.js +31 -0
- package/tools/accounts/origins/list-accounts-origins.js.map +1 -0
- package/tools/accounts/origins/list-accounts-origins.mjs +27 -0
- package/tools/accounts/origins/list-accounts-origins.mjs.map +1 -0
- package/tools/accounts/origins/update-accounts-origins.d.mts +45 -0
- package/tools/accounts/origins/update-accounts-origins.d.mts.map +1 -0
- package/tools/accounts/origins/update-accounts-origins.d.ts +45 -0
- package/tools/accounts/origins/update-accounts-origins.d.ts.map +1 -0
- package/tools/accounts/origins/update-accounts-origins.js +348 -0
- package/tools/accounts/origins/update-accounts-origins.js.map +1 -0
- package/tools/accounts/origins/update-accounts-origins.mjs +344 -0
- package/tools/accounts/origins/update-accounts-origins.mjs.map +1 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.d.mts +45 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.d.mts.map +1 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.d.ts +45 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.d.ts.map +1 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.js +95 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.js.map +1 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.mjs +91 -0
- package/tools/accounts/url-endpoints/create-accounts-url-endpoints.mjs.map +1 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.d.mts +45 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.d.mts.map +1 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.d.ts +45 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.d.ts.map +1 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.js +38 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.js.map +1 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.mjs +34 -0
- package/tools/accounts/url-endpoints/delete-accounts-url-endpoints.mjs.map +1 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.d.mts +45 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.d.mts.map +1 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.d.ts +45 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.d.ts.map +1 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.js +43 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.js.map +1 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.mjs +39 -0
- package/tools/accounts/url-endpoints/get-accounts-url-endpoints.mjs.map +1 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.d.mts +45 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.d.mts.map +1 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.d.ts +45 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.d.ts.map +1 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.js +39 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.js.map +1 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.mjs +35 -0
- package/tools/accounts/url-endpoints/list-accounts-url-endpoints.mjs.map +1 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.d.mts +45 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.d.mts.map +1 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.d.ts +45 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.d.ts.map +1 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.js +101 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.js.map +1 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.mjs +97 -0
- package/tools/accounts/url-endpoints/update-accounts-url-endpoints.mjs.map +1 -0
- package/tools/accounts/usage/get-accounts-usage.d.mts +45 -0
- package/tools/accounts/usage/get-accounts-usage.d.mts.map +1 -0
- package/tools/accounts/usage/get-accounts-usage.d.ts +45 -0
- package/tools/accounts/usage/get-accounts-usage.d.ts.map +1 -0
- package/tools/accounts/usage/get-accounts-usage.js +49 -0
- package/tools/accounts/usage/get-accounts-usage.js.map +1 -0
- package/tools/accounts/usage/get-accounts-usage.mjs +45 -0
- package/tools/accounts/usage/get-accounts-usage.mjs.map +1 -0
- package/tools/assets/list-assets.d.mts +45 -0
- package/tools/assets/list-assets.d.mts.map +1 -0
- package/tools/assets/list-assets.d.ts +45 -0
- package/tools/assets/list-assets.d.ts.map +1 -0
- package/tools/assets/list-assets.js +85 -0
- package/tools/assets/list-assets.js.map +1 -0
- package/tools/assets/list-assets.mjs +81 -0
- package/tools/assets/list-assets.mjs.map +1 -0
- package/tools/beta/v2/files/upload-v2-beta-files.d.mts +45 -0
- package/tools/beta/v2/files/upload-v2-beta-files.d.mts.map +1 -0
- package/tools/beta/v2/files/upload-v2-beta-files.d.ts +45 -0
- package/tools/beta/v2/files/upload-v2-beta-files.d.ts.map +1 -0
- package/tools/beta/v2/files/upload-v2-beta-files.js +286 -0
- package/tools/beta/v2/files/upload-v2-beta-files.js.map +1 -0
- package/tools/beta/v2/files/upload-v2-beta-files.mjs +282 -0
- package/tools/beta/v2/files/upload-v2-beta-files.mjs.map +1 -0
- package/tools/cache/invalidation/create-cache-invalidation.d.mts +45 -0
- package/tools/cache/invalidation/create-cache-invalidation.d.mts.map +1 -0
- package/tools/cache/invalidation/create-cache-invalidation.d.ts +45 -0
- package/tools/cache/invalidation/create-cache-invalidation.d.ts.map +1 -0
- package/tools/cache/invalidation/create-cache-invalidation.js +41 -0
- package/tools/cache/invalidation/create-cache-invalidation.js.map +1 -0
- package/tools/cache/invalidation/create-cache-invalidation.mjs +37 -0
- package/tools/cache/invalidation/create-cache-invalidation.mjs.map +1 -0
- package/tools/cache/invalidation/get-cache-invalidation.d.mts +45 -0
- package/tools/cache/invalidation/get-cache-invalidation.d.mts.map +1 -0
- package/tools/cache/invalidation/get-cache-invalidation.d.ts +45 -0
- package/tools/cache/invalidation/get-cache-invalidation.d.ts.map +1 -0
- package/tools/cache/invalidation/get-cache-invalidation.js +42 -0
- package/tools/cache/invalidation/get-cache-invalidation.js.map +1 -0
- package/tools/cache/invalidation/get-cache-invalidation.mjs +38 -0
- package/tools/cache/invalidation/get-cache-invalidation.mjs.map +1 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.d.mts +45 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.d.mts.map +1 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.d.ts +45 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.d.ts.map +1 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.js +139 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.js.map +1 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.mjs +135 -0
- package/tools/custom-metadata-fields/create-custom-metadata-fields.mjs.map +1 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.d.mts +45 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.d.mts.map +1 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.d.ts +45 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.d.ts.map +1 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.js +42 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.js.map +1 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.mjs +38 -0
- package/tools/custom-metadata-fields/delete-custom-metadata-fields.mjs.map +1 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.d.mts +45 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.d.mts.map +1 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.d.ts +45 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.d.ts.map +1 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.js +47 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.js.map +1 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.mjs +43 -0
- package/tools/custom-metadata-fields/list-custom-metadata-fields.mjs.map +1 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.d.mts +45 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.d.mts.map +1 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.d.ts +45 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.d.ts.map +1 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.js +133 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.js.map +1 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.mjs +129 -0
- package/tools/custom-metadata-fields/update-custom-metadata-fields.mjs.map +1 -0
- package/tools/files/bulk/add-tags-files-bulk.d.mts +45 -0
- package/tools/files/bulk/add-tags-files-bulk.d.mts.map +1 -0
- package/tools/files/bulk/add-tags-files-bulk.d.ts +45 -0
- package/tools/files/bulk/add-tags-files-bulk.d.ts.map +1 -0
- package/tools/files/bulk/add-tags-files-bulk.js +51 -0
- package/tools/files/bulk/add-tags-files-bulk.js.map +1 -0
- package/tools/files/bulk/add-tags-files-bulk.mjs +47 -0
- package/tools/files/bulk/add-tags-files-bulk.mjs.map +1 -0
- package/tools/files/bulk/delete-files-bulk.d.mts +45 -0
- package/tools/files/bulk/delete-files-bulk.d.mts.map +1 -0
- package/tools/files/bulk/delete-files-bulk.d.ts +45 -0
- package/tools/files/bulk/delete-files-bulk.d.ts.map +1 -0
- package/tools/files/bulk/delete-files-bulk.js +44 -0
- package/tools/files/bulk/delete-files-bulk.js.map +1 -0
- package/tools/files/bulk/delete-files-bulk.mjs +40 -0
- package/tools/files/bulk/delete-files-bulk.mjs.map +1 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.d.mts +45 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.d.mts.map +1 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.d.ts +45 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.d.ts.map +1 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.js +51 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.js.map +1 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.mjs +47 -0
- package/tools/files/bulk/remove-ai-tags-files-bulk.mjs.map +1 -0
- package/tools/files/bulk/remove-tags-files-bulk.d.mts +45 -0
- package/tools/files/bulk/remove-tags-files-bulk.d.mts.map +1 -0
- package/tools/files/bulk/remove-tags-files-bulk.d.ts +45 -0
- package/tools/files/bulk/remove-tags-files-bulk.d.ts.map +1 -0
- package/tools/files/bulk/remove-tags-files-bulk.js +51 -0
- package/tools/files/bulk/remove-tags-files-bulk.js.map +1 -0
- package/tools/files/bulk/remove-tags-files-bulk.mjs +47 -0
- package/tools/files/bulk/remove-tags-files-bulk.mjs.map +1 -0
- package/tools/files/copy-files.d.mts +45 -0
- package/tools/files/copy-files.d.mts.map +1 -0
- package/tools/files/copy-files.d.ts +45 -0
- package/tools/files/copy-files.d.ts.map +1 -0
- package/tools/files/copy-files.js +49 -0
- package/tools/files/copy-files.js.map +1 -0
- package/tools/files/copy-files.mjs +45 -0
- package/tools/files/copy-files.mjs.map +1 -0
- package/tools/files/delete-files.d.mts +45 -0
- package/tools/files/delete-files.d.mts.map +1 -0
- package/tools/files/delete-files.d.ts +45 -0
- package/tools/files/delete-files.d.ts.map +1 -0
- package/tools/files/delete-files.js +37 -0
- package/tools/files/delete-files.js.map +1 -0
- package/tools/files/delete-files.mjs +33 -0
- package/tools/files/delete-files.mjs.map +1 -0
- package/tools/files/get-files.d.mts +45 -0
- package/tools/files/get-files.d.mts.map +1 -0
- package/tools/files/get-files.d.ts +45 -0
- package/tools/files/get-files.d.ts.map +1 -0
- package/tools/files/get-files.js +42 -0
- package/tools/files/get-files.js.map +1 -0
- package/tools/files/get-files.mjs +38 -0
- package/tools/files/get-files.mjs.map +1 -0
- package/tools/files/metadata/get-files-metadata.d.mts +45 -0
- package/tools/files/metadata/get-files-metadata.d.mts.map +1 -0
- package/tools/files/metadata/get-files-metadata.d.ts +45 -0
- package/tools/files/metadata/get-files-metadata.d.ts.map +1 -0
- package/tools/files/metadata/get-files-metadata.js +42 -0
- package/tools/files/metadata/get-files-metadata.js.map +1 -0
- package/tools/files/metadata/get-files-metadata.mjs +38 -0
- package/tools/files/metadata/get-files-metadata.mjs.map +1 -0
- package/tools/files/metadata/get-from-url-files-metadata.d.mts +45 -0
- package/tools/files/metadata/get-from-url-files-metadata.d.mts.map +1 -0
- package/tools/files/metadata/get-from-url-files-metadata.d.ts +45 -0
- package/tools/files/metadata/get-from-url-files-metadata.d.ts.map +1 -0
- package/tools/files/metadata/get-from-url-files-metadata.js +43 -0
- package/tools/files/metadata/get-from-url-files-metadata.js.map +1 -0
- package/tools/files/metadata/get-from-url-files-metadata.mjs +39 -0
- package/tools/files/metadata/get-from-url-files-metadata.mjs.map +1 -0
- package/tools/files/move-files.d.mts +45 -0
- package/tools/files/move-files.d.mts.map +1 -0
- package/tools/files/move-files.d.ts +45 -0
- package/tools/files/move-files.d.ts.map +1 -0
- package/tools/files/move-files.js +45 -0
- package/tools/files/move-files.js.map +1 -0
- package/tools/files/move-files.mjs +41 -0
- package/tools/files/move-files.mjs.map +1 -0
- package/tools/files/rename-files.d.mts +45 -0
- package/tools/files/rename-files.d.mts.map +1 -0
- package/tools/files/rename-files.d.ts +45 -0
- package/tools/files/rename-files.d.ts.map +1 -0
- package/tools/files/rename-files.js +51 -0
- package/tools/files/rename-files.js.map +1 -0
- package/tools/files/rename-files.mjs +47 -0
- package/tools/files/rename-files.mjs.map +1 -0
- package/tools/files/update-files.d.mts +45 -0
- package/tools/files/update-files.d.mts.map +1 -0
- package/tools/files/update-files.d.ts +45 -0
- package/tools/files/update-files.d.ts.map +1 -0
- package/tools/files/update-files.js +181 -0
- package/tools/files/update-files.js.map +1 -0
- package/tools/files/update-files.mjs +177 -0
- package/tools/files/update-files.mjs.map +1 -0
- package/tools/files/upload-files.d.mts +45 -0
- package/tools/files/upload-files.d.mts.map +1 -0
- package/tools/files/upload-files.d.ts +45 -0
- package/tools/files/upload-files.d.ts.map +1 -0
- package/tools/files/upload-files.js +298 -0
- package/tools/files/upload-files.js.map +1 -0
- package/tools/files/upload-files.mjs +294 -0
- package/tools/files/upload-files.mjs.map +1 -0
- package/tools/files/versions/delete-files-versions.d.mts +45 -0
- package/tools/files/versions/delete-files-versions.d.mts.map +1 -0
- package/tools/files/versions/delete-files-versions.d.ts +45 -0
- package/tools/files/versions/delete-files-versions.d.ts.map +1 -0
- package/tools/files/versions/delete-files-versions.js +45 -0
- package/tools/files/versions/delete-files-versions.js.map +1 -0
- package/tools/files/versions/delete-files-versions.mjs +41 -0
- package/tools/files/versions/delete-files-versions.mjs.map +1 -0
- package/tools/files/versions/get-files-versions.d.mts +45 -0
- package/tools/files/versions/get-files-versions.d.mts.map +1 -0
- package/tools/files/versions/get-files-versions.d.ts +45 -0
- package/tools/files/versions/get-files-versions.d.ts.map +1 -0
- package/tools/files/versions/get-files-versions.js +45 -0
- package/tools/files/versions/get-files-versions.js.map +1 -0
- package/tools/files/versions/get-files-versions.mjs +41 -0
- package/tools/files/versions/get-files-versions.mjs.map +1 -0
- package/tools/files/versions/list-files-versions.d.mts +45 -0
- package/tools/files/versions/list-files-versions.d.mts.map +1 -0
- package/tools/files/versions/list-files-versions.d.ts +45 -0
- package/tools/files/versions/list-files-versions.d.ts.map +1 -0
- package/tools/files/versions/list-files-versions.js +42 -0
- package/tools/files/versions/list-files-versions.js.map +1 -0
- package/tools/files/versions/list-files-versions.mjs +38 -0
- package/tools/files/versions/list-files-versions.mjs.map +1 -0
- package/tools/files/versions/restore-files-versions.d.mts +45 -0
- package/tools/files/versions/restore-files-versions.d.mts.map +1 -0
- package/tools/files/versions/restore-files-versions.d.ts +45 -0
- package/tools/files/versions/restore-files-versions.d.ts.map +1 -0
- package/tools/files/versions/restore-files-versions.js +45 -0
- package/tools/files/versions/restore-files-versions.js.map +1 -0
- package/tools/files/versions/restore-files-versions.mjs +41 -0
- package/tools/files/versions/restore-files-versions.mjs.map +1 -0
- package/tools/folders/copy-folders.d.mts +45 -0
- package/tools/folders/copy-folders.d.mts.map +1 -0
- package/tools/folders/copy-folders.d.ts +45 -0
- package/tools/folders/copy-folders.d.ts.map +1 -0
- package/tools/folders/copy-folders.js +49 -0
- package/tools/folders/copy-folders.js.map +1 -0
- package/tools/folders/copy-folders.mjs +45 -0
- package/tools/folders/copy-folders.mjs.map +1 -0
- package/tools/folders/create-folders.d.mts +45 -0
- package/tools/folders/create-folders.d.mts.map +1 -0
- package/tools/folders/create-folders.d.ts +45 -0
- package/tools/folders/create-folders.d.ts.map +1 -0
- package/tools/folders/create-folders.js +45 -0
- package/tools/folders/create-folders.js.map +1 -0
- package/tools/folders/create-folders.mjs +41 -0
- package/tools/folders/create-folders.mjs.map +1 -0
- package/tools/folders/delete-folders.d.mts +45 -0
- package/tools/folders/delete-folders.d.mts.map +1 -0
- package/tools/folders/delete-folders.d.ts +45 -0
- package/tools/folders/delete-folders.d.ts.map +1 -0
- package/tools/folders/delete-folders.js +43 -0
- package/tools/folders/delete-folders.js.map +1 -0
- package/tools/folders/delete-folders.mjs +39 -0
- package/tools/folders/delete-folders.mjs.map +1 -0
- package/tools/folders/job/get-folders-job.d.mts +45 -0
- package/tools/folders/job/get-folders-job.d.mts.map +1 -0
- package/tools/folders/job/get-folders-job.d.ts +45 -0
- package/tools/folders/job/get-folders-job.d.ts.map +1 -0
- package/tools/folders/job/get-folders-job.js +42 -0
- package/tools/folders/job/get-folders-job.js.map +1 -0
- package/tools/folders/job/get-folders-job.mjs +38 -0
- package/tools/folders/job/get-folders-job.mjs.map +1 -0
- package/tools/folders/move-folders.d.mts +45 -0
- package/tools/folders/move-folders.d.mts.map +1 -0
- package/tools/folders/move-folders.d.ts +45 -0
- package/tools/folders/move-folders.d.ts.map +1 -0
- package/tools/folders/move-folders.js +45 -0
- package/tools/folders/move-folders.js.map +1 -0
- package/tools/folders/move-folders.mjs +41 -0
- package/tools/folders/move-folders.mjs.map +1 -0
- package/tools/folders/rename-folders.d.mts +45 -0
- package/tools/folders/rename-folders.d.mts.map +1 -0
- package/tools/folders/rename-folders.d.ts +45 -0
- package/tools/folders/rename-folders.d.ts.map +1 -0
- package/tools/folders/rename-folders.js +49 -0
- package/tools/folders/rename-folders.js.map +1 -0
- package/tools/folders/rename-folders.mjs +45 -0
- package/tools/folders/rename-folders.mjs.map +1 -0
- package/tools/index.d.mts +10 -0
- package/tools/index.d.mts.map +1 -0
- package/tools/index.d.ts +10 -0
- package/tools/index.d.ts.map +1 -0
- package/tools/index.js +137 -0
- package/tools/index.js.map +1 -0
- package/tools/index.mjs +130 -0
- package/tools/index.mjs.map +1 -0
- package/tools/types.d.mts +51 -0
- package/tools/types.d.mts.map +1 -0
- package/tools/types.d.ts +51 -0
- package/tools/types.d.ts.map +1 -0
- package/tools/types.js +46 -0
- package/tools/types.js.map +1 -0
- package/tools/types.mjs +42 -0
- package/tools/types.mjs.map +1 -0
- package/tools.d.mts +2 -0
- package/tools.d.mts.map +1 -0
- package/tools.d.ts +2 -0
- package/tools.d.ts.map +1 -0
- package/tools.js +18 -0
- package/tools.js.map +1 -0
- package/tools.mjs +2 -0
- package/tools.mjs.map +1 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files.bulk',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'post',
|
|
14
|
+
httpPath: '/v1/files/removeTags',
|
|
15
|
+
operationId: 'remove-tags-bulk',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'remove_tags_files_bulk',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nThis API removes tags from multiple files in bulk. A maximum of 50 files can be specified at a time.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n successfullyUpdatedFileIds: {\n type: 'array',\n description: 'An array of fileIds that in which tags were successfully removed.\\n',\n items: {\n type: 'string'\n }\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
fileIds: {
|
|
26
|
+
type: 'array',
|
|
27
|
+
description: 'An array of fileIds from which you want to remove tags.\n',
|
|
28
|
+
items: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
tags: {
|
|
33
|
+
type: 'array',
|
|
34
|
+
description: 'An array of tags that you want to remove from the files.\n',
|
|
35
|
+
items: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
jq_filter: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'jq Filter',
|
|
42
|
+
description:
|
|
43
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['fileIds', 'tags'],
|
|
47
|
+
},
|
|
48
|
+
annotations: {},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
52
|
+
const { jq_filter, ...body } = args as any;
|
|
53
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.bulk.removeTags(body)));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'post',
|
|
14
|
+
httpPath: '/v1/files/copy',
|
|
15
|
+
operationId: 'copy-file',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'copy_files',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nThis will copy a file from one folder to another. \n\nNote: If any file at the destination has the same name as the source file, then the source file and its versions (if `includeFileVersions` is set to true) will be appended to the destination file version history.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {}\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
destinationPath: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Full path to the folder you want to copy the above file into.\n',
|
|
28
|
+
},
|
|
29
|
+
sourceFilePath: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The full path of the file you want to copy.\n',
|
|
32
|
+
},
|
|
33
|
+
includeFileVersions: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
description:
|
|
36
|
+
'Option to copy all versions of a file. By default, only the current version of the file is copied. When set to true, all versions of the file will be copied. Default value - `false`.\n',
|
|
37
|
+
},
|
|
38
|
+
jq_filter: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
title: 'jq Filter',
|
|
41
|
+
description:
|
|
42
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['destinationPath', 'sourceFilePath'],
|
|
46
|
+
},
|
|
47
|
+
annotations: {},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
51
|
+
const { jq_filter, ...body } = args as any;
|
|
52
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.copy(body)));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
4
|
+
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import ImageKit from '@imagekit/nodejs';
|
|
7
|
+
|
|
8
|
+
export const metadata: Metadata = {
|
|
9
|
+
resource: 'files',
|
|
10
|
+
operation: 'write',
|
|
11
|
+
tags: [],
|
|
12
|
+
httpMethod: 'delete',
|
|
13
|
+
httpPath: '/v1/files/{fileId}',
|
|
14
|
+
operationId: 'delete-file',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const tool: Tool = {
|
|
18
|
+
name: 'delete_files',
|
|
19
|
+
description:
|
|
20
|
+
'This API deletes the file and all its file versions permanently.\n\nNote: If a file or specific transformation has been requested in the past, then the response is cached. Deleting a file does not purge the cache. You can purge the cache using purge cache API.\n',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
fileId: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
required: ['fileId'],
|
|
29
|
+
},
|
|
30
|
+
annotations: {
|
|
31
|
+
idempotentHint: true,
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
36
|
+
const { fileId, ...body } = args as any;
|
|
37
|
+
const response = await client.files.delete(fileId).asResponse();
|
|
38
|
+
return asTextContentResult(await response.text());
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files',
|
|
11
|
+
operation: 'read',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/details',
|
|
15
|
+
operationId: 'get-file-details',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'get_files',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nThis API returns an object with details or attributes about the current version of the file.\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/file',\n $defs: {\n file: {\n type: 'object',\n title: 'File & File Version',\n description: 'Object containing details of a file or file version.',\n properties: {\n AITags: {\n type: 'array',\n description: 'An array of tags assigned to the file by auto tagging.\\n',\n items: {\n type: 'object',\n properties: {\n confidence: {\n type: 'number',\n description: 'Confidence score of the tag.'\n },\n name: {\n type: 'string',\n description: 'Name of the tag.'\n },\n source: {\n type: 'string',\n description: 'Source of the tag. Possible values are `google-auto-tagging` and `aws-auto-tagging`.'\n }\n }\n }\n },\n createdAt: {\n type: 'string',\n description: 'Date and time when the file was uploaded. The date and time is in ISO8601 format.\\n',\n format: 'date-time'\n },\n customCoordinates: {\n type: 'string',\n description: 'An string with custom coordinates of the file.\\n'\n },\n customMetadata: {\n type: 'object',\n description: 'An object with custom metadata for the file.\\n',\n additionalProperties: true\n },\n description: {\n type: 'string',\n description: 'Optional text to describe the contents of the file. Can be set by the user or the ai-auto-description extension.\\n'\n },\n fileId: {\n type: 'string',\n description: 'Unique identifier of the asset.'\n },\n filePath: {\n type: 'string',\n description: 'Path of the file. This is the path you would use in the URL to access the file. For example, if the file is at the root of the media library, the path will be `/file.jpg`. If the file is inside a folder named `images`, the path will be `/images/file.jpg`.\\n'\n },\n fileType: {\n type: 'string',\n description: 'Type of the file. Possible values are `image`, `non-image`.\\n'\n },\n hasAlpha: {\n type: 'boolean',\n description: 'Specifies if the image has an alpha channel.\\n'\n },\n height: {\n type: 'number',\n description: 'Height of the file.\\n'\n },\n isPrivateFile: {\n type: 'boolean',\n description: 'Specifies if the file is private or not.\\n'\n },\n isPublished: {\n type: 'boolean',\n description: 'Specifies if the file is published or not.\\n'\n },\n mime: {\n type: 'string',\n description: 'MIME type of the file.\\n'\n },\n name: {\n type: 'string',\n description: 'Name of the asset.'\n },\n selectedFieldsSchema: {\n type: 'object',\n description: 'This field is included in the response only if the Path policy feature is available in the plan.\\nIt contains schema definitions for the custom metadata fields selected for the specified file path.\\nField selection can only be done when the Path policy feature is enabled.\\n\\nKeys are the names of the custom metadata fields; the value object has details about the custom metadata schema.\\n',\n additionalProperties: true\n },\n size: {\n type: 'number',\n description: 'Size of the file in bytes.\\n'\n },\n tags: {\n type: 'array',\n description: 'An array of tags assigned to the file. Tags are used to search files in the media library.\\n',\n items: {\n type: 'string'\n }\n },\n thumbnail: {\n type: 'string',\n description: 'URL of the thumbnail image. This URL is used to access the thumbnail image of the file in the media library.\\n'\n },\n type: {\n type: 'string',\n description: 'Type of the asset.',\n enum: [ 'file',\n 'file-version'\n ]\n },\n updatedAt: {\n type: 'string',\n description: 'Date and time when the file was last updated. The date and time is in ISO8601 format.\\n',\n format: 'date-time'\n },\n url: {\n type: 'string',\n description: 'URL of the file.\\n'\n },\n versionInfo: {\n type: 'object',\n description: 'An object with details of the file version.\\n',\n properties: {\n id: {\n type: 'string',\n description: 'Unique identifier of the file version.'\n },\n name: {\n type: 'string',\n description: 'Name of the file version.'\n }\n }\n },\n width: {\n type: 'number',\n description: 'Width of the file.\\n'\n }\n }\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
fileId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
jq_filter: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
title: 'jq Filter',
|
|
31
|
+
description:
|
|
32
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: ['fileId'],
|
|
36
|
+
},
|
|
37
|
+
annotations: {
|
|
38
|
+
readOnlyHint: true,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
43
|
+
const { fileId, jq_filter, ...body } = args as any;
|
|
44
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.get(fileId)));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files.metadata',
|
|
11
|
+
operation: 'read',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/metadata',
|
|
15
|
+
operationId: 'get-uploaded-file-metadata',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'get_files_metadata',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nYou can programmatically get image EXIF, pHash, and other metadata for uploaded files in the ImageKit.io media library using this API.\n\nYou can also get the metadata in upload API response by passing `metadata` in `responseFields` parameter.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/metadata',\n $defs: {\n metadata: {\n type: 'object',\n description: 'JSON object containing metadata.',\n properties: {\n audioCodec: {\n type: 'string',\n description: 'The audio codec used in the video (only for video).'\n },\n bitRate: {\n type: 'integer',\n description: 'The bit rate of the video in kbps (only for video).'\n },\n density: {\n type: 'integer',\n description: 'The density of the image in DPI.'\n },\n duration: {\n type: 'integer',\n description: 'The duration of the video in seconds (only for video).'\n },\n exif: {\n type: 'object',\n properties: {\n exif: {\n type: 'object',\n description: 'Object containing Exif details.',\n properties: {\n ApertureValue: {\n type: 'number'\n },\n ColorSpace: {\n type: 'integer'\n },\n CreateDate: {\n type: 'string'\n },\n CustomRendered: {\n type: 'integer'\n },\n DateTimeOriginal: {\n type: 'string'\n },\n ExifImageHeight: {\n type: 'integer'\n },\n ExifImageWidth: {\n type: 'integer'\n },\n ExifVersion: {\n type: 'string'\n },\n ExposureCompensation: {\n type: 'number'\n },\n ExposureMode: {\n type: 'integer'\n },\n ExposureProgram: {\n type: 'integer'\n },\n ExposureTime: {\n type: 'number'\n },\n Flash: {\n type: 'integer'\n },\n FlashpixVersion: {\n type: 'string'\n },\n FNumber: {\n type: 'number'\n },\n FocalLength: {\n type: 'integer'\n },\n FocalPlaneResolutionUnit: {\n type: 'integer'\n },\n FocalPlaneXResolution: {\n type: 'number'\n },\n FocalPlaneYResolution: {\n type: 'number'\n },\n InteropOffset: {\n type: 'integer'\n },\n ISO: {\n type: 'integer'\n },\n MeteringMode: {\n type: 'integer'\n },\n SceneCaptureType: {\n type: 'integer'\n },\n ShutterSpeedValue: {\n type: 'number'\n },\n SubSecTime: {\n type: 'string'\n },\n WhiteBalance: {\n type: 'integer'\n }\n }\n },\n gps: {\n type: 'object',\n description: 'Object containing GPS information.',\n properties: {\n GPSVersionID: {\n type: 'array',\n items: {\n type: 'integer'\n }\n }\n }\n },\n image: {\n type: 'object',\n description: 'Object containing EXIF image information.',\n properties: {\n ExifOffset: {\n type: 'integer'\n },\n GPSInfo: {\n type: 'integer'\n },\n Make: {\n type: 'string'\n },\n Model: {\n type: 'string'\n },\n ModifyDate: {\n type: 'string'\n },\n Orientation: {\n type: 'integer'\n },\n ResolutionUnit: {\n type: 'integer'\n },\n Software: {\n type: 'string'\n },\n XResolution: {\n type: 'integer'\n },\n YCbCrPositioning: {\n type: 'integer'\n },\n YResolution: {\n type: 'integer'\n }\n }\n },\n interoperability: {\n type: 'object',\n description: 'JSON object.',\n properties: {\n InteropIndex: {\n type: 'string'\n },\n InteropVersion: {\n type: 'string'\n }\n }\n },\n makernote: {\n type: 'object',\n additionalProperties: true\n },\n thumbnail: {\n type: 'object',\n description: 'Object containing Thumbnail information.',\n properties: {\n Compression: {\n type: 'integer'\n },\n ResolutionUnit: {\n type: 'integer'\n },\n ThumbnailLength: {\n type: 'integer'\n },\n ThumbnailOffset: {\n type: 'integer'\n },\n XResolution: {\n type: 'integer'\n },\n YResolution: {\n type: 'integer'\n }\n }\n }\n }\n },\n format: {\n type: 'string',\n description: 'The format of the file (e.g., \\'jpg\\', \\'mp4\\').'\n },\n hasColorProfile: {\n type: 'boolean',\n description: 'Indicates if the image has a color profile.'\n },\n hasTransparency: {\n type: 'boolean',\n description: 'Indicates if the image contains transparent areas.'\n },\n height: {\n type: 'integer',\n description: 'The height of the image or video in pixels.'\n },\n pHash: {\n type: 'string',\n description: 'Perceptual hash of the image.'\n },\n quality: {\n type: 'integer',\n description: 'The quality indicator of the image.'\n },\n size: {\n type: 'integer',\n description: 'The file size in bytes.'\n },\n videoCodec: {\n type: 'string',\n description: 'The video codec used in the video (only for video).'\n },\n width: {\n type: 'integer',\n description: 'The width of the image or video in pixels.'\n }\n }\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
fileId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
jq_filter: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
title: 'jq Filter',
|
|
31
|
+
description:
|
|
32
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
required: ['fileId'],
|
|
36
|
+
},
|
|
37
|
+
annotations: {
|
|
38
|
+
readOnlyHint: true,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
43
|
+
const { fileId, jq_filter, ...body } = args as any;
|
|
44
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.metadata.get(fileId)));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files.metadata',
|
|
11
|
+
operation: 'read',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/v1/files/metadata',
|
|
15
|
+
operationId: 'get-metadata-from-url',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'get_from_url_files_metadata',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nGet image EXIF, pHash, and other metadata from ImageKit.io powered remote URL using this API.\n\n\n# Response Schema\n```json\n{\n $ref: '#/$defs/metadata',\n $defs: {\n metadata: {\n type: 'object',\n description: 'JSON object containing metadata.',\n properties: {\n audioCodec: {\n type: 'string',\n description: 'The audio codec used in the video (only for video).'\n },\n bitRate: {\n type: 'integer',\n description: 'The bit rate of the video in kbps (only for video).'\n },\n density: {\n type: 'integer',\n description: 'The density of the image in DPI.'\n },\n duration: {\n type: 'integer',\n description: 'The duration of the video in seconds (only for video).'\n },\n exif: {\n type: 'object',\n properties: {\n exif: {\n type: 'object',\n description: 'Object containing Exif details.',\n properties: {\n ApertureValue: {\n type: 'number'\n },\n ColorSpace: {\n type: 'integer'\n },\n CreateDate: {\n type: 'string'\n },\n CustomRendered: {\n type: 'integer'\n },\n DateTimeOriginal: {\n type: 'string'\n },\n ExifImageHeight: {\n type: 'integer'\n },\n ExifImageWidth: {\n type: 'integer'\n },\n ExifVersion: {\n type: 'string'\n },\n ExposureCompensation: {\n type: 'number'\n },\n ExposureMode: {\n type: 'integer'\n },\n ExposureProgram: {\n type: 'integer'\n },\n ExposureTime: {\n type: 'number'\n },\n Flash: {\n type: 'integer'\n },\n FlashpixVersion: {\n type: 'string'\n },\n FNumber: {\n type: 'number'\n },\n FocalLength: {\n type: 'integer'\n },\n FocalPlaneResolutionUnit: {\n type: 'integer'\n },\n FocalPlaneXResolution: {\n type: 'number'\n },\n FocalPlaneYResolution: {\n type: 'number'\n },\n InteropOffset: {\n type: 'integer'\n },\n ISO: {\n type: 'integer'\n },\n MeteringMode: {\n type: 'integer'\n },\n SceneCaptureType: {\n type: 'integer'\n },\n ShutterSpeedValue: {\n type: 'number'\n },\n SubSecTime: {\n type: 'string'\n },\n WhiteBalance: {\n type: 'integer'\n }\n }\n },\n gps: {\n type: 'object',\n description: 'Object containing GPS information.',\n properties: {\n GPSVersionID: {\n type: 'array',\n items: {\n type: 'integer'\n }\n }\n }\n },\n image: {\n type: 'object',\n description: 'Object containing EXIF image information.',\n properties: {\n ExifOffset: {\n type: 'integer'\n },\n GPSInfo: {\n type: 'integer'\n },\n Make: {\n type: 'string'\n },\n Model: {\n type: 'string'\n },\n ModifyDate: {\n type: 'string'\n },\n Orientation: {\n type: 'integer'\n },\n ResolutionUnit: {\n type: 'integer'\n },\n Software: {\n type: 'string'\n },\n XResolution: {\n type: 'integer'\n },\n YCbCrPositioning: {\n type: 'integer'\n },\n YResolution: {\n type: 'integer'\n }\n }\n },\n interoperability: {\n type: 'object',\n description: 'JSON object.',\n properties: {\n InteropIndex: {\n type: 'string'\n },\n InteropVersion: {\n type: 'string'\n }\n }\n },\n makernote: {\n type: 'object',\n additionalProperties: true\n },\n thumbnail: {\n type: 'object',\n description: 'Object containing Thumbnail information.',\n properties: {\n Compression: {\n type: 'integer'\n },\n ResolutionUnit: {\n type: 'integer'\n },\n ThumbnailLength: {\n type: 'integer'\n },\n ThumbnailOffset: {\n type: 'integer'\n },\n XResolution: {\n type: 'integer'\n },\n YResolution: {\n type: 'integer'\n }\n }\n }\n }\n },\n format: {\n type: 'string',\n description: 'The format of the file (e.g., \\'jpg\\', \\'mp4\\').'\n },\n hasColorProfile: {\n type: 'boolean',\n description: 'Indicates if the image has a color profile.'\n },\n hasTransparency: {\n type: 'boolean',\n description: 'Indicates if the image contains transparent areas.'\n },\n height: {\n type: 'integer',\n description: 'The height of the image or video in pixels.'\n },\n pHash: {\n type: 'string',\n description: 'Perceptual hash of the image.'\n },\n quality: {\n type: 'integer',\n description: 'The quality indicator of the image.'\n },\n size: {\n type: 'integer',\n description: 'The file size in bytes.'\n },\n videoCodec: {\n type: 'string',\n description: 'The video codec used in the video (only for video).'\n },\n width: {\n type: 'integer',\n description: 'The width of the image or video in pixels.'\n }\n }\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
url: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Should be a valid file URL. It should be accessible using your ImageKit.io account.\n',
|
|
28
|
+
},
|
|
29
|
+
jq_filter: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
title: 'jq Filter',
|
|
32
|
+
description:
|
|
33
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['url'],
|
|
37
|
+
},
|
|
38
|
+
annotations: {
|
|
39
|
+
readOnlyHint: true,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
44
|
+
const { jq_filter, ...body } = args as any;
|
|
45
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.metadata.getFromURL(body)));
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'post',
|
|
14
|
+
httpPath: '/v1/files/move',
|
|
15
|
+
operationId: 'move-file',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'move_files',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nThis will move a file and all its versions from one folder to another. \n\nNote: If any file at the destination has the same name as the source file, then the source file and its versions will be appended to the destination file.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {}\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
destinationPath: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Full path to the folder you want to move the above file into.\n',
|
|
28
|
+
},
|
|
29
|
+
sourceFilePath: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The full path of the file you want to move.\n',
|
|
32
|
+
},
|
|
33
|
+
jq_filter: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
title: 'jq Filter',
|
|
36
|
+
description:
|
|
37
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
required: ['destinationPath', 'sourceFilePath'],
|
|
41
|
+
},
|
|
42
|
+
annotations: {},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
46
|
+
const { jq_filter, ...body } = args as any;
|
|
47
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.move(body)));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { maybeFilter } from '@imagekit/api-mcp/filtering';
|
|
4
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
5
|
+
|
|
6
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
7
|
+
import ImageKit from '@imagekit/nodejs';
|
|
8
|
+
|
|
9
|
+
export const metadata: Metadata = {
|
|
10
|
+
resource: 'files',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'put',
|
|
14
|
+
httpPath: '/v1/files/rename',
|
|
15
|
+
operationId: 'rename-file',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'rename_files',
|
|
20
|
+
description:
|
|
21
|
+
"When using this tool, always use the `jq_filter` parameter to reduce the response size and improve performance.\n\nOnly omit if you're sure you don't need the data.\n\nYou can rename an already existing file in the media library using rename file API. This operation would rename all file versions of the file. \n\nNote: The old URLs will stop working. The file/file version URLs cached on CDN will continue to work unless a purge is requested.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {\n purgeRequestId: {\n type: 'string',\n description: 'Unique identifier of the purge request. This can be used to check the status of the purge request.\\n'\n }\n }\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
filePath: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'The full path of the file you want to rename.\n',
|
|
28
|
+
},
|
|
29
|
+
newFileName: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description:
|
|
32
|
+
'The new name of the file. A filename can contain:\n\nAlphanumeric Characters: `a-z`, `A-Z`, `0-9` (including Unicode letters, marks, and numerals in other languages).\nSpecial Characters: `.`, `_`, and `-`.\n\nAny other character, including space, will be replaced by `_`.\n',
|
|
33
|
+
},
|
|
34
|
+
purgeCache: {
|
|
35
|
+
type: 'boolean',
|
|
36
|
+
description:
|
|
37
|
+
"Option to purge cache for the old file and its versions' URLs.\n\nWhen set to true, it will internally issue a purge cache request on CDN to remove cached content of old file and its versions. This purge request is counted against your monthly purge quota.\n\nNote: If the old file were accessible at `https://ik.imagekit.io/demo/old-filename.jpg`, a purge cache request would be issued against `https://ik.imagekit.io/demo/old-filename.jpg*` (with a wildcard at the end). It will remove the file and its versions' URLs and any transformations made using query parameters on this file or its versions. However, the cache for file transformations made using path parameters will persist. You can purge them using the purge API. For more details, refer to the purge API documentation.\n\n\n\nDefault value - `false`\n",
|
|
38
|
+
},
|
|
39
|
+
jq_filter: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
title: 'jq Filter',
|
|
42
|
+
description:
|
|
43
|
+
'A jq filter to apply to the response to include certain fields. Consult the output schema in the tool description to see the fields that are available.\n\nFor example: to include only the `name` field in every object of a results array, you can provide ".results[].name".\n\nFor more information, see the [jq documentation](https://jqlang.org/manual/).',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['filePath', 'newFileName'],
|
|
47
|
+
},
|
|
48
|
+
annotations: {
|
|
49
|
+
idempotentHint: true,
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
54
|
+
const { jq_filter, ...body } = args as any;
|
|
55
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.rename(body)));
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { Metadata, asTextContentResult } from '@imagekit/api-mcp/tools/types';
|
|
4
|
+
|
|
5
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import ImageKit from '@imagekit/nodejs';
|
|
7
|
+
|
|
8
|
+
export const metadata: Metadata = {
|
|
9
|
+
resource: 'files',
|
|
10
|
+
operation: 'write',
|
|
11
|
+
tags: [],
|
|
12
|
+
httpMethod: 'patch',
|
|
13
|
+
httpPath: '/v1/files/{fileId}/details',
|
|
14
|
+
operationId: 'update-file-details',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const tool: Tool = {
|
|
18
|
+
name: 'update_files',
|
|
19
|
+
description:
|
|
20
|
+
'This API updates the details or attributes of the current version of the file. You can update `tags`, `customCoordinates`, `customMetadata`, publication status, remove existing `AITags` and apply extensions using this API.\n',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
anyOf: [
|
|
24
|
+
{
|
|
25
|
+
type: 'object',
|
|
26
|
+
properties: {
|
|
27
|
+
fileId: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
},
|
|
30
|
+
customCoordinates: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description:
|
|
33
|
+
'Define an important area in the image in the format `x,y,width,height` e.g. `10,10,100,100`. Send `null` to unset this value.\n',
|
|
34
|
+
},
|
|
35
|
+
customMetadata: {
|
|
36
|
+
type: 'object',
|
|
37
|
+
description:
|
|
38
|
+
'A key-value data to be associated with the asset. To unset a key, send `null` value for that key. Before setting any custom metadata on an asset you have to create the field using custom metadata fields API.\n',
|
|
39
|
+
additionalProperties: true,
|
|
40
|
+
},
|
|
41
|
+
description: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Optional text to describe the contents of the file.\n',
|
|
44
|
+
},
|
|
45
|
+
extensions: {
|
|
46
|
+
$ref: '#/$defs/extensions',
|
|
47
|
+
},
|
|
48
|
+
removeAITags: {
|
|
49
|
+
anyOf: [
|
|
50
|
+
{
|
|
51
|
+
type: 'array',
|
|
52
|
+
items: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: 'string',
|
|
58
|
+
enum: ['all'],
|
|
59
|
+
},
|
|
60
|
+
],
|
|
61
|
+
description:
|
|
62
|
+
'An array of AITags associated with the file that you want to remove, e.g. `["car", "vehicle", "motorsports"]`. \n\nIf you want to remove all AITags associated with the file, send a string - "all".\n\nNote: The remove operation for `AITags` executes before any of the `extensions` are processed.\n',
|
|
63
|
+
},
|
|
64
|
+
tags: {
|
|
65
|
+
type: 'array',
|
|
66
|
+
description:
|
|
67
|
+
'An array of tags associated with the file, such as `["tag1", "tag2"]`. Send `null` to unset all tags associated with the file.\n',
|
|
68
|
+
items: {
|
|
69
|
+
type: 'string',
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
webhookUrl: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description:
|
|
75
|
+
'The final status of extensions after they have completed execution will be delivered to this endpoint as a POST request. [Learn more](/docs/api-reference/digital-asset-management-dam/managing-assets/update-file-details#webhook-payload-structure) about the webhook payload structure.\n',
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
required: ['fileId'],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
type: 'object',
|
|
82
|
+
properties: {
|
|
83
|
+
fileId: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
},
|
|
86
|
+
publish: {
|
|
87
|
+
type: 'object',
|
|
88
|
+
description: 'Configure the publication status of a file and its versions.\n',
|
|
89
|
+
properties: {
|
|
90
|
+
isPublished: {
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
description: 'Set to `true` to publish the file. Set to `false` to unpublish the file.\n',
|
|
93
|
+
},
|
|
94
|
+
includeFileVersions: {
|
|
95
|
+
type: 'boolean',
|
|
96
|
+
description:
|
|
97
|
+
'Set to `true` to publish/unpublish all versions of the file. Set to `false` to publish/unpublish only the current version of the file.\n',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ['isPublished'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
required: ['fileId'],
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
$defs: {
|
|
107
|
+
extensions: {
|
|
108
|
+
type: 'array',
|
|
109
|
+
title: 'Extensions Array',
|
|
110
|
+
description:
|
|
111
|
+
'Array of extensions to be applied to the asset. Each extension can be configured with specific parameters based on the extension type.\n',
|
|
112
|
+
items: {
|
|
113
|
+
anyOf: [
|
|
114
|
+
{
|
|
115
|
+
type: 'object',
|
|
116
|
+
title: 'Remove background',
|
|
117
|
+
properties: {
|
|
118
|
+
name: {
|
|
119
|
+
type: 'string',
|
|
120
|
+
description: 'Specifies the background removal extension.',
|
|
121
|
+
enum: ['remove-bg'],
|
|
122
|
+
},
|
|
123
|
+
options: {
|
|
124
|
+
type: 'object',
|
|
125
|
+
properties: {
|
|
126
|
+
add_shadow: {
|
|
127
|
+
type: 'boolean',
|
|
128
|
+
description:
|
|
129
|
+
'Whether to add an artificial shadow to the result. Default is false. Note: Adding shadows is currently only supported for car photos.\n',
|
|
130
|
+
},
|
|
131
|
+
bg_color: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description:
|
|
134
|
+
'Specifies a solid color background using hex code (e.g., "81d4fa", "fff") or color name (e.g., "green"). If this parameter is set, `bg_image_url` must be empty.\n',
|
|
135
|
+
},
|
|
136
|
+
bg_image_url: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
description:
|
|
139
|
+
'Sets a background image from a URL. If this parameter is set, `bg_color` must be empty.\n',
|
|
140
|
+
},
|
|
141
|
+
semitransparency: {
|
|
142
|
+
type: 'boolean',
|
|
143
|
+
description:
|
|
144
|
+
'Allows semi-transparent regions in the result. Default is true. Note: Semitransparency is currently only supported for car windows.\n',
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
required: ['name'],
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'object',
|
|
153
|
+
title: 'Auto tagging',
|
|
154
|
+
properties: {
|
|
155
|
+
maxTags: {
|
|
156
|
+
type: 'integer',
|
|
157
|
+
description: 'Maximum number of tags to attach to the asset.',
|
|
158
|
+
},
|
|
159
|
+
minConfidence: {
|
|
160
|
+
type: 'integer',
|
|
161
|
+
description: 'Minimum confidence level for tags to be considered valid.',
|
|
162
|
+
},
|
|
163
|
+
name: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'Specifies the auto-tagging extension used.',
|
|
166
|
+
enum: ['google-auto-tagging', 'aws-auto-tagging'],
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
required: ['maxTags', 'minConfidence', 'name'],
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: 'object',
|
|
173
|
+
title: 'Auto description',
|
|
174
|
+
properties: {
|
|
175
|
+
name: {
|
|
176
|
+
type: 'string',
|
|
177
|
+
description: 'Specifies the auto description extension.',
|
|
178
|
+
enum: ['ai-auto-description'],
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
required: ['name'],
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
annotations: {},
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
192
|
+
const { fileId, ...body } = args as any;
|
|
193
|
+
return asTextContentResult(await client.files.update(fileId, body));
|
|
194
|
+
};
|
|
195
|
+
|
|
196
|
+
export default { metadata, tool, handler };
|