@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,332 @@
|
|
|
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: 'post',
|
|
13
|
+
httpPath: '/api/v1/files/upload',
|
|
14
|
+
operationId: 'upload-file',
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export const tool: Tool = {
|
|
18
|
+
name: 'upload_files',
|
|
19
|
+
description:
|
|
20
|
+
'ImageKit.io allows you to upload files directly from both the server and client sides. For server-side uploads, private API key authentication is used. For client-side uploads, generate a one-time `token`, `signature`, and `expire` from your secure backend using private API. [Learn more](/docs/api-reference/upload-file/upload-file#how-to-implement-client-side-file-upload) about how to implement client-side file upload.\n\nThe [V2 API](/docs/api-reference/upload-file/upload-file-v2) enhances security by verifying the entire payload using JWT.\n\n**File size limit** \\\nOn the free plan, the maximum upload file sizes are 20MB for images, audio, and raw files and 100MB for videos. On the paid plan, these limits increase to 40MB for images, audio, and raw files and 2GB for videos. These limits can be further increased with higher-tier plans.\n\n**Version limit** \\\nA file can have a maximum of 100 versions.\n\n**Demo applications**\n\n- A full-fledged [upload widget using Uppy](https://github.com/imagekit-samples/uppy-uploader), supporting file selections from local storage, URL, Dropbox, Google Drive, Instagram, and more.\n- [Quick start guides](/docs/quick-start-guides) for various frameworks and technologies.\n',
|
|
21
|
+
inputSchema: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
file: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description:
|
|
27
|
+
'The API accepts any of the following:\n\n- **Binary data** – send the raw bytes as `multipart/form-data`.\n- **HTTP / HTTPS URL** – a publicly reachable URL that ImageKit’s servers can fetch.\n- **Base64 string** – the file encoded as a Base64 data URI or plain Base64.\n\nWhen supplying a URL, the server must receive the response headers within 8 seconds; otherwise the request fails with 400 Bad Request.\n',
|
|
28
|
+
},
|
|
29
|
+
fileName: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description:
|
|
32
|
+
'The name with which the file has to be uploaded.\nThe file name can contain:\n\n - Alphanumeric Characters: `a-z`, `A-Z`, `0-9`.\n - Special Characters: `.`, `-`\n\nAny other character including space will be replaced by `_`\n',
|
|
33
|
+
},
|
|
34
|
+
token: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description:
|
|
37
|
+
'A unique value that the ImageKit.io server will use to recognize and prevent subsequent retries for the same request. We suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. This field is only required for authentication when uploading a file from the client side.\n\n**Note**: Sending a value that has been used in the past will result in a validation error. Even if your previous request resulted in an error, you should always send a new value for this field.\n',
|
|
38
|
+
},
|
|
39
|
+
checks: {
|
|
40
|
+
type: 'string',
|
|
41
|
+
description:
|
|
42
|
+
'Server-side checks to run on the asset.\nRead more about [Upload API checks](/docs/api-reference/upload-file/upload-file#upload-api-checks).\n',
|
|
43
|
+
},
|
|
44
|
+
customCoordinates: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description:
|
|
47
|
+
'Define an important area in the image. This is only relevant for image type files.\n\n - To be passed as a string with the x and y coordinates of the top-left corner, and width and height of the area of interest in the format `x,y,width,height`. For example - `10,10,100,100`\n - Can be used with fo-customtransformation.\n - If this field is not specified and the file is overwritten, then customCoordinates will be removed.\n',
|
|
48
|
+
},
|
|
49
|
+
customMetadata: {
|
|
50
|
+
type: 'object',
|
|
51
|
+
description:
|
|
52
|
+
'JSON key-value pairs to associate with the asset. Create the custom metadata fields before setting these values.\n',
|
|
53
|
+
additionalProperties: true,
|
|
54
|
+
},
|
|
55
|
+
description: {
|
|
56
|
+
type: 'string',
|
|
57
|
+
description: 'Optional text to describe the contents of the file.\n',
|
|
58
|
+
},
|
|
59
|
+
expire: {
|
|
60
|
+
type: 'integer',
|
|
61
|
+
description:
|
|
62
|
+
'The time until your signature is valid. It must be a [Unix time](https://en.wikipedia.org/wiki/Unix_time) in less than 1 hour into the future. It should be in seconds. This field is only required for authentication when uploading a file from the client side.\n',
|
|
63
|
+
},
|
|
64
|
+
extensions: {
|
|
65
|
+
$ref: '#/$defs/extensions',
|
|
66
|
+
},
|
|
67
|
+
folder: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description:
|
|
70
|
+
"The folder path in which the image has to be uploaded. If the folder(s) didn't exist before, a new folder(s) is created.\n\nThe folder name can contain:\n\n - Alphanumeric Characters: `a-z` , `A-Z` , `0-9`\n - Special Characters: `/` , `_` , `-`\n\nUsing multiple `/` creates a nested folder.\n",
|
|
71
|
+
},
|
|
72
|
+
isPrivateFile: {
|
|
73
|
+
type: 'boolean',
|
|
74
|
+
description:
|
|
75
|
+
'Whether to mark the file as private or not.\n\nIf `true`, the file is marked as private and is accessible only using named transformation or signed URL.\n',
|
|
76
|
+
},
|
|
77
|
+
isPublished: {
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
description:
|
|
80
|
+
'Whether to upload file as published or not.\n\nIf `false`, the file is marked as unpublished, which restricts access to the file only via the media library. Files in draft or unpublished state can only be publicly accessed after being published.\n\nThe option to upload in draft state is only available in custom enterprise pricing plans.\n',
|
|
81
|
+
},
|
|
82
|
+
overwriteAITags: {
|
|
83
|
+
type: 'boolean',
|
|
84
|
+
description:
|
|
85
|
+
'If set to `true` and a file already exists at the exact location, its AITags will be removed. Set `overwriteAITags` to `false` to preserve AITags.\n',
|
|
86
|
+
},
|
|
87
|
+
overwriteCustomMetadata: {
|
|
88
|
+
type: 'boolean',
|
|
89
|
+
description:
|
|
90
|
+
'If the request does not have `customMetadata`, and a file already exists at the exact location, existing customMetadata will be removed.\n',
|
|
91
|
+
},
|
|
92
|
+
overwriteFile: {
|
|
93
|
+
type: 'boolean',
|
|
94
|
+
description:
|
|
95
|
+
'If `false` and `useUniqueFileName` is also `false`, and a file already exists at the exact location, upload API will return an error immediately.\n',
|
|
96
|
+
},
|
|
97
|
+
overwriteTags: {
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
description:
|
|
100
|
+
'If the request does not have `tags`, and a file already exists at the exact location, existing tags will be removed.\n',
|
|
101
|
+
},
|
|
102
|
+
publicKey: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description:
|
|
105
|
+
'Your ImageKit.io public key. This field is only required for authentication when uploading a file from the client side.\n',
|
|
106
|
+
},
|
|
107
|
+
responseFields: {
|
|
108
|
+
type: 'array',
|
|
109
|
+
description: 'Array of response field keys to include in the API response body.\n',
|
|
110
|
+
items: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
enum: [
|
|
113
|
+
'tags',
|
|
114
|
+
'customCoordinates',
|
|
115
|
+
'isPrivateFile',
|
|
116
|
+
'embeddedMetadata',
|
|
117
|
+
'isPublished',
|
|
118
|
+
'customMetadata',
|
|
119
|
+
'metadata',
|
|
120
|
+
'selectedFieldsSchema',
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
signature: {
|
|
125
|
+
type: 'string',
|
|
126
|
+
description:
|
|
127
|
+
'HMAC-SHA1 digest of the token+expire using your ImageKit.io private API key as a key. Learn how to create a signature on the page below. This should be in lowercase.\n\nSignature must be calculated on the server-side. This field is only required for authentication when uploading a file from the client side.\n',
|
|
128
|
+
},
|
|
129
|
+
tags: {
|
|
130
|
+
type: 'array',
|
|
131
|
+
description:
|
|
132
|
+
'Set the tags while uploading the file.\nProvide an array of tag strings (e.g. `["tag1", "tag2", "tag3"]`). The combined length of all tag characters must not exceed 500, and the `%` character is not allowed.\nIf this field is not specified and the file is overwritten, the existing tags will be removed.\n',
|
|
133
|
+
items: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
transformation: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
description:
|
|
140
|
+
"Configure pre-processing (`pre`) and post-processing (`post`) transformations.\n\n- `pre` — applied before the file is uploaded to the Media Library. \n Useful for reducing file size or applying basic optimizations upfront (e.g., resize, compress).\n\n- `post` — applied immediately after upload. \n Ideal for generating transformed versions (like video encodes or thumbnails) in advance, so they're ready for delivery without delay.\n\nYou can mix and match any combination of post-processing types.\n",
|
|
141
|
+
properties: {
|
|
142
|
+
post: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
description:
|
|
145
|
+
'List of transformations to apply *after* the file is uploaded. \nEach item must match one of the following types:\n`transformation`, `gif-to-video`, `thumbnail`, `abs`.\n',
|
|
146
|
+
items: {
|
|
147
|
+
anyOf: [
|
|
148
|
+
{
|
|
149
|
+
type: 'object',
|
|
150
|
+
title: 'Simple post-transformation',
|
|
151
|
+
properties: {
|
|
152
|
+
type: {
|
|
153
|
+
type: 'string',
|
|
154
|
+
description: 'Transformation type.',
|
|
155
|
+
enum: ['transformation'],
|
|
156
|
+
},
|
|
157
|
+
value: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
description:
|
|
160
|
+
'Transformation string (e.g. `w-200,h-200`). \nSame syntax as ImageKit URL-based transformations.\n',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
required: ['type', 'value'],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'object',
|
|
167
|
+
title: 'Convert GIF to video',
|
|
168
|
+
properties: {
|
|
169
|
+
type: {
|
|
170
|
+
type: 'string',
|
|
171
|
+
description: 'Converts an animated GIF into an MP4.',
|
|
172
|
+
enum: ['gif-to-video'],
|
|
173
|
+
},
|
|
174
|
+
value: {
|
|
175
|
+
type: 'string',
|
|
176
|
+
description:
|
|
177
|
+
'Optional transformation string to apply to the output video. \n**Example**: `q-80`\n',
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
required: ['type'],
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: 'object',
|
|
184
|
+
title: 'Generate a thumbnail',
|
|
185
|
+
properties: {
|
|
186
|
+
type: {
|
|
187
|
+
type: 'string',
|
|
188
|
+
description: 'Generates a thumbnail image.',
|
|
189
|
+
enum: ['thumbnail'],
|
|
190
|
+
},
|
|
191
|
+
value: {
|
|
192
|
+
type: 'string',
|
|
193
|
+
description: 'Optional transformation string. \n**Example**: `w-150,h-150`\n',
|
|
194
|
+
},
|
|
195
|
+
},
|
|
196
|
+
required: ['type'],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
type: 'object',
|
|
200
|
+
title: 'Adaptive Bitrate Streaming',
|
|
201
|
+
properties: {
|
|
202
|
+
protocol: {
|
|
203
|
+
type: 'string',
|
|
204
|
+
description: 'Streaming protocol to use (`hls` or `dash`).',
|
|
205
|
+
enum: ['hls', 'dash'],
|
|
206
|
+
},
|
|
207
|
+
type: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'Adaptive Bitrate Streaming (ABS) setup.',
|
|
210
|
+
enum: ['abs'],
|
|
211
|
+
},
|
|
212
|
+
value: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description:
|
|
215
|
+
'List of different representations you want to create separated by an underscore.\n',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
required: ['protocol', 'type', 'value'],
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
pre: {
|
|
224
|
+
type: 'string',
|
|
225
|
+
description:
|
|
226
|
+
'Transformation string to apply before uploading the file to the Media Library. Useful for optimizing files at ingestion.\n',
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
},
|
|
230
|
+
useUniqueFileName: {
|
|
231
|
+
type: 'boolean',
|
|
232
|
+
description:
|
|
233
|
+
'Whether to use a unique filename for this file or not.\n\nIf `true`, ImageKit.io will add a unique suffix to the filename parameter to get a unique filename.\n\nIf `false`, then the image is uploaded with the provided filename parameter, and any existing file with the same name is replaced.\n',
|
|
234
|
+
},
|
|
235
|
+
webhookUrl: {
|
|
236
|
+
type: 'string',
|
|
237
|
+
description:
|
|
238
|
+
'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',
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
required: ['file', 'fileName'],
|
|
242
|
+
$defs: {
|
|
243
|
+
extensions: {
|
|
244
|
+
type: 'array',
|
|
245
|
+
title: 'Extensions Array',
|
|
246
|
+
description:
|
|
247
|
+
'Array of extensions to be applied to the asset. Each extension can be configured with specific parameters based on the extension type.\n',
|
|
248
|
+
items: {
|
|
249
|
+
anyOf: [
|
|
250
|
+
{
|
|
251
|
+
type: 'object',
|
|
252
|
+
title: 'Remove background',
|
|
253
|
+
properties: {
|
|
254
|
+
name: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
description: 'Specifies the background removal extension.',
|
|
257
|
+
enum: ['remove-bg'],
|
|
258
|
+
},
|
|
259
|
+
options: {
|
|
260
|
+
type: 'object',
|
|
261
|
+
properties: {
|
|
262
|
+
add_shadow: {
|
|
263
|
+
type: 'boolean',
|
|
264
|
+
description:
|
|
265
|
+
'Whether to add an artificial shadow to the result. Default is false. Note: Adding shadows is currently only supported for car photos.\n',
|
|
266
|
+
},
|
|
267
|
+
bg_color: {
|
|
268
|
+
type: 'string',
|
|
269
|
+
description:
|
|
270
|
+
'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',
|
|
271
|
+
},
|
|
272
|
+
bg_image_url: {
|
|
273
|
+
type: 'string',
|
|
274
|
+
description:
|
|
275
|
+
'Sets a background image from a URL. If this parameter is set, `bg_color` must be empty.\n',
|
|
276
|
+
},
|
|
277
|
+
semitransparency: {
|
|
278
|
+
type: 'boolean',
|
|
279
|
+
description:
|
|
280
|
+
'Allows semi-transparent regions in the result. Default is true. Note: Semitransparency is currently only supported for car windows.\n',
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
required: ['name'],
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
type: 'object',
|
|
289
|
+
title: 'Auto tagging',
|
|
290
|
+
properties: {
|
|
291
|
+
maxTags: {
|
|
292
|
+
type: 'integer',
|
|
293
|
+
description: 'Maximum number of tags to attach to the asset.',
|
|
294
|
+
},
|
|
295
|
+
minConfidence: {
|
|
296
|
+
type: 'integer',
|
|
297
|
+
description: 'Minimum confidence level for tags to be considered valid.',
|
|
298
|
+
},
|
|
299
|
+
name: {
|
|
300
|
+
type: 'string',
|
|
301
|
+
description: 'Specifies the auto-tagging extension used.',
|
|
302
|
+
enum: ['google-auto-tagging', 'aws-auto-tagging'],
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
required: ['maxTags', 'minConfidence', 'name'],
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
type: 'object',
|
|
309
|
+
title: 'Auto description',
|
|
310
|
+
properties: {
|
|
311
|
+
name: {
|
|
312
|
+
type: 'string',
|
|
313
|
+
description: 'Specifies the auto description extension.',
|
|
314
|
+
enum: ['ai-auto-description'],
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
required: ['name'],
|
|
318
|
+
},
|
|
319
|
+
],
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
annotations: {},
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
328
|
+
const body = args as any;
|
|
329
|
+
return asTextContentResult(await client.files.upload(body));
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,52 @@
|
|
|
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.versions',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'delete',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/versions/{versionId}',
|
|
15
|
+
operationId: 'delete-file-version',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'delete_files_versions',
|
|
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 deletes a non-current file version permanently. The API returns an empty response.\n\nNote: If you want to delete all versions of a file, use the delete file API.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n properties: {}\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
fileId: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
},
|
|
28
|
+
versionId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
jq_filter: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
title: 'jq Filter',
|
|
34
|
+
description:
|
|
35
|
+
'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/).',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['fileId', 'versionId'],
|
|
39
|
+
},
|
|
40
|
+
annotations: {
|
|
41
|
+
idempotentHint: true,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
46
|
+
const { versionId, jq_filter, ...body } = args as any;
|
|
47
|
+
return asTextContentResult(
|
|
48
|
+
await maybeFilter(jq_filter, await client.files.versions.delete(versionId, body)),
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
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.versions',
|
|
11
|
+
operation: 'read',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/versions/{versionId}',
|
|
15
|
+
operationId: 'get-file-version-details',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'get_files_versions',
|
|
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 of a file version.\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
|
+
versionId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
jq_filter: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
title: 'jq Filter',
|
|
34
|
+
description:
|
|
35
|
+
'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/).',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['fileId', 'versionId'],
|
|
39
|
+
},
|
|
40
|
+
annotations: {
|
|
41
|
+
readOnlyHint: true,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
46
|
+
const { versionId, jq_filter, ...body } = args as any;
|
|
47
|
+
return asTextContentResult(await maybeFilter(jq_filter, await client.files.versions.get(versionId, body)));
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
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.versions',
|
|
11
|
+
operation: 'read',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'get',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/versions',
|
|
15
|
+
operationId: 'list-file-versions',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'list_files_versions',
|
|
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 details of all versions of a file.\n\n\n# Response Schema\n```json\n{\n type: 'array',\n items: {\n $ref: '#/$defs/file'\n },\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.versions.list(fileId)));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export default { metadata, tool, handler };
|
|
@@ -0,0 +1,52 @@
|
|
|
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.versions',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'put',
|
|
14
|
+
httpPath: '/v1/files/{fileId}/versions/{versionId}/restore',
|
|
15
|
+
operationId: 'restore-file-version',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'restore_files_versions',
|
|
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 restores a file version as the current file version.\n\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
|
+
versionId: {
|
|
29
|
+
type: 'string',
|
|
30
|
+
},
|
|
31
|
+
jq_filter: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
title: 'jq Filter',
|
|
34
|
+
description:
|
|
35
|
+
'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/).',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
required: ['fileId', 'versionId'],
|
|
39
|
+
},
|
|
40
|
+
annotations: {
|
|
41
|
+
idempotentHint: true,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const handler = async (client: ImageKit, args: Record<string, unknown> | undefined) => {
|
|
46
|
+
const { versionId, jq_filter, ...body } = args as any;
|
|
47
|
+
return asTextContentResult(
|
|
48
|
+
await maybeFilter(jq_filter, await client.files.versions.restore(versionId, body)),
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
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: 'folders',
|
|
11
|
+
operation: 'write',
|
|
12
|
+
tags: [],
|
|
13
|
+
httpMethod: 'post',
|
|
14
|
+
httpPath: '/v1/bulkJobs/copyFolder',
|
|
15
|
+
operationId: 'copy-folder',
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const tool: Tool = {
|
|
19
|
+
name: 'copy_folders',
|
|
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 one folder into another. The selected folder, its nested folders, files, and their versions (in `includeVersions` is set to true) are copied in this operation. Note: 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 version history.\n\n\n# Response Schema\n```json\n{\n type: 'object',\n title: 'Async Bulk Job Response',\n description: 'Job submitted successfully. A `jobId` will be returned.',\n properties: {\n jobId: {\n type: 'string',\n description: 'Unique identifier of the bulk job. This can be used to check the status of the bulk job.\\n'\n }\n },\n required: [ 'jobId'\n ]\n}\n```",
|
|
22
|
+
inputSchema: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
destinationPath: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Full path to the destination folder where you want to copy the source folder into.\n',
|
|
28
|
+
},
|
|
29
|
+
sourceFolderPath: {
|
|
30
|
+
type: 'string',
|
|
31
|
+
description: 'The full path to the source folder you want to copy.\n',
|
|
32
|
+
},
|
|
33
|
+
includeVersions: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
description:
|
|
36
|
+
'Option to copy all versions of files that are nested inside the selected folder. By default, only the current version of each file will be copied. When set to true, all versions of each 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', 'sourceFolderPath'],
|
|
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.folders.copy(body)));
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default { metadata, tool, handler };
|