@vibetools/dokploy-mcp 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +59 -160
  2. package/dist/api/client.d.ts +3 -0
  3. package/dist/api/client.js +38 -13
  4. package/dist/cli/index.js +1 -0
  5. package/dist/codemode/context/execute-context.d.ts +590 -0
  6. package/dist/codemode/context/execute-context.js +64 -0
  7. package/dist/codemode/context/search-context.d.ts +13851 -0
  8. package/dist/codemode/context/search-context.js +42 -0
  9. package/dist/codemode/gateway/api-gateway.d.ts +12 -0
  10. package/dist/codemode/gateway/api-gateway.js +160 -0
  11. package/dist/codemode/gateway/error-format.d.ts +13 -0
  12. package/dist/codemode/gateway/error-format.js +9 -0
  13. package/dist/codemode/gateway/request-normalizer.d.ts +3 -0
  14. package/dist/codemode/gateway/request-normalizer.js +21 -0
  15. package/dist/codemode/gateway/trace.d.ts +13 -0
  16. package/dist/codemode/gateway/trace.js +11 -0
  17. package/dist/codemode/sandbox/host.d.ts +11 -0
  18. package/dist/codemode/sandbox/host.js +28 -0
  19. package/dist/codemode/sandbox/limits.d.ts +2 -0
  20. package/dist/codemode/sandbox/limits.js +20 -0
  21. package/dist/codemode/sandbox/runner.d.ts +8 -0
  22. package/dist/codemode/sandbox/runner.js +113 -0
  23. package/dist/codemode/sandbox/runtime.d.ts +2 -0
  24. package/dist/codemode/sandbox/runtime.js +3 -0
  25. package/dist/codemode/sandbox/serialize.d.ts +1 -0
  26. package/dist/codemode/sandbox/serialize.js +45 -0
  27. package/dist/codemode/sandbox/subprocess-runner.d.ts +10 -0
  28. package/dist/codemode/sandbox/subprocess-runner.js +91 -0
  29. package/dist/codemode/sandbox/types.d.ts +12 -0
  30. package/dist/codemode/sandbox/types.js +1 -0
  31. package/dist/codemode/sandbox/worker-entry.d.ts +1 -0
  32. package/dist/codemode/sandbox/worker-entry.js +70 -0
  33. package/dist/codemode/server-codemode.d.ts +2 -0
  34. package/dist/codemode/server-codemode.js +17 -0
  35. package/dist/codemode/tools/execute.d.ts +583 -0
  36. package/dist/codemode/tools/execute.js +52 -0
  37. package/dist/codemode/tools/index.d.ts +2 -0
  38. package/dist/codemode/tools/index.js +3 -0
  39. package/dist/codemode/tools/search.d.ts +2 -0
  40. package/dist/codemode/tools/search.js +62 -0
  41. package/dist/generated/dokploy-catalog.d.ts +27 -0
  42. package/dist/generated/dokploy-catalog.js +16 -0
  43. package/dist/generated/dokploy-schemas.d.ts +17533 -0
  44. package/dist/generated/dokploy-schemas.js +20639 -0
  45. package/dist/generated/dokploy-sdk.d.ts +558 -0
  46. package/dist/generated/dokploy-sdk.js +561 -0
  47. package/dist/generated/openapi-index.json +10591 -0
  48. package/dist/{tools/_factory.d.ts → mcp/tool-factory.d.ts} +2 -0
  49. package/dist/{tools/_factory.js → mcp/tool-factory.js} +26 -7
  50. package/dist/server.d.ts +1 -1
  51. package/dist/server.js +2 -15
  52. package/package.json +22 -11
  53. package/dist/tools/_database.d.ts +0 -12
  54. package/dist/tools/_database.js +0 -96
  55. package/dist/tools/admin.d.ts +0 -2
  56. package/dist/tools/admin.js +0 -61
  57. package/dist/tools/application.d.ts +0 -2
  58. package/dist/tools/application.js +0 -464
  59. package/dist/tools/backup.d.ts +0 -2
  60. package/dist/tools/backup.js +0 -103
  61. package/dist/tools/certificates.d.ts +0 -2
  62. package/dist/tools/certificates.js +0 -54
  63. package/dist/tools/cluster.d.ts +0 -2
  64. package/dist/tools/cluster.js +0 -38
  65. package/dist/tools/compose.d.ts +0 -2
  66. package/dist/tools/compose.js +0 -213
  67. package/dist/tools/deployment.d.ts +0 -2
  68. package/dist/tools/deployment.js +0 -27
  69. package/dist/tools/destination.d.ts +0 -2
  70. package/dist/tools/destination.js +0 -78
  71. package/dist/tools/docker.d.ts +0 -2
  72. package/dist/tools/docker.js +0 -50
  73. package/dist/tools/domain.d.ts +0 -2
  74. package/dist/tools/domain.js +0 -134
  75. package/dist/tools/index.d.ts +0 -2
  76. package/dist/tools/index.js +0 -48
  77. package/dist/tools/mariadb.d.ts +0 -1
  78. package/dist/tools/mariadb.js +0 -14
  79. package/dist/tools/mongo.d.ts +0 -1
  80. package/dist/tools/mongo.js +0 -12
  81. package/dist/tools/mounts.d.ts +0 -2
  82. package/dist/tools/mounts.js +0 -65
  83. package/dist/tools/mysql.d.ts +0 -1
  84. package/dist/tools/mysql.js +0 -14
  85. package/dist/tools/port.d.ts +0 -2
  86. package/dist/tools/port.js +0 -54
  87. package/dist/tools/postgres.d.ts +0 -1
  88. package/dist/tools/postgres.js +0 -13
  89. package/dist/tools/project.d.ts +0 -2
  90. package/dist/tools/project.js +0 -94
  91. package/dist/tools/redirects.d.ts +0 -2
  92. package/dist/tools/redirects.js +0 -53
  93. package/dist/tools/redis.d.ts +0 -1
  94. package/dist/tools/redis.js +0 -11
  95. package/dist/tools/registry.d.ts +0 -2
  96. package/dist/tools/registry.js +0 -81
  97. package/dist/tools/security.d.ts +0 -2
  98. package/dist/tools/security.js +0 -48
  99. package/dist/tools/settings.d.ts +0 -2
  100. package/dist/tools/settings.js +0 -258
  101. package/dist/tools/user.d.ts +0 -2
  102. package/dist/tools/user.js +0 -12
@@ -1,464 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── tools ────────────────────────────────────────────────────────────
4
- const create = postTool({
5
- name: 'dokploy_application_create',
6
- title: 'Create Application',
7
- description: 'Create a new application within a Dokploy project. Requires a project ID and application name. Optionally specify a custom app name, description, and target server for deployment. Returns the created application object with its generated ID.',
8
- schema: z
9
- .object({
10
- name: z.string().min(1).describe('The name of the application'),
11
- projectId: z.string().min(1).describe('The project ID to create the application in'),
12
- appName: z.string().optional().describe('Custom app name (auto-generated if not provided)'),
13
- description: z.string().nullable().optional().describe('Application description'),
14
- serverId: z.string().nullable().optional().describe('Target server ID for deployment'),
15
- })
16
- .strict(),
17
- endpoint: '/application.create',
18
- });
19
- const one = getTool({
20
- name: 'dokploy_application_one',
21
- title: 'Get Application Details',
22
- description: 'Retrieve detailed information about a single Dokploy application by its unique ID. Returns the full application object including its configuration, build settings, source provider, environment variables, resource limits, deployment status, and associated domains.',
23
- schema: z
24
- .object({
25
- applicationId: z.string().min(1).describe('The unique application ID'),
26
- })
27
- .strict(),
28
- endpoint: '/application.one',
29
- });
30
- const update = postTool({
31
- name: 'dokploy_application_update',
32
- title: 'Update Application',
33
- description: "Update an existing application's configuration in Dokploy. Requires the application ID and accepts a wide range of optional fields including name, environment variables, resource limits (CPU and memory), build settings, Docker Swarm configuration, and deployment options. Only provided fields are modified; omitted fields remain unchanged.",
34
- schema: z
35
- .object({
36
- applicationId: z.string().min(1).describe('The unique application ID'),
37
- name: z.string().optional().describe('Application name'),
38
- appName: z.string().optional().describe('Internal app name'),
39
- description: z.string().nullable().optional().describe('Application description'),
40
- env: z.string().nullable().optional().describe('Environment variables'),
41
- buildArgs: z.string().nullable().optional().describe('Docker build arguments'),
42
- memoryReservation: z.number().nullable().optional().describe('Memory reservation in bytes'),
43
- memoryLimit: z.number().nullable().optional().describe('Memory limit in bytes'),
44
- cpuReservation: z.number().nullable().optional().describe('CPU reservation'),
45
- cpuLimit: z.number().nullable().optional().describe('CPU limit'),
46
- title: z.string().nullable().optional().describe('Display title'),
47
- enabled: z.boolean().optional().describe('Whether the application is enabled'),
48
- subtitle: z.string().nullable().optional().describe('Display subtitle'),
49
- command: z.string().nullable().optional().describe('Custom start command'),
50
- publishDirectory: z
51
- .string()
52
- .nullable()
53
- .optional()
54
- .describe('Publish directory for static builds'),
55
- dockerfile: z.string().nullable().optional().describe('Dockerfile path or content'),
56
- dockerContextPath: z.string().optional().describe('Docker build context path'),
57
- dockerBuildStage: z.string().optional().describe('Docker multi-stage build target'),
58
- replicas: z.number().optional().describe('Number of replicas to run'),
59
- applicationStatus: z.string().optional().describe('Application status'),
60
- buildType: z.string().optional().describe('Build type'),
61
- autoDeploy: z.boolean().optional().describe('Whether auto-deploy is enabled'),
62
- createdAt: z.string().optional().describe('Creation timestamp'),
63
- registryId: z.string().nullable().optional().describe('Docker registry ID'),
64
- projectId: z.string().optional().describe('Project ID'),
65
- sourceType: z.string().optional().describe('Source type (github, docker, git, etc.)'),
66
- healthCheckSwarm: z
67
- .record(z.string(), z.any())
68
- .nullable()
69
- .optional()
70
- .describe('Swarm health check configuration'),
71
- restartPolicySwarm: z
72
- .record(z.string(), z.any())
73
- .nullable()
74
- .optional()
75
- .describe('Swarm restart policy configuration'),
76
- placementSwarm: z
77
- .record(z.string(), z.any())
78
- .nullable()
79
- .optional()
80
- .describe('Swarm placement configuration'),
81
- updateConfigSwarm: z
82
- .record(z.string(), z.any())
83
- .nullable()
84
- .optional()
85
- .describe('Swarm update configuration'),
86
- rollbackConfigSwarm: z
87
- .record(z.string(), z.any())
88
- .nullable()
89
- .optional()
90
- .describe('Swarm rollback configuration'),
91
- modeSwarm: z
92
- .record(z.string(), z.any())
93
- .nullable()
94
- .optional()
95
- .describe('Swarm mode configuration'),
96
- labelsSwarm: z
97
- .record(z.string(), z.any())
98
- .nullable()
99
- .optional()
100
- .describe('Swarm labels configuration'),
101
- networkSwarm: z.array(z.any()).nullable().optional().describe('Swarm network configuration'),
102
- resourcesSwarm: z
103
- .record(z.string(), z.any())
104
- .nullable()
105
- .optional()
106
- .describe('Swarm resources configuration'),
107
- })
108
- .strict(),
109
- endpoint: '/application.update',
110
- });
111
- const deleteApp = postTool({
112
- name: 'dokploy_application_delete',
113
- title: 'Delete Application',
114
- description: 'Permanently delete an application from Dokploy. This action is irreversible and will remove all associated data including deployments, logs, environment variables, and domain configurations. Requires the application ID.',
115
- schema: z
116
- .object({
117
- applicationId: z.string().min(1).describe('The unique application ID to delete'),
118
- })
119
- .strict(),
120
- endpoint: '/application.delete',
121
- annotations: { destructiveHint: true },
122
- });
123
- const move = postTool({
124
- name: 'dokploy_application_move',
125
- title: 'Move Application',
126
- description: 'Move an application from its current project to a different Dokploy project. Requires both the application ID and the target project ID. The application retains all its configuration and deployment settings after the move.',
127
- schema: z
128
- .object({
129
- applicationId: z.string().min(1).describe('The unique application ID to move'),
130
- targetProjectId: z.string().min(1).describe('The target project ID'),
131
- })
132
- .strict(),
133
- endpoint: '/application.move',
134
- });
135
- const deploy = postTool({
136
- name: 'dokploy_application_deploy',
137
- title: 'Deploy Application',
138
- description: 'Trigger a new deployment for an application in Dokploy. Builds the application from its configured source (GitHub, Docker image, Git, etc.) and deploys it to the target server. Requires the application ID. Returns deployment status information.',
139
- schema: z
140
- .object({
141
- applicationId: z.string().min(1).describe('The unique application ID to deploy'),
142
- })
143
- .strict(),
144
- endpoint: '/application.deploy',
145
- });
146
- const redeploy = postTool({
147
- name: 'dokploy_application_redeploy',
148
- title: 'Redeploy Application',
149
- description: 'Force a full redeploy of an application in Dokploy, rebuilding it from source and restarting all containers. Unlike a regular deploy, this always triggers a fresh build regardless of whether the source has changed. Requires the application ID.',
150
- schema: z
151
- .object({
152
- applicationId: z.string().min(1).describe('The unique application ID to redeploy'),
153
- })
154
- .strict(),
155
- endpoint: '/application.redeploy',
156
- });
157
- const start = postTool({
158
- name: 'dokploy_application_start',
159
- title: 'Start Application',
160
- description: 'Start a previously stopped application in Dokploy. Brings up the application containers using the last successful deployment configuration. Requires the application ID. The application must have been deployed at least once before it can be started.',
161
- schema: z
162
- .object({
163
- applicationId: z.string().min(1).describe('The unique application ID to start'),
164
- })
165
- .strict(),
166
- endpoint: '/application.start',
167
- });
168
- const stop = postTool({
169
- name: 'dokploy_application_stop',
170
- title: 'Stop Application',
171
- description: 'Stop a running application in Dokploy, shutting down all its containers. The application configuration and data are preserved and it can be restarted later. Requires the application ID. This is a destructive action as it causes downtime.',
172
- schema: z
173
- .object({
174
- applicationId: z.string().min(1).describe('The unique application ID to stop'),
175
- })
176
- .strict(),
177
- endpoint: '/application.stop',
178
- annotations: { destructiveHint: true },
179
- });
180
- const cancelDeployment = postTool({
181
- name: 'dokploy_application_cancel_deployment',
182
- title: 'Cancel Deployment',
183
- description: 'Cancel an in-progress deployment for an application in Dokploy. Stops the current build or deployment process and leaves the application in its previous state. Requires the application ID. Useful when a deployment is stuck or was triggered accidentally.',
184
- schema: z
185
- .object({
186
- applicationId: z.string().min(1).describe('The unique application ID'),
187
- })
188
- .strict(),
189
- endpoint: '/application.cancelDeployment',
190
- });
191
- const reload = postTool({
192
- name: 'dokploy_application_reload',
193
- title: 'Reload Application',
194
- description: 'Reload an application in Dokploy without performing a full redeploy. Restarts the application containers using the existing built image, which is faster than a complete rebuild. Requires both the application ID and the app name.',
195
- schema: z
196
- .object({
197
- applicationId: z.string().min(1).describe('The unique application ID'),
198
- appName: z.string().min(1).describe('The app name to reload'),
199
- })
200
- .strict(),
201
- endpoint: '/application.reload',
202
- });
203
- const markRunning = postTool({
204
- name: 'dokploy_application_mark_running',
205
- title: 'Mark Application Running',
206
- description: 'Manually mark an application as running in Dokploy. This is an administrative action used to correct the application status when it becomes out of sync with the actual container state. Requires the application ID.',
207
- schema: z
208
- .object({
209
- applicationId: z.string().min(1).describe('The unique application ID'),
210
- })
211
- .strict(),
212
- endpoint: '/application.markRunning',
213
- });
214
- const cleanQueues = postTool({
215
- name: 'dokploy_application_clean_queues',
216
- title: 'Clean Deployment Queues',
217
- description: 'Clean the deployment queues for an application in Dokploy. Removes any pending or stuck deployment jobs from the queue. Requires the application ID. Useful when deployments are queued but not processing correctly.',
218
- schema: z
219
- .object({
220
- applicationId: z.string().min(1).describe('The unique application ID'),
221
- })
222
- .strict(),
223
- endpoint: '/application.cleanQueues',
224
- annotations: { destructiveHint: true },
225
- });
226
- const refreshToken = postTool({
227
- name: 'dokploy_application_refresh_token',
228
- title: 'Refresh Webhook Token',
229
- description: 'Refresh the webhook token for an application in Dokploy. Generates a new unique token used for triggering deployments via webhook URLs. The previous token will be invalidated immediately. Requires the application ID.',
230
- schema: z
231
- .object({
232
- applicationId: z.string().min(1).describe('The unique application ID'),
233
- })
234
- .strict(),
235
- endpoint: '/application.refreshToken',
236
- });
237
- const saveBuildType = postTool({
238
- name: 'dokploy_application_save_build_type',
239
- title: 'Save Build Type',
240
- description: 'Set the build type and related build settings for an application in Dokploy. Requires the application ID and a build type (dockerfile, heroku, nixpacks, buildpacks, or docker). Optionally configure the Docker build context path and multi-stage build target stage.',
241
- schema: z
242
- .object({
243
- applicationId: z.string().min(1).describe('The unique application ID'),
244
- buildType: z
245
- .enum(['dockerfile', 'heroku', 'nixpacks', 'buildpacks', 'docker'])
246
- .describe('The build type to use'),
247
- dockerContextPath: z.string().optional().describe('Docker build context path'),
248
- dockerBuildStage: z.string().optional().describe('Docker multi-stage build target'),
249
- })
250
- .strict(),
251
- endpoint: '/application.saveBuildType',
252
- });
253
- const saveEnvironment = postTool({
254
- name: 'dokploy_application_save_environment',
255
- title: 'Save Environment Variables',
256
- description: 'Save environment variables and Docker build arguments for an application in Dokploy. Requires the application ID. Environment variables are set at runtime while build arguments are available during the Docker build process. Both fields accept newline-separated key=value pairs.',
257
- schema: z
258
- .object({
259
- applicationId: z.string().min(1).describe('The unique application ID'),
260
- env: z.string().nullable().optional().describe('Environment variables'),
261
- buildArgs: z.string().nullable().optional().describe('Docker build arguments'),
262
- })
263
- .strict(),
264
- endpoint: '/application.saveEnvironment',
265
- });
266
- const saveGithubProvider = postTool({
267
- name: 'dokploy_application_save_github_provider',
268
- title: 'Configure GitHub Provider',
269
- description: 'Configure a GitHub repository as the source for an application in Dokploy. Requires the application ID and the GitHub repository owner. Optionally specify the repository name, branch, build path, GitHub App installation ID, submodule support, watch paths for auto-deploy, and trigger type (push or tag).',
270
- schema: z
271
- .object({
272
- applicationId: z.string().min(1).describe('The unique application ID'),
273
- owner: z.string().min(1).describe('GitHub repository owner'),
274
- repository: z.string().optional().describe('GitHub repository name'),
275
- branch: z.string().optional().describe('Branch to deploy from'),
276
- buildPath: z.string().optional().describe('Build path within the repo'),
277
- githubId: z.number().optional().describe('GitHub App installation ID'),
278
- enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
279
- watchPaths: z
280
- .array(z.string())
281
- .optional()
282
- .describe('Paths to watch for auto-deploy triggers'),
283
- triggerType: z
284
- .enum(['push', 'tag'])
285
- .optional()
286
- .describe('Event type that triggers deployment'),
287
- })
288
- .strict(),
289
- endpoint: '/application.saveGithubProvider',
290
- });
291
- const saveGitlabProvider = postTool({
292
- name: 'dokploy_application_save_gitlab_provider',
293
- title: 'Configure GitLab Provider',
294
- description: 'Configure a GitLab repository as the source for an application in Dokploy. Requires the application ID. Optionally specify the GitLab branch, build path, repository owner and name, integration ID, project ID, path namespace, submodule support, and watch paths for auto-deploy triggers.',
295
- schema: z
296
- .object({
297
- applicationId: z.string().min(1).describe('The unique application ID'),
298
- gitlabBranch: z.string().optional().describe('GitLab branch'),
299
- gitlabBuildPath: z.string().optional().describe('Build path within the repo'),
300
- gitlabOwner: z.string().optional().describe('GitLab repository owner'),
301
- gitlabRepository: z.string().optional().describe('GitLab repository name'),
302
- gitlabId: z.number().optional().describe('GitLab integration ID'),
303
- gitlabProjectId: z.number().optional().describe('GitLab project ID'),
304
- gitlabPathNamespace: z.string().optional().describe('GitLab path namespace'),
305
- enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
306
- watchPaths: z
307
- .array(z.string())
308
- .optional()
309
- .describe('Paths to watch for auto-deploy triggers'),
310
- })
311
- .strict(),
312
- endpoint: '/application.saveGitlabProvider',
313
- });
314
- const saveBitbucketProvider = postTool({
315
- name: 'dokploy_application_save_bitbucket_provider',
316
- title: 'Configure Bitbucket Provider',
317
- description: 'Configure a Bitbucket repository as the source for an application in Dokploy. Requires the application ID. Optionally specify the Bitbucket branch, build path, repository owner and name, integration ID, submodule support, and watch paths for auto-deploy triggers.',
318
- schema: z
319
- .object({
320
- applicationId: z.string().min(1).describe('The unique application ID'),
321
- bitbucketBranch: z.string().optional().describe('Bitbucket branch'),
322
- bitbucketBuildPath: z.string().optional().describe('Build path within the repo'),
323
- bitbucketOwner: z.string().optional().describe('Bitbucket repository owner'),
324
- bitbucketRepository: z.string().optional().describe('Bitbucket repository name'),
325
- bitbucketId: z.string().optional().describe('Bitbucket integration ID'),
326
- enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
327
- watchPaths: z
328
- .array(z.string())
329
- .optional()
330
- .describe('Paths to watch for auto-deploy triggers'),
331
- })
332
- .strict(),
333
- endpoint: '/application.saveBitbucketProvider',
334
- });
335
- const saveGiteaProvider = postTool({
336
- name: 'dokploy_application_save_gitea_provider',
337
- title: 'Configure Gitea Provider',
338
- description: 'Configure a Gitea repository as the source for an application in Dokploy. Requires the application ID. Optionally specify the Gitea branch, build path, repository owner and name, integration ID, submodule support, and watch paths for auto-deploy triggers.',
339
- schema: z
340
- .object({
341
- applicationId: z.string().min(1).describe('The unique application ID'),
342
- giteaBranch: z.string().optional().describe('Gitea branch'),
343
- giteaBuildPath: z.string().optional().describe('Build path within the repo'),
344
- giteaOwner: z.string().optional().describe('Gitea repository owner'),
345
- giteaRepository: z.string().optional().describe('Gitea repository name'),
346
- giteaId: z.number().optional().describe('Gitea integration ID'),
347
- enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
348
- watchPaths: z
349
- .array(z.string())
350
- .optional()
351
- .describe('Paths to watch for auto-deploy triggers'),
352
- })
353
- .strict(),
354
- endpoint: '/application.saveGiteaProvider',
355
- });
356
- const saveGitProvider = postTool({
357
- name: 'dokploy_application_save_git_provider',
358
- title: 'Configure Custom Git Provider',
359
- description: 'Configure a custom Git repository as the source for an application in Dokploy. Requires the application ID. Optionally specify the Git URL, branch, build path, SSH key ID for authentication, submodule support, and watch paths for auto-deploy triggers. Supports any Git-compatible repository.',
360
- schema: z
361
- .object({
362
- applicationId: z.string().min(1).describe('The unique application ID'),
363
- customGitUrl: z.string().optional().describe('Custom Git repository URL'),
364
- customGitBranch: z.string().optional().describe('Branch to deploy from'),
365
- customGitBuildPath: z.string().optional().describe('Build path within the repo'),
366
- customGitSSHKeyId: z.string().nullable().optional().describe('SSH key ID for authentication'),
367
- enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
368
- watchPaths: z
369
- .array(z.string())
370
- .optional()
371
- .describe('Paths to watch for auto-deploy triggers'),
372
- })
373
- .strict(),
374
- endpoint: '/application.saveGitProvider',
375
- });
376
- const saveDockerProvider = postTool({
377
- name: 'dokploy_application_save_docker_provider',
378
- title: 'Configure Docker Provider',
379
- description: 'Configure a Docker image as the source for an application in Dokploy. Requires the application ID and a Docker image name (e.g., nginx:latest). Optionally provide registry credentials (username and password) for pulling from private registries.',
380
- schema: z
381
- .object({
382
- applicationId: z.string().min(1).describe('The unique application ID'),
383
- dockerImage: z.string().min(1).describe('Docker image name (e.g., nginx:latest)'),
384
- username: z.string().optional().describe('Registry username for private images'),
385
- password: z.string().optional().describe('Registry password for private images'),
386
- })
387
- .strict(),
388
- endpoint: '/application.saveDockerProvider',
389
- });
390
- const disconnectGitProvider = postTool({
391
- name: 'dokploy_application_disconnect_git_provider',
392
- title: 'Disconnect Git Provider',
393
- description: 'Disconnect the current Git provider from an application in Dokploy. Removes the source repository configuration (GitHub, GitLab, Bitbucket, Gitea, or custom Git) from the application. Requires the application ID. The application will need a new source configured before it can be deployed again.',
394
- schema: z
395
- .object({
396
- applicationId: z.string().min(1).describe('The unique application ID'),
397
- })
398
- .strict(),
399
- endpoint: '/application.disconnectGitProvider',
400
- annotations: { destructiveHint: true },
401
- });
402
- const readAppMonitoring = getTool({
403
- name: 'dokploy_application_read_app_monitoring',
404
- title: 'Read Application Monitoring',
405
- description: 'Read monitoring data for an application in Dokploy. Returns resource usage metrics including CPU utilization, memory consumption, network I/O, and disk usage. Requires the app name (not the application ID). Useful for monitoring application health and performance.',
406
- schema: z
407
- .object({
408
- appName: z.string().min(1).describe('The app name to read monitoring for'),
409
- })
410
- .strict(),
411
- endpoint: '/application.readAppMonitoring',
412
- });
413
- const readTraefikConfig = getTool({
414
- name: 'dokploy_application_read_traefik_config',
415
- title: 'Read Traefik Configuration',
416
- description: 'Read the Traefik reverse proxy configuration for an application in Dokploy. Returns the current Traefik routing rules, middleware settings, and TLS configuration associated with the application. Requires the application ID.',
417
- schema: z
418
- .object({
419
- applicationId: z.string().min(1).describe('The unique application ID'),
420
- })
421
- .strict(),
422
- endpoint: '/application.readTraefikConfig',
423
- });
424
- const updateTraefikConfig = postTool({
425
- name: 'dokploy_application_update_traefik_config',
426
- title: 'Update Traefik Configuration',
427
- description: 'Update the Traefik reverse proxy configuration for an application in Dokploy. Requires the application ID and the new Traefik configuration content as a string. Allows customization of routing rules, middleware, TLS settings, and other Traefik-specific options.',
428
- schema: z
429
- .object({
430
- applicationId: z.string().min(1).describe('The unique application ID'),
431
- traefikConfig: z.string().min(1).describe('The new Traefik configuration content'),
432
- })
433
- .strict(),
434
- endpoint: '/application.updateTraefikConfig',
435
- });
436
- // ── export ───────────────────────────────────────────────────────────
437
- export const applicationTools = [
438
- create,
439
- one,
440
- update,
441
- deleteApp,
442
- move,
443
- deploy,
444
- redeploy,
445
- start,
446
- stop,
447
- cancelDeployment,
448
- reload,
449
- markRunning,
450
- cleanQueues,
451
- refreshToken,
452
- saveBuildType,
453
- saveEnvironment,
454
- saveGithubProvider,
455
- saveGitlabProvider,
456
- saveBitbucketProvider,
457
- saveGiteaProvider,
458
- saveGitProvider,
459
- saveDockerProvider,
460
- disconnectGitProvider,
461
- readAppMonitoring,
462
- readTraefikConfig,
463
- updateTraefikConfig,
464
- ];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const backupTools: ToolDefinition[];
@@ -1,103 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── helpers ──────────────────────────────────────────────────────────
4
- const backupId = z.string().min(1).describe('Unique backup ID');
5
- // ── tools ────────────────────────────────────────────────────────────
6
- const one = getTool({
7
- name: 'dokploy_backup_one',
8
- title: 'Get Backup Configuration',
9
- description: 'Retrieve the full details of a specific backup configuration by its unique ID. Requires the backupId parameter. Returns the backup object including its schedule, prefix, destination, database type, and enabled status.',
10
- schema: z.object({ backupId }).strict(),
11
- endpoint: '/backup.one',
12
- });
13
- const create = postTool({
14
- name: 'dokploy_backup_create',
15
- title: 'Create Backup Schedule',
16
- description: 'Create a new scheduled backup configuration for a database service in Dokploy. Requires a cron schedule expression, file name prefix, destination ID, database name, and database type (postgres, mysql, mariadb, or mongo). Optionally accepts the specific database service ID and an enabled flag. Returns the created backup configuration.',
17
- schema: z
18
- .object({
19
- schedule: z.string().min(1).describe('Cron schedule expression for the backup'),
20
- prefix: z.string().min(1).describe('Prefix for backup file names'),
21
- destinationId: z.string().min(1).describe('Destination ID where backups will be stored'),
22
- database: z.string().min(1).describe('Name of the database to back up'),
23
- databaseType: z
24
- .enum(['postgres', 'mariadb', 'mysql', 'mongo'])
25
- .describe('Type of the database'),
26
- enabled: z.boolean().optional().describe('Whether the backup is enabled'),
27
- postgresId: z
28
- .string()
29
- .optional()
30
- .describe('Postgres database ID (when databaseType is postgres)'),
31
- mysqlId: z.string().optional().describe('MySQL database ID (when databaseType is mysql)'),
32
- mariadbId: z
33
- .string()
34
- .optional()
35
- .describe('MariaDB database ID (when databaseType is mariadb)'),
36
- mongoId: z.string().optional().describe('MongoDB database ID (when databaseType is mongo)'),
37
- })
38
- .strict(),
39
- endpoint: '/backup.create',
40
- });
41
- const update = postTool({
42
- name: 'dokploy_backup_update',
43
- title: 'Update Backup Schedule',
44
- description: 'Update an existing backup schedule configuration. Requires the backupId along with the updated cron schedule, file name prefix, destination ID, and database name. Optionally accepts an enabled flag to activate or deactivate the schedule. Returns the updated backup configuration.',
45
- schema: z
46
- .object({
47
- backupId,
48
- schedule: z.string().min(1).describe('Cron schedule expression for the backup'),
49
- prefix: z.string().min(1).describe('Prefix for backup file names'),
50
- destinationId: z.string().min(1).describe('Destination ID where backups will be stored'),
51
- database: z.string().min(1).describe('Name of the database to back up'),
52
- enabled: z.boolean().optional().describe('Whether the backup is enabled'),
53
- })
54
- .strict(),
55
- endpoint: '/backup.update',
56
- });
57
- const remove = postTool({
58
- name: 'dokploy_backup_remove',
59
- title: 'Remove Backup Schedule',
60
- description: 'Permanently remove a backup schedule configuration from Dokploy. This action is irreversible and stops all future scheduled backups for this configuration. Requires the backupId parameter. Previously created backup files at the destination are not deleted.',
61
- schema: z.object({ backupId }).strict(),
62
- endpoint: '/backup.remove',
63
- annotations: { destructiveHint: true },
64
- });
65
- const manualBackupPostgres = postTool({
66
- name: 'dokploy_backup_manual_postgres',
67
- title: 'Manual Postgres Backup',
68
- description: 'Trigger an immediate manual backup of a PostgreSQL database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
69
- schema: z.object({ backupId }).strict(),
70
- endpoint: '/backup.manualBackupPostgres',
71
- });
72
- const manualBackupMySql = postTool({
73
- name: 'dokploy_backup_manual_mysql',
74
- title: 'Manual MySQL Backup',
75
- description: 'Trigger an immediate manual backup of a MySQL database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
76
- schema: z.object({ backupId }).strict(),
77
- endpoint: '/backup.manualBackupMySql',
78
- });
79
- const manualBackupMariadb = postTool({
80
- name: 'dokploy_backup_manual_mariadb',
81
- title: 'Manual MariaDB Backup',
82
- description: 'Trigger an immediate manual backup of a MariaDB database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
83
- schema: z.object({ backupId }).strict(),
84
- endpoint: '/backup.manualBackupMariadb',
85
- });
86
- const manualBackupMongo = postTool({
87
- name: 'dokploy_backup_manual_mongo',
88
- title: 'Manual MongoDB Backup',
89
- description: 'Trigger an immediate manual backup of a MongoDB database. Requires the backupId of an existing backup configuration that specifies the destination and database details. The backup runs asynchronously and stores the dump file at the configured S3 destination.',
90
- schema: z.object({ backupId }).strict(),
91
- endpoint: '/backup.manualBackupMongo',
92
- });
93
- // ── export ───────────────────────────────────────────────────────────
94
- export const backupTools = [
95
- one,
96
- create,
97
- update,
98
- remove,
99
- manualBackupPostgres,
100
- manualBackupMySql,
101
- manualBackupMariadb,
102
- manualBackupMongo,
103
- ];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const certificatesTools: ToolDefinition[];
@@ -1,54 +0,0 @@
1
- import { z } from 'zod';
2
- import { getTool, postTool } from './_factory.js';
3
- // ── tools ────────────────────────────────────────────────────────────
4
- const all = getTool({
5
- name: 'dokploy_certificate_all',
6
- title: 'List Certificates',
7
- description: 'List all SSL/TLS certificates managed by Dokploy. Returns an array of certificate objects including their names, expiration dates, associated domains, and auto-renewal status. Takes no parameters. Useful for auditing certificate coverage across your deployments.',
8
- schema: z.object({}).strict(),
9
- endpoint: '/certificates.all',
10
- });
11
- const one = getTool({
12
- name: 'dokploy_certificate_one',
13
- title: 'Get Certificate Details',
14
- description: 'Get the full details of a specific SSL/TLS certificate by its unique ID. Returns the certificate name, PEM data, private key reference, associated domain, expiration date, and auto-renewal configuration. Requires the certificate ID.',
15
- schema: z
16
- .object({
17
- certificateId: z.string().min(1).describe('Unique certificate ID'),
18
- })
19
- .strict(),
20
- endpoint: '/certificates.one',
21
- });
22
- const create = postTool({
23
- name: 'dokploy_certificate_create',
24
- title: 'Create Certificate',
25
- description: 'Create a new SSL/TLS certificate in Dokploy. Requires the certificate name, PEM-encoded certificate data, and private key. Optionally accepts a certificate ID, filesystem path, and auto-renewal flag. Returns the newly created certificate object.',
26
- schema: z
27
- .object({
28
- name: z.string().min(1).describe('Display name for the certificate'),
29
- certificateData: z.string().min(1).describe('The certificate data (PEM format)'),
30
- privateKey: z.string().min(1).describe('The private key for the certificate'),
31
- certificateId: z.string().min(1).optional().describe('Optional certificate ID to assign'),
32
- certificatePath: z
33
- .string()
34
- .optional()
35
- .describe('Optional filesystem path for the certificate'),
36
- autoRenew: z.boolean().optional().describe('Whether to automatically renew the certificate'),
37
- })
38
- .strict(),
39
- endpoint: '/certificates.create',
40
- });
41
- const remove = postTool({
42
- name: 'dokploy_certificate_remove',
43
- title: 'Remove Certificate',
44
- description: 'Permanently remove an SSL/TLS certificate from Dokploy. This action is irreversible and will delete the certificate data and private key. Requires the certificate ID. Any domains using this certificate will lose their TLS configuration.',
45
- schema: z
46
- .object({
47
- certificateId: z.string().min(1).describe('Unique certificate ID to remove'),
48
- })
49
- .strict(),
50
- endpoint: '/certificates.remove',
51
- annotations: { destructiveHint: true },
52
- });
53
- // ── export ───────────────────────────────────────────────────────────
54
- export const certificatesTools = [all, one, create, remove];
@@ -1,2 +0,0 @@
1
- import { type ToolDefinition } from './_factory.js';
2
- export declare const clusterTools: ToolDefinition[];