@vibetools/dokploy-mcp 0.5.0 → 1.2.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.
- package/README.md +39 -13
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.js +51 -16
- package/dist/config/resolver.js +33 -50
- package/dist/server.js +1 -1
- package/dist/tools/_database.d.ts +12 -0
- package/dist/tools/_database.js +115 -0
- package/dist/tools/_factory.d.ts +3 -1
- package/dist/tools/_factory.js +36 -17
- package/dist/tools/application.js +219 -82
- package/dist/tools/backup.js +30 -0
- package/dist/tools/compose.js +273 -35
- package/dist/tools/deployment.js +82 -2
- package/dist/tools/docker.js +62 -2
- package/dist/tools/domain.js +15 -2
- package/dist/tools/environment.d.ts +2 -0
- package/dist/tools/environment.js +104 -0
- package/dist/tools/git-provider.d.ts +2 -0
- package/dist/tools/git-provider.js +22 -0
- package/dist/tools/github.d.ts +2 -0
- package/dist/tools/github.js +66 -0
- package/dist/tools/gitlab.d.ts +2 -0
- package/dist/tools/gitlab.js +98 -0
- package/dist/tools/index.js +24 -0
- package/dist/tools/mariadb.d.ts +1 -2
- package/dist/tools/mariadb.js +9 -165
- package/dist/tools/mongo.d.ts +1 -2
- package/dist/tools/mongo.js +9 -164
- package/dist/tools/mounts.js +53 -9
- package/dist/tools/mysql.d.ts +1 -2
- package/dist/tools/mysql.js +9 -165
- package/dist/tools/notification.d.ts +2 -0
- package/dist/tools/notification.js +559 -0
- package/dist/tools/patch.d.ts +2 -0
- package/dist/tools/patch.js +179 -0
- package/dist/tools/postgres.d.ts +1 -2
- package/dist/tools/postgres.js +8 -164
- package/dist/tools/preview-deployment.d.ts +2 -0
- package/dist/tools/preview-deployment.js +50 -0
- package/dist/tools/project.js +32 -1
- package/dist/tools/redis.d.ts +1 -2
- package/dist/tools/redis.js +8 -164
- package/dist/tools/rollback.d.ts +2 -0
- package/dist/tools/rollback.js +28 -0
- package/dist/tools/schedule.d.ts +2 -0
- package/dist/tools/schedule.js +92 -0
- package/dist/tools/server.d.ts +2 -0
- package/dist/tools/server.js +192 -0
- package/dist/tools/settings.js +251 -0
- package/dist/tools/ssh-key.d.ts +2 -0
- package/dist/tools/ssh-key.js +74 -0
- package/dist/tools/user.js +75 -2
- package/dist/tools/volume-backups.d.ts +2 -0
- package/dist/tools/volume-backups.js +96 -0
- package/package.json +7 -2
|
@@ -1,16 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { getTool, postTool } from './_factory.js';
|
|
3
3
|
// ── tools ────────────────────────────────────────────────────────────
|
|
4
|
+
const appNameSchema = z
|
|
5
|
+
.string()
|
|
6
|
+
.min(1)
|
|
7
|
+
.max(63)
|
|
8
|
+
.regex(/^[a-zA-Z0-9._-]+$/)
|
|
9
|
+
.describe('Internal app name');
|
|
10
|
+
const nullableString = z.string().nullable().optional();
|
|
11
|
+
const nullableBoolean = z.boolean().nullable().optional();
|
|
12
|
+
const nullableNumber = z.number().nullable().optional();
|
|
13
|
+
const nullableStringArray = z.array(z.string()).nullable().optional();
|
|
14
|
+
const nullableUnknown = z.unknown().nullable().optional();
|
|
4
15
|
const create = postTool({
|
|
5
16
|
name: 'dokploy_application_create',
|
|
6
17
|
title: 'Create Application',
|
|
7
|
-
description: 'Create a new application within a Dokploy
|
|
18
|
+
description: 'Create a new application within a Dokploy environment. Requires an environment 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
19
|
schema: z
|
|
9
20
|
.object({
|
|
10
21
|
name: z.string().min(1).describe('The name of the application'),
|
|
11
|
-
|
|
12
|
-
appName:
|
|
13
|
-
description:
|
|
22
|
+
environmentId: z.string().min(1).describe('The environment ID to create the application in'),
|
|
23
|
+
appName: appNameSchema.optional(),
|
|
24
|
+
description: nullableString.describe('Application description'),
|
|
14
25
|
serverId: z.string().nullable().optional().describe('Target server ID for deployment'),
|
|
15
26
|
})
|
|
16
27
|
.strict(),
|
|
@@ -35,75 +46,132 @@ const update = postTool({
|
|
|
35
46
|
.object({
|
|
36
47
|
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
37
48
|
name: z.string().optional().describe('Application name'),
|
|
38
|
-
appName:
|
|
39
|
-
description:
|
|
40
|
-
env:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
.
|
|
52
|
-
.nullable()
|
|
49
|
+
appName: appNameSchema.optional(),
|
|
50
|
+
description: nullableString.describe('Application description'),
|
|
51
|
+
env: nullableString.describe('Environment variables'),
|
|
52
|
+
previewEnv: nullableString.describe('Preview environment variables'),
|
|
53
|
+
watchPaths: nullableStringArray.describe('Paths to watch for deploy triggers'),
|
|
54
|
+
previewBuildArgs: nullableString.describe('Preview build arguments'),
|
|
55
|
+
previewBuildSecrets: nullableString.describe('Preview build secrets'),
|
|
56
|
+
previewLabels: nullableStringArray.describe('Preview labels'),
|
|
57
|
+
previewWildcard: nullableString.describe('Preview wildcard'),
|
|
58
|
+
previewPort: nullableNumber.describe('Preview port'),
|
|
59
|
+
previewHttps: z.boolean().optional().describe('Whether preview HTTPS is enabled'),
|
|
60
|
+
previewPath: nullableString.describe('Preview path'),
|
|
61
|
+
previewCertificateType: z
|
|
62
|
+
.enum(['letsencrypt', 'none', 'custom'])
|
|
53
63
|
.optional()
|
|
54
|
-
.describe('
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
.describe('Preview certificate type'),
|
|
65
|
+
previewCustomCertResolver: nullableString.describe('Preview custom certificate resolver'),
|
|
66
|
+
previewLimit: nullableNumber.describe('Preview deployment limit'),
|
|
67
|
+
isPreviewDeploymentsActive: nullableBoolean.describe('Whether preview deployments are active'),
|
|
68
|
+
previewRequireCollaboratorPermissions: nullableBoolean.describe('Whether preview deployments require collaborator permissions'),
|
|
69
|
+
rollbackActive: nullableBoolean.describe('Whether rollback is active'),
|
|
70
|
+
buildArgs: nullableString.describe('Docker build arguments'),
|
|
71
|
+
buildSecrets: nullableString.describe('Docker build secrets'),
|
|
72
|
+
memoryReservation: nullableString.describe('Memory reservation in bytes (e.g. "268435456" for 256MB)'),
|
|
73
|
+
memoryLimit: nullableString.describe('Memory limit in bytes (e.g. "268435456" for 256MB)'),
|
|
74
|
+
cpuReservation: nullableString.describe('CPU reservation in nanoCPUs (e.g. "500000000" for 0.5 CPU)'),
|
|
75
|
+
cpuLimit: nullableString.describe('CPU limit in nanoCPUs (e.g. "1000000000" for 1 CPU)'),
|
|
76
|
+
title: nullableString.describe('Display title'),
|
|
77
|
+
enabled: nullableBoolean.describe('Whether the application is enabled'),
|
|
78
|
+
subtitle: nullableString.describe('Display subtitle'),
|
|
79
|
+
command: nullableString.describe('Custom start command'),
|
|
80
|
+
args: nullableStringArray.describe('Custom command arguments'),
|
|
81
|
+
refreshToken: nullableString.describe('Webhook token'),
|
|
82
|
+
sourceType: z
|
|
83
|
+
.enum(['github', 'docker', 'git', 'gitlab', 'bitbucket', 'gitea', 'drop'])
|
|
69
84
|
.optional()
|
|
70
|
-
.describe('
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
.
|
|
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())
|
|
85
|
+
.describe('Source type'),
|
|
86
|
+
cleanCache: nullableBoolean.describe('Whether to clean cache on build'),
|
|
87
|
+
repository: nullableString.describe('Repository name'),
|
|
88
|
+
owner: nullableString.describe('Repository owner'),
|
|
89
|
+
branch: nullableString.describe('Repository branch'),
|
|
90
|
+
buildPath: nullableString.describe('Build path'),
|
|
91
|
+
triggerType: z
|
|
92
|
+
.enum(['push', 'tag'])
|
|
88
93
|
.nullable()
|
|
89
94
|
.optional()
|
|
90
|
-
.describe('
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
.describe('Deployment trigger type'),
|
|
96
|
+
autoDeploy: nullableBoolean.describe('Whether auto-deploy is enabled'),
|
|
97
|
+
gitlabProjectId: nullableNumber.describe('GitLab project ID'),
|
|
98
|
+
gitlabRepository: nullableString.describe('GitLab repository'),
|
|
99
|
+
gitlabOwner: nullableString.describe('GitLab owner'),
|
|
100
|
+
gitlabBranch: nullableString.describe('GitLab branch'),
|
|
101
|
+
gitlabBuildPath: nullableString.describe('GitLab build path'),
|
|
102
|
+
gitlabPathNamespace: nullableString.describe('GitLab path namespace'),
|
|
103
|
+
giteaRepository: nullableString.describe('Gitea repository'),
|
|
104
|
+
giteaOwner: nullableString.describe('Gitea owner'),
|
|
105
|
+
giteaBranch: nullableString.describe('Gitea branch'),
|
|
106
|
+
giteaBuildPath: nullableString.describe('Gitea build path'),
|
|
107
|
+
bitbucketRepository: nullableString.describe('Bitbucket repository'),
|
|
108
|
+
bitbucketRepositorySlug: nullableString.describe('Bitbucket repository slug'),
|
|
109
|
+
bitbucketOwner: nullableString.describe('Bitbucket owner'),
|
|
110
|
+
bitbucketBranch: nullableString.describe('Bitbucket branch'),
|
|
111
|
+
bitbucketBuildPath: nullableString.describe('Bitbucket build path'),
|
|
112
|
+
username: nullableString.describe('Registry username'),
|
|
113
|
+
password: nullableString.describe('Registry password'),
|
|
114
|
+
dockerImage: nullableString.describe('Docker image'),
|
|
115
|
+
registryUrl: nullableString.describe('Docker registry URL'),
|
|
116
|
+
customGitUrl: nullableString.describe('Custom Git URL'),
|
|
117
|
+
customGitBranch: nullableString.describe('Custom Git branch'),
|
|
118
|
+
customGitBuildPath: nullableString.describe('Custom Git build path'),
|
|
119
|
+
customGitSSHKeyId: nullableString.describe('Custom Git SSH key ID'),
|
|
120
|
+
enableSubmodules: z.boolean().optional().describe('Whether git submodules are enabled'),
|
|
121
|
+
dockerfile: nullableString.describe('Dockerfile path or content'),
|
|
122
|
+
dockerContextPath: nullableString.describe('Docker build context path'),
|
|
123
|
+
dockerBuildStage: nullableString.describe('Docker multi-stage build target'),
|
|
124
|
+
dropBuildPath: nullableString.describe('Drop build path'),
|
|
125
|
+
healthCheckSwarm: nullableUnknown.describe('Swarm health check configuration'),
|
|
126
|
+
restartPolicySwarm: nullableUnknown.describe('Swarm restart policy configuration'),
|
|
127
|
+
placementSwarm: nullableUnknown.describe('Swarm placement configuration'),
|
|
128
|
+
updateConfigSwarm: nullableUnknown.describe('Swarm update configuration'),
|
|
129
|
+
rollbackConfigSwarm: nullableUnknown.describe('Swarm rollback configuration'),
|
|
130
|
+
modeSwarm: nullableUnknown.describe('Swarm mode configuration'),
|
|
131
|
+
labelsSwarm: nullableUnknown.describe('Swarm labels configuration'),
|
|
132
|
+
networkSwarm: nullableUnknown.describe('Swarm network configuration'),
|
|
133
|
+
stopGracePeriodSwarm: z.number().int().nullable().optional().describe('Stop grace period'),
|
|
134
|
+
endpointSpecSwarm: nullableUnknown.describe('Swarm endpoint specification'),
|
|
135
|
+
ulimitsSwarm: z
|
|
136
|
+
.array(z.object({
|
|
137
|
+
Name: z.string().min(1).describe('Ulimit name (e.g. "nofile", "nproc", "memlock")'),
|
|
138
|
+
Soft: z.number().int().min(-1).describe('Soft limit (-1 for unlimited)'),
|
|
139
|
+
Hard: z.number().int().min(-1).describe('Hard limit (-1 for unlimited)'),
|
|
140
|
+
}))
|
|
93
141
|
.nullable()
|
|
94
142
|
.optional()
|
|
95
|
-
.describe('Swarm
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
.
|
|
143
|
+
.describe('Docker Swarm ulimits, e.g. [{"Name":"nofile","Soft":65535,"Hard":65535}]'),
|
|
144
|
+
replicas: z.number().optional().describe('Number of replicas to run'),
|
|
145
|
+
applicationStatus: z
|
|
146
|
+
.enum(['idle', 'running', 'done', 'error'])
|
|
99
147
|
.optional()
|
|
100
|
-
.describe('
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
148
|
+
.describe('Application status'),
|
|
149
|
+
buildType: z
|
|
150
|
+
.enum([
|
|
151
|
+
'dockerfile',
|
|
152
|
+
'heroku_buildpacks',
|
|
153
|
+
'paketo_buildpacks',
|
|
154
|
+
'nixpacks',
|
|
155
|
+
'static',
|
|
156
|
+
'railpack',
|
|
157
|
+
])
|
|
105
158
|
.optional()
|
|
106
|
-
.describe('
|
|
159
|
+
.describe('Build type'),
|
|
160
|
+
railpackVersion: nullableString.describe('Railpack version'),
|
|
161
|
+
herokuVersion: nullableString.describe('Heroku buildpacks version'),
|
|
162
|
+
publishDirectory: nullableString.describe('Publish directory for static builds'),
|
|
163
|
+
isStaticSpa: nullableBoolean.describe('Whether the application is a static SPA'),
|
|
164
|
+
createEnvFile: z.boolean().optional().describe('Whether to create an env file'),
|
|
165
|
+
createdAt: z.string().optional().describe('Creation timestamp'),
|
|
166
|
+
registryId: nullableString.describe('Docker registry ID'),
|
|
167
|
+
rollbackRegistryId: nullableString.describe('Rollback registry ID'),
|
|
168
|
+
environmentId: z.string().optional().describe('Environment ID'),
|
|
169
|
+
githubId: nullableString.describe('GitHub provider ID'),
|
|
170
|
+
gitlabId: nullableString.describe('GitLab provider ID'),
|
|
171
|
+
giteaId: nullableString.describe('Gitea provider ID'),
|
|
172
|
+
bitbucketId: nullableString.describe('Bitbucket provider ID'),
|
|
173
|
+
buildServerId: nullableString.describe('Build server ID'),
|
|
174
|
+
buildRegistryId: nullableString.describe('Build registry ID'),
|
|
107
175
|
})
|
|
108
176
|
.strict(),
|
|
109
177
|
endpoint: '/application.update',
|
|
@@ -123,11 +191,11 @@ const deleteApp = postTool({
|
|
|
123
191
|
const move = postTool({
|
|
124
192
|
name: 'dokploy_application_move',
|
|
125
193
|
title: 'Move Application',
|
|
126
|
-
description: 'Move an application from its current
|
|
194
|
+
description: 'Move an application from its current environment to a different Dokploy environment. Requires both the application ID and the target environment ID. The application retains all its configuration and deployment settings after the move.',
|
|
127
195
|
schema: z
|
|
128
196
|
.object({
|
|
129
197
|
applicationId: z.string().min(1).describe('The unique application ID to move'),
|
|
130
|
-
|
|
198
|
+
targetEnvironmentId: z.string().min(1).describe('The target environment ID'),
|
|
131
199
|
})
|
|
132
200
|
.strict(),
|
|
133
201
|
endpoint: '/application.move',
|
|
@@ -139,6 +207,8 @@ const deploy = postTool({
|
|
|
139
207
|
schema: z
|
|
140
208
|
.object({
|
|
141
209
|
applicationId: z.string().min(1).describe('The unique application ID to deploy'),
|
|
210
|
+
title: z.string().optional().describe('Optional deployment title'),
|
|
211
|
+
description: z.string().optional().describe('Optional deployment description'),
|
|
142
212
|
})
|
|
143
213
|
.strict(),
|
|
144
214
|
endpoint: '/application.deploy',
|
|
@@ -150,6 +220,8 @@ const redeploy = postTool({
|
|
|
150
220
|
schema: z
|
|
151
221
|
.object({
|
|
152
222
|
applicationId: z.string().min(1).describe('The unique application ID to redeploy'),
|
|
223
|
+
title: z.string().optional().describe('Optional deployment title'),
|
|
224
|
+
description: z.string().optional().describe('Optional deployment description'),
|
|
153
225
|
})
|
|
154
226
|
.strict(),
|
|
155
227
|
endpoint: '/application.redeploy',
|
|
@@ -237,15 +309,27 @@ const refreshToken = postTool({
|
|
|
237
309
|
const saveBuildType = postTool({
|
|
238
310
|
name: 'dokploy_application_save_build_type',
|
|
239
311
|
title: 'Save Build Type',
|
|
240
|
-
description: 'Set the build type and related build settings for an application in Dokploy. Requires the application ID and
|
|
312
|
+
description: 'Set the build type and related build settings for an application in Dokploy. Requires the application ID and build-type payload fields defined by the Dokploy API.',
|
|
241
313
|
schema: z
|
|
242
314
|
.object({
|
|
243
315
|
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
244
316
|
buildType: z
|
|
245
|
-
.enum([
|
|
317
|
+
.enum([
|
|
318
|
+
'dockerfile',
|
|
319
|
+
'heroku_buildpacks',
|
|
320
|
+
'paketo_buildpacks',
|
|
321
|
+
'nixpacks',
|
|
322
|
+
'static',
|
|
323
|
+
'railpack',
|
|
324
|
+
])
|
|
246
325
|
.describe('The build type to use'),
|
|
247
|
-
|
|
248
|
-
|
|
326
|
+
dockerfile: z.string().nullable().describe('Dockerfile path or content'),
|
|
327
|
+
dockerContextPath: z.string().nullable().describe('Docker build context path'),
|
|
328
|
+
dockerBuildStage: z.string().nullable().describe('Docker multi-stage build target'),
|
|
329
|
+
herokuVersion: z.string().nullable().describe('Heroku buildpacks version'),
|
|
330
|
+
railpackVersion: z.string().nullable().describe('Railpack version'),
|
|
331
|
+
publishDirectory: z.string().nullable().optional().describe('Publish directory'),
|
|
332
|
+
isStaticSpa: z.boolean().nullable().optional().describe('Whether the build is a static SPA'),
|
|
249
333
|
})
|
|
250
334
|
.strict(),
|
|
251
335
|
endpoint: '/application.saveBuildType',
|
|
@@ -257,8 +341,10 @@ const saveEnvironment = postTool({
|
|
|
257
341
|
schema: z
|
|
258
342
|
.object({
|
|
259
343
|
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
260
|
-
env: z.string().nullable().
|
|
261
|
-
buildArgs: z.string().nullable().
|
|
344
|
+
env: z.string().nullable().describe('Environment variables'),
|
|
345
|
+
buildArgs: z.string().nullable().describe('Docker build arguments'),
|
|
346
|
+
buildSecrets: z.string().nullable().describe('Docker build secrets'),
|
|
347
|
+
createEnvFile: z.boolean().describe('Whether to create an env file'),
|
|
262
348
|
})
|
|
263
349
|
.strict(),
|
|
264
350
|
endpoint: '/application.saveEnvironment',
|
|
@@ -318,14 +404,16 @@ const saveBitbucketProvider = postTool({
|
|
|
318
404
|
schema: z
|
|
319
405
|
.object({
|
|
320
406
|
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
321
|
-
bitbucketBranch: z.string().
|
|
322
|
-
bitbucketBuildPath: z.string().
|
|
323
|
-
bitbucketOwner: z.string().
|
|
324
|
-
bitbucketRepository: z.string().
|
|
325
|
-
|
|
407
|
+
bitbucketBranch: z.string().nullable().describe('Bitbucket branch'),
|
|
408
|
+
bitbucketBuildPath: z.string().nullable().describe('Build path within the repo'),
|
|
409
|
+
bitbucketOwner: z.string().nullable().describe('Bitbucket repository owner'),
|
|
410
|
+
bitbucketRepository: z.string().nullable().describe('Bitbucket repository name'),
|
|
411
|
+
bitbucketRepositorySlug: z.string().nullable().describe('Bitbucket repository slug'),
|
|
412
|
+
bitbucketId: z.string().nullable().describe('Bitbucket integration ID'),
|
|
326
413
|
enableSubmodules: z.boolean().optional().describe('Whether to initialize git submodules'),
|
|
327
414
|
watchPaths: z
|
|
328
415
|
.array(z.string())
|
|
416
|
+
.nullable()
|
|
329
417
|
.optional()
|
|
330
418
|
.describe('Paths to watch for auto-deploy triggers'),
|
|
331
419
|
})
|
|
@@ -376,13 +464,14 @@ const saveGitProvider = postTool({
|
|
|
376
464
|
const saveDockerProvider = postTool({
|
|
377
465
|
name: 'dokploy_application_save_docker_provider',
|
|
378
466
|
title: 'Configure Docker Provider',
|
|
379
|
-
description: 'Configure a Docker image as the source for an application in Dokploy. Requires the application ID and
|
|
467
|
+
description: 'Configure a Docker image as the source for an application in Dokploy. Requires the application ID and the Docker provider payload defined by the Dokploy API.',
|
|
380
468
|
schema: z
|
|
381
469
|
.object({
|
|
382
470
|
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
383
|
-
dockerImage: z.string().
|
|
384
|
-
username: z.string().
|
|
385
|
-
password: z.string().
|
|
471
|
+
dockerImage: z.string().nullable().describe('Docker image name (e.g., nginx:latest)'),
|
|
472
|
+
username: z.string().nullable().describe('Registry username for private images'),
|
|
473
|
+
password: z.string().nullable().describe('Registry password for private images'),
|
|
474
|
+
registryUrl: z.string().nullable().describe('Docker registry URL'),
|
|
386
475
|
})
|
|
387
476
|
.strict(),
|
|
388
477
|
endpoint: '/application.saveDockerProvider',
|
|
@@ -433,6 +522,51 @@ const updateTraefikConfig = postTool({
|
|
|
433
522
|
.strict(),
|
|
434
523
|
endpoint: '/application.updateTraefikConfig',
|
|
435
524
|
});
|
|
525
|
+
const clearDeployments = postTool({
|
|
526
|
+
name: 'dokploy_application_clear_deployments',
|
|
527
|
+
title: 'Clear Application Deployments',
|
|
528
|
+
description: 'Clear deployment history for an application in Dokploy. Requires the application ID.',
|
|
529
|
+
schema: z
|
|
530
|
+
.object({
|
|
531
|
+
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
532
|
+
})
|
|
533
|
+
.strict(),
|
|
534
|
+
endpoint: '/application.clearDeployments',
|
|
535
|
+
annotations: { destructiveHint: true },
|
|
536
|
+
});
|
|
537
|
+
const killBuild = postTool({
|
|
538
|
+
name: 'dokploy_application_kill_build',
|
|
539
|
+
title: 'Kill Application Build',
|
|
540
|
+
description: 'Stop an in-progress application build in Dokploy. Requires the application ID.',
|
|
541
|
+
schema: z
|
|
542
|
+
.object({
|
|
543
|
+
applicationId: z.string().min(1).describe('The unique application ID'),
|
|
544
|
+
})
|
|
545
|
+
.strict(),
|
|
546
|
+
endpoint: '/application.killBuild',
|
|
547
|
+
annotations: { destructiveHint: true },
|
|
548
|
+
});
|
|
549
|
+
const search = getTool({
|
|
550
|
+
name: 'dokploy_application_search',
|
|
551
|
+
title: 'Search Applications',
|
|
552
|
+
description: 'Search Dokploy applications by free text or field-specific filters. Supports pagination through limit and offset.',
|
|
553
|
+
schema: z
|
|
554
|
+
.object({
|
|
555
|
+
q: z.string().optional().describe('Free-text query'),
|
|
556
|
+
name: z.string().optional().describe('Application name'),
|
|
557
|
+
appName: z.string().optional().describe('Internal app name'),
|
|
558
|
+
description: z.string().optional().describe('Application description'),
|
|
559
|
+
repository: z.string().optional().describe('Repository name'),
|
|
560
|
+
owner: z.string().optional().describe('Repository owner'),
|
|
561
|
+
dockerImage: z.string().optional().describe('Docker image'),
|
|
562
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
563
|
+
environmentId: z.string().optional().describe('Environment ID'),
|
|
564
|
+
limit: z.number().min(1).max(100).optional().describe('Maximum number of results'),
|
|
565
|
+
offset: z.number().min(0).optional().describe('Number of results to skip'),
|
|
566
|
+
})
|
|
567
|
+
.strict(),
|
|
568
|
+
endpoint: '/application.search',
|
|
569
|
+
});
|
|
436
570
|
// ── export ───────────────────────────────────────────────────────────
|
|
437
571
|
export const applicationTools = [
|
|
438
572
|
create,
|
|
@@ -461,4 +595,7 @@ export const applicationTools = [
|
|
|
461
595
|
readAppMonitoring,
|
|
462
596
|
readTraefikConfig,
|
|
463
597
|
updateTraefikConfig,
|
|
598
|
+
clearDeployments,
|
|
599
|
+
killBuild,
|
|
600
|
+
search,
|
|
464
601
|
];
|
package/dist/tools/backup.js
CHANGED
|
@@ -90,6 +90,33 @@ const manualBackupMongo = postTool({
|
|
|
90
90
|
schema: z.object({ backupId }).strict(),
|
|
91
91
|
endpoint: '/backup.manualBackupMongo',
|
|
92
92
|
});
|
|
93
|
+
const manualBackupCompose = postTool({
|
|
94
|
+
name: 'dokploy_backup_manual_compose',
|
|
95
|
+
title: 'Manual Compose Backup',
|
|
96
|
+
description: 'Trigger an immediate manual backup for a compose service backup configuration. Requires the backup ID.',
|
|
97
|
+
schema: z.object({ backupId }).strict(),
|
|
98
|
+
endpoint: '/backup.manualBackupCompose',
|
|
99
|
+
});
|
|
100
|
+
const manualBackupWebServer = postTool({
|
|
101
|
+
name: 'dokploy_backup_manual_web_server',
|
|
102
|
+
title: 'Manual Web Server Backup',
|
|
103
|
+
description: 'Trigger an immediate manual backup for the Dokploy web server backup configuration. Requires the backup ID.',
|
|
104
|
+
schema: z.object({ backupId }).strict(),
|
|
105
|
+
endpoint: '/backup.manualBackupWebServer',
|
|
106
|
+
});
|
|
107
|
+
const listBackupFiles = getTool({
|
|
108
|
+
name: 'dokploy_backup_list_backup_files',
|
|
109
|
+
title: 'List Backup Files',
|
|
110
|
+
description: 'List backup files available at a destination. Requires the destination ID and a search prefix. Optionally filter by server ID.',
|
|
111
|
+
schema: z
|
|
112
|
+
.object({
|
|
113
|
+
destinationId: z.string().describe('Destination ID'),
|
|
114
|
+
search: z.string().describe('Search prefix'),
|
|
115
|
+
serverId: z.string().optional().describe('Optional server ID'),
|
|
116
|
+
})
|
|
117
|
+
.strict(),
|
|
118
|
+
endpoint: '/backup.listBackupFiles',
|
|
119
|
+
});
|
|
93
120
|
// ── export ───────────────────────────────────────────────────────────
|
|
94
121
|
export const backupTools = [
|
|
95
122
|
one,
|
|
@@ -100,4 +127,7 @@ export const backupTools = [
|
|
|
100
127
|
manualBackupMySql,
|
|
101
128
|
manualBackupMariadb,
|
|
102
129
|
manualBackupMongo,
|
|
130
|
+
manualBackupCompose,
|
|
131
|
+
manualBackupWebServer,
|
|
132
|
+
listBackupFiles,
|
|
103
133
|
];
|