@vibetools/dokploy-mcp 0.4.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 (68) hide show
  1. package/README.md +692 -0
  2. package/dist/api/client.d.ts +11 -0
  3. package/dist/api/client.js +103 -0
  4. package/dist/cli/index.d.ts +1 -0
  5. package/dist/cli/index.js +48 -0
  6. package/dist/cli/setup.d.ts +1 -0
  7. package/dist/cli/setup.js +112 -0
  8. package/dist/config/resolver.d.ts +38 -0
  9. package/dist/config/resolver.js +290 -0
  10. package/dist/config/types.d.ts +25 -0
  11. package/dist/config/types.js +33 -0
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +25 -0
  14. package/dist/server.d.ts +2 -0
  15. package/dist/server.js +17 -0
  16. package/dist/tools/_factory.d.ts +53 -0
  17. package/dist/tools/_factory.js +86 -0
  18. package/dist/tools/admin.d.ts +2 -0
  19. package/dist/tools/admin.js +61 -0
  20. package/dist/tools/application.d.ts +2 -0
  21. package/dist/tools/application.js +464 -0
  22. package/dist/tools/auth.d.ts +2 -0
  23. package/dist/tools/auth.js +150 -0
  24. package/dist/tools/backup.d.ts +2 -0
  25. package/dist/tools/backup.js +103 -0
  26. package/dist/tools/certificates.d.ts +2 -0
  27. package/dist/tools/certificates.js +54 -0
  28. package/dist/tools/cluster.d.ts +2 -0
  29. package/dist/tools/cluster.js +38 -0
  30. package/dist/tools/compose.d.ts +2 -0
  31. package/dist/tools/compose.js +213 -0
  32. package/dist/tools/deployment.d.ts +2 -0
  33. package/dist/tools/deployment.js +27 -0
  34. package/dist/tools/destination.d.ts +2 -0
  35. package/dist/tools/destination.js +78 -0
  36. package/dist/tools/docker.d.ts +2 -0
  37. package/dist/tools/docker.js +50 -0
  38. package/dist/tools/domain.d.ts +2 -0
  39. package/dist/tools/domain.js +134 -0
  40. package/dist/tools/index.d.ts +2 -0
  41. package/dist/tools/index.js +48 -0
  42. package/dist/tools/mariadb.d.ts +2 -0
  43. package/dist/tools/mariadb.js +170 -0
  44. package/dist/tools/mongo.d.ts +2 -0
  45. package/dist/tools/mongo.js +168 -0
  46. package/dist/tools/mounts.d.ts +2 -0
  47. package/dist/tools/mounts.js +65 -0
  48. package/dist/tools/mysql.d.ts +2 -0
  49. package/dist/tools/mysql.js +170 -0
  50. package/dist/tools/port.d.ts +2 -0
  51. package/dist/tools/port.js +54 -0
  52. package/dist/tools/postgres.d.ts +2 -0
  53. package/dist/tools/postgres.js +169 -0
  54. package/dist/tools/project.d.ts +2 -0
  55. package/dist/tools/project.js +94 -0
  56. package/dist/tools/redirects.d.ts +2 -0
  57. package/dist/tools/redirects.js +53 -0
  58. package/dist/tools/redis.d.ts +2 -0
  59. package/dist/tools/redis.js +167 -0
  60. package/dist/tools/registry.d.ts +2 -0
  61. package/dist/tools/registry.js +81 -0
  62. package/dist/tools/security.d.ts +2 -0
  63. package/dist/tools/security.js +48 -0
  64. package/dist/tools/settings.d.ts +2 -0
  65. package/dist/tools/settings.js +258 -0
  66. package/dist/tools/user.d.ts +2 -0
  67. package/dist/tools/user.js +12 -0
  68. package/package.json +64 -0
@@ -0,0 +1,103 @@
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
+ ];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const certificatesTools: ToolDefinition[];
@@ -0,0 +1,54 @@
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];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const clusterTools: ToolDefinition[];
@@ -0,0 +1,38 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── tools ────────────────────────────────────────────────────────────
4
+ const getNodes = getTool({
5
+ name: 'dokploy_cluster_get_nodes',
6
+ title: 'List Cluster Nodes',
7
+ description: 'List all nodes in the Docker Swarm cluster. No parameters required. Returns an array of node objects including each node ID, hostname, role (manager or worker), availability status, and resource information.',
8
+ schema: z.object({}).strict(),
9
+ endpoint: '/cluster.getNodes',
10
+ });
11
+ const addWorker = getTool({
12
+ name: 'dokploy_cluster_add_worker',
13
+ title: 'Get Add Worker Command',
14
+ description: 'Get the Docker Swarm join command to add a new worker node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate token and manager address that should be executed on the new worker machine.',
15
+ schema: z.object({}).strict(),
16
+ endpoint: '/cluster.addWorker',
17
+ });
18
+ const addManager = getTool({
19
+ name: 'dokploy_cluster_add_manager',
20
+ title: 'Get Add Manager Command',
21
+ description: 'Get the Docker Swarm join command to add a new manager node to the cluster. No parameters required. Returns the full docker swarm join command with the appropriate manager token and address that should be executed on the new manager machine.',
22
+ schema: z.object({}).strict(),
23
+ endpoint: '/cluster.addManager',
24
+ });
25
+ const removeWorker = postTool({
26
+ name: 'dokploy_cluster_remove_worker',
27
+ title: 'Remove Worker Node',
28
+ description: 'Remove a worker node from the Docker Swarm cluster. This action is irreversible and any services running on the node will be rescheduled to other available nodes. Requires the nodeId parameter identifying the worker to remove. Returns a confirmation of the removal.',
29
+ schema: z
30
+ .object({
31
+ nodeId: z.string().min(1).describe('ID of the worker node to remove from the cluster'),
32
+ })
33
+ .strict(),
34
+ endpoint: '/cluster.removeWorker',
35
+ annotations: { destructiveHint: true },
36
+ });
37
+ // ── export ───────────────────────────────────────────────────────────
38
+ export const clusterTools = [getNodes, addWorker, addManager, removeWorker];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const composeTools: ToolDefinition[];
@@ -0,0 +1,213 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── tools ────────────────────────────────────────────────────────────
4
+ const create = postTool({
5
+ name: 'dokploy_compose_create',
6
+ title: 'Create Compose Service',
7
+ description: 'Create a new Docker Compose service within a project. Requires a service name and project ID. Optionally specify the compose type (docker-compose or stack), a custom app name, and a target server ID. Returns the newly created compose service object.',
8
+ schema: z
9
+ .object({
10
+ name: z.string().min(1).describe('The name of the compose service'),
11
+ projectId: z.string().min(1).describe('The project ID to create the compose service in'),
12
+ description: z.string().nullable().optional().describe('Compose service description'),
13
+ composeType: z
14
+ .enum(['docker-compose', 'stack'])
15
+ .optional()
16
+ .describe('Compose type: docker-compose or stack'),
17
+ appName: z.string().optional().describe('Custom app name (auto-generated if not provided)'),
18
+ serverId: z.string().nullable().optional().describe('Target server ID for deployment'),
19
+ })
20
+ .strict(),
21
+ endpoint: '/compose.create',
22
+ });
23
+ const one = getTool({
24
+ name: 'dokploy_compose_one',
25
+ title: 'Get Compose Service',
26
+ description: 'Get detailed information about a single compose service by its ID. Returns the full compose service configuration including its source type, environment variables, deployment status, and associated project.',
27
+ schema: z
28
+ .object({
29
+ composeId: z.string().min(1).describe('The unique compose service ID'),
30
+ })
31
+ .strict(),
32
+ endpoint: '/compose.one',
33
+ });
34
+ const update = postTool({
35
+ name: 'dokploy_compose_update',
36
+ title: 'Update Compose Service',
37
+ description: 'Update an existing compose service configuration. Accepts the compose service ID and any combination of fields to modify, including name, environment variables, compose file content, source type, Git repository settings, and auto-deploy preferences. Returns the updated compose service object.',
38
+ schema: z
39
+ .object({
40
+ composeId: z.string().min(1).describe('The unique compose service ID'),
41
+ name: z.string().optional().describe('Compose service name'),
42
+ appName: z.string().optional().describe('Internal app name'),
43
+ description: z.string().nullable().optional().describe('Service description'),
44
+ env: z.string().nullable().optional().describe('Environment variables'),
45
+ composeFile: z.string().nullable().optional().describe('Docker Compose file content'),
46
+ sourceType: z
47
+ .enum(['git', 'github', 'raw'])
48
+ .optional()
49
+ .describe('Source type for the compose file'),
50
+ composeType: z
51
+ .enum(['docker-compose', 'stack'])
52
+ .optional()
53
+ .describe('Compose type: docker-compose or stack'),
54
+ repository: z.string().optional().describe('Git repository name'),
55
+ owner: z.string().optional().describe('Git repository owner'),
56
+ branch: z.string().optional().describe('Git branch'),
57
+ autoDeploy: z.boolean().optional().describe('Whether auto-deploy is enabled'),
58
+ customGitUrl: z.string().optional().describe('Custom Git repository URL'),
59
+ customGitBranch: z.string().optional().describe('Custom Git branch'),
60
+ customGitSSHKey: z
61
+ .string()
62
+ .nullable()
63
+ .optional()
64
+ .describe('SSH key for custom Git authentication'),
65
+ command: z.string().nullable().optional().describe('Custom command override'),
66
+ composePath: z.string().optional().describe('Path to the compose file within the repo'),
67
+ composeStatus: z.string().optional().describe('Compose service status'),
68
+ projectId: z.string().optional().describe('Project ID'),
69
+ })
70
+ .strict(),
71
+ endpoint: '/compose.update',
72
+ });
73
+ const deleteCompose = postTool({
74
+ name: 'dokploy_compose_delete',
75
+ title: 'Delete Compose Service',
76
+ description: 'Permanently delete a compose service and all of its associated data, including containers, volumes, and configuration. This action is irreversible. Requires the compose service ID.',
77
+ schema: z
78
+ .object({
79
+ composeId: z.string().min(1).describe('The unique compose service ID to delete'),
80
+ })
81
+ .strict(),
82
+ endpoint: '/compose.delete',
83
+ annotations: { destructiveHint: true },
84
+ });
85
+ const deploy = postTool({
86
+ name: 'dokploy_compose_deploy',
87
+ title: 'Deploy Compose Service',
88
+ description: 'Deploy a Docker Compose service by triggering a build and run cycle. Requires the compose service ID. Returns the deployment status and any build logs produced during the deployment process.',
89
+ schema: z
90
+ .object({
91
+ composeId: z.string().min(1).describe('The unique compose service ID to deploy'),
92
+ })
93
+ .strict(),
94
+ endpoint: '/compose.deploy',
95
+ });
96
+ const redeploy = postTool({
97
+ name: 'dokploy_compose_redeploy',
98
+ title: 'Redeploy Compose Service',
99
+ description: 'Redeploy a compose service by rebuilding all containers and restarting them. This is useful when you need to pick up configuration changes or force a fresh deployment. Requires the compose service ID.',
100
+ schema: z
101
+ .object({
102
+ composeId: z.string().min(1).describe('The unique compose service ID to redeploy'),
103
+ })
104
+ .strict(),
105
+ endpoint: '/compose.redeploy',
106
+ });
107
+ const stop = postTool({
108
+ name: 'dokploy_compose_stop',
109
+ title: 'Stop Compose Service',
110
+ description: 'Stop all running containers in a compose service. The containers and their data are preserved but will no longer be running or serving traffic. Requires the compose service ID.',
111
+ schema: z
112
+ .object({
113
+ composeId: z.string().min(1).describe('The unique compose service ID to stop'),
114
+ })
115
+ .strict(),
116
+ endpoint: '/compose.stop',
117
+ annotations: { destructiveHint: true },
118
+ });
119
+ const cleanQueues = postTool({
120
+ name: 'dokploy_compose_clean_queues',
121
+ title: 'Clean Compose Queues',
122
+ description: 'Clean the pending deployment queues for a compose service. This removes any queued deployment tasks that have not yet started. Useful for clearing stuck or unwanted deployments. Requires the compose service ID.',
123
+ schema: z
124
+ .object({
125
+ composeId: z.string().min(1).describe('The unique compose service ID'),
126
+ })
127
+ .strict(),
128
+ endpoint: '/compose.cleanQueues',
129
+ annotations: { destructiveHint: true },
130
+ });
131
+ const randomizeCompose = postTool({
132
+ name: 'dokploy_compose_randomize',
133
+ title: 'Randomize Compose Names',
134
+ description: 'Randomize the service names within a compose deployment to avoid naming conflicts. An optional prefix can be provided to prepend to the randomized names. Requires the compose service ID. Returns the updated compose configuration.',
135
+ schema: z
136
+ .object({
137
+ composeId: z.string().min(1).describe('The unique compose service ID'),
138
+ prefix: z.string().optional().describe('Optional prefix for randomized names'),
139
+ })
140
+ .strict(),
141
+ endpoint: '/compose.randomizeCompose',
142
+ });
143
+ const getDefaultCommand = getTool({
144
+ name: 'dokploy_compose_get_default_command',
145
+ title: 'Get Default Command',
146
+ description: 'Retrieve the default deployment command for a compose service. This is the command that Dokploy uses to bring up the compose stack during deployment. Requires the compose service ID. Returns the command string.',
147
+ schema: z
148
+ .object({
149
+ composeId: z.string().min(1).describe('The unique compose service ID'),
150
+ })
151
+ .strict(),
152
+ endpoint: '/compose.getDefaultCommand',
153
+ });
154
+ const refreshToken = postTool({
155
+ name: 'dokploy_compose_refresh_token',
156
+ title: 'Refresh Webhook Token',
157
+ description: 'Refresh the webhook token for a compose service. This invalidates the previous webhook URL and generates a new one. Useful when the existing webhook token has been compromised. Requires the compose service ID.',
158
+ schema: z
159
+ .object({
160
+ composeId: z.string().min(1).describe('The unique compose service ID'),
161
+ })
162
+ .strict(),
163
+ endpoint: '/compose.refreshToken',
164
+ });
165
+ const deployTemplate = postTool({
166
+ name: 'dokploy_compose_deploy_template',
167
+ title: 'Deploy Compose Template',
168
+ description: 'Deploy a compose service from a predefined template. Templates provide pre-configured compose stacks for common applications. Requires a project ID and the template ID. Returns the created compose service with deployment status.',
169
+ schema: z
170
+ .object({
171
+ projectId: z.string().min(1).describe('The project ID to deploy the template in'),
172
+ id: z.string().min(1).describe('The template ID to deploy'),
173
+ })
174
+ .strict(),
175
+ endpoint: '/compose.deployTemplate',
176
+ });
177
+ const templates = getTool({
178
+ name: 'dokploy_compose_templates',
179
+ title: 'List Compose Templates',
180
+ description: 'List all available compose templates that can be deployed. Templates are pre-configured Docker Compose stacks for popular applications and services. Returns an array of template objects with their IDs, names, and descriptions.',
181
+ schema: z.object({}).strict(),
182
+ endpoint: '/compose.templates',
183
+ });
184
+ const saveEnvironment = postTool({
185
+ name: 'dokploy_compose_save_environment',
186
+ title: 'Save Environment Variables',
187
+ description: 'Save environment variables and Docker build arguments for a compose service. Environment variables are injected at runtime while build arguments are passed during the image build phase. Requires the compose service ID.',
188
+ schema: z
189
+ .object({
190
+ composeId: z.string().min(1).describe('The unique compose service ID'),
191
+ env: z.string().nullable().optional().describe('Environment variables'),
192
+ buildArgs: z.string().nullable().optional().describe('Docker build arguments'),
193
+ })
194
+ .strict(),
195
+ endpoint: '/compose.saveEnvironment',
196
+ });
197
+ // ── export ───────────────────────────────────────────────────────────
198
+ export const composeTools = [
199
+ create,
200
+ one,
201
+ update,
202
+ deleteCompose,
203
+ deploy,
204
+ redeploy,
205
+ stop,
206
+ cleanQueues,
207
+ randomizeCompose,
208
+ getDefaultCommand,
209
+ refreshToken,
210
+ deployTemplate,
211
+ templates,
212
+ saveEnvironment,
213
+ ];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const deploymentTools: ToolDefinition[];
@@ -0,0 +1,27 @@
1
+ import { z } from 'zod';
2
+ import { getTool } from './_factory.js';
3
+ // ── tools ────────────────────────────────────────────────────────────
4
+ const all = getTool({
5
+ name: 'dokploy_deployment_all',
6
+ title: 'List Application Deployments',
7
+ description: 'List all deployment records for a specific application in Dokploy. Each deployment includes build logs, status, timestamps, and the triggering event. Requires the application ID. Returns an array of deployment objects ordered by creation date.',
8
+ schema: z
9
+ .object({
10
+ applicationId: z.string().min(1).describe('The unique application ID'),
11
+ })
12
+ .strict(),
13
+ endpoint: '/deployment.all',
14
+ });
15
+ const allByCompose = getTool({
16
+ name: 'dokploy_deployment_all_by_compose',
17
+ title: 'List Compose Deployments',
18
+ description: 'List all deployment records for a specific Docker Compose service in Dokploy. Each deployment includes build logs, status, timestamps, and the triggering event. Requires the compose service ID. Returns an array of deployment objects ordered by creation date.',
19
+ schema: z
20
+ .object({
21
+ composeId: z.string().min(1).describe('The unique compose service ID'),
22
+ })
23
+ .strict(),
24
+ endpoint: '/deployment.allByCompose',
25
+ });
26
+ // ── export ───────────────────────────────────────────────────────────
27
+ export const deploymentTools = [all, allByCompose];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const destinationTools: ToolDefinition[];
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── helpers ──────────────────────────────────────────────────────────
4
+ const destinationBaseSchema = {
5
+ name: z.string().min(1).describe('Name for the S3 destination'),
6
+ accessKey: z.string().min(1).describe('S3 access key'),
7
+ bucket: z.string().min(1).describe('S3 bucket name'),
8
+ region: z.string().min(1).describe('S3 region'),
9
+ endpoint: z.string().min(1).describe('S3 endpoint URL'),
10
+ secretAccessKey: z.string().min(1).describe('S3 secret access key'),
11
+ };
12
+ // ── tools ────────────────────────────────────────────────────────────
13
+ const all = getTool({
14
+ name: 'dokploy_destination_all',
15
+ title: 'List Backup Destinations',
16
+ description: 'List all S3-compatible backup destinations configured in Dokploy. Takes no parameters. Returns an array of destination objects including their IDs, names, bucket configurations, and connection details.',
17
+ schema: z.object({}).strict(),
18
+ endpoint: '/destination.all',
19
+ });
20
+ const one = getTool({
21
+ name: 'dokploy_destination_one',
22
+ title: 'Get Backup Destination',
23
+ description: 'Retrieve the full configuration of a specific backup destination by its unique ID. Requires the destinationId parameter. Returns the destination object with name, S3 bucket, region, endpoint, and credential details.',
24
+ schema: z
25
+ .object({
26
+ destinationId: z.string().min(1).describe('Unique destination ID'),
27
+ })
28
+ .strict(),
29
+ endpoint: '/destination.one',
30
+ });
31
+ const create = postTool({
32
+ name: 'dokploy_destination_create',
33
+ title: 'Create Backup Destination',
34
+ description: 'Create a new S3-compatible backup destination in Dokploy. Requires the destination name, S3 access key, secret access key, bucket name, region, and endpoint URL. Returns the newly created destination object with its assigned ID.',
35
+ schema: z
36
+ .object({
37
+ ...destinationBaseSchema,
38
+ })
39
+ .strict(),
40
+ endpoint: '/destination.create',
41
+ });
42
+ const update = postTool({
43
+ name: 'dokploy_destination_update',
44
+ title: 'Update Backup Destination',
45
+ description: 'Update an existing S3-compatible backup destination configuration. Requires the destinationId of the destination to modify along with the updated S3 credentials and bucket settings. Returns the updated destination object.',
46
+ schema: z
47
+ .object({
48
+ destinationId: z.string().min(1).describe('Unique destination ID to update'),
49
+ ...destinationBaseSchema,
50
+ })
51
+ .strict(),
52
+ endpoint: '/destination.update',
53
+ });
54
+ const remove = postTool({
55
+ name: 'dokploy_destination_remove',
56
+ title: 'Remove Backup Destination',
57
+ description: 'Permanently remove a backup destination from Dokploy. This action is irreversible and will delete the destination configuration. Requires the destinationId parameter. Any backup schedules referencing this destination should be updated or removed first.',
58
+ schema: z
59
+ .object({
60
+ destinationId: z.string().min(1).describe('Unique destination ID to remove'),
61
+ })
62
+ .strict(),
63
+ endpoint: '/destination.remove',
64
+ annotations: { destructiveHint: true },
65
+ });
66
+ const testConnection = postTool({
67
+ name: 'dokploy_destination_test_connection',
68
+ title: 'Test Destination Connection',
69
+ description: 'Test the connection to an S3-compatible backup destination using the provided credentials. Requires the destination name, access key, secret access key, bucket, region, and endpoint. Returns a success or failure status indicating whether the S3 bucket is reachable and writable.',
70
+ schema: z
71
+ .object({
72
+ ...destinationBaseSchema,
73
+ })
74
+ .strict(),
75
+ endpoint: '/destination.testConnection',
76
+ });
77
+ // ── export ───────────────────────────────────────────────────────────
78
+ export const destinationTools = [all, one, create, update, remove, testConnection];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const dockerTools: ToolDefinition[];
@@ -0,0 +1,50 @@
1
+ import { z } from 'zod';
2
+ import { getTool } from './_factory.js';
3
+ // ── tools ────────────────────────────────────────────────────────────
4
+ const getContainers = getTool({
5
+ name: 'dokploy_docker_get_containers',
6
+ title: 'List Docker Containers',
7
+ description: 'List all Docker containers running on the Dokploy server. Returns container metadata including names, images, status, ports, and resource usage. Takes no parameters. Useful for getting an overview of all running and stopped containers.',
8
+ schema: z.object({}).strict(),
9
+ endpoint: '/docker.getContainers',
10
+ });
11
+ const getConfig = getTool({
12
+ name: 'dokploy_docker_get_config',
13
+ title: 'Get Docker Container Config',
14
+ description: 'Get the full configuration of a specific Docker container by its ID. Returns detailed container settings including environment variables, volumes, network configuration, and resource limits. Requires the Docker container ID.',
15
+ schema: z
16
+ .object({
17
+ containerId: z.string().min(1).describe('The Docker container ID'),
18
+ })
19
+ .strict(),
20
+ endpoint: '/docker.getConfig',
21
+ });
22
+ const getContainersByAppNameMatch = getTool({
23
+ name: 'dokploy_docker_get_containers_by_app_name_match',
24
+ title: 'Find Containers by App Name',
25
+ description: 'Find Docker containers whose name matches the given application name. Performs a substring match against container names to locate containers belonging to a specific app. Requires the app name string. Returns matching container objects with their metadata.',
26
+ schema: z
27
+ .object({
28
+ appName: z.string().min(1).describe('The app name to match against container names'),
29
+ })
30
+ .strict(),
31
+ endpoint: '/docker.getContainersByAppNameMatch',
32
+ });
33
+ const getContainersByAppLabel = getTool({
34
+ name: 'dokploy_docker_get_containers_by_app_label',
35
+ title: 'Find Containers by App Label',
36
+ description: 'Find Docker containers by their application label metadata. Searches for containers that have a matching app label, which is the recommended way to identify containers managed by Dokploy. Requires the app name label value. Returns matching container objects.',
37
+ schema: z
38
+ .object({
39
+ appName: z.string().min(1).describe('The app name label to search for'),
40
+ })
41
+ .strict(),
42
+ endpoint: '/docker.getContainersByAppLabel',
43
+ });
44
+ // ── export ───────────────────────────────────────────────────────────
45
+ export const dockerTools = [
46
+ getContainers,
47
+ getConfig,
48
+ getContainersByAppNameMatch,
49
+ getContainersByAppLabel,
50
+ ];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const domainTools: ToolDefinition[];