@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,170 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── helpers ──────────────────────────────────────────────────────────
4
+ const myId = z.string().min(1).describe('Unique MySQL database ID');
5
+ const DB = 'mysql';
6
+ // ── tools ────────────────────────────────────────────────────────────
7
+ const one = getTool({
8
+ name: `dokploy_${DB}_one`,
9
+ title: 'Get MySQL Details',
10
+ description: 'Retrieve detailed information about a specific MySQL database managed by Dokploy. Returns the full configuration including connection settings, resource limits, environment variables, and current status. Requires the unique MySQL database ID.',
11
+ schema: z.object({ mysqlId: myId }).strict(),
12
+ endpoint: `${DB}.one`,
13
+ });
14
+ const create = postTool({
15
+ name: `dokploy_${DB}_create`,
16
+ title: 'Create MySQL Database',
17
+ description: 'Create a new MySQL database instance inside a Dokploy project. Requires a display name, app-level identifier, database name, user credentials, root password, and the target project ID. Optionally specify a Docker image, description, or remote server. Returns the newly created database record.',
18
+ schema: z
19
+ .object({
20
+ name: z.string().min(1).describe('Display name for the database'),
21
+ appName: z.string().min(1).describe('Unique app-level identifier'),
22
+ databaseName: z.string().min(1).describe('Name of the database to create'),
23
+ databaseUser: z.string().min(1).describe('Database user'),
24
+ databasePassword: z.string().min(1).describe('Database password'),
25
+ databaseRootPassword: z.string().min(1).describe('Root password for MySQL'),
26
+ projectId: z.string().min(1).describe('Project ID to create the database in'),
27
+ dockerImage: z.string().optional().describe('Docker image (default: mysql:8)'),
28
+ description: z.string().nullable().optional().describe('Optional description'),
29
+ serverId: z.string().nullable().optional().describe('Target server ID (null for local)'),
30
+ })
31
+ .strict(),
32
+ endpoint: `${DB}.create`,
33
+ });
34
+ const update = postTool({
35
+ name: `dokploy_${DB}_update`,
36
+ title: 'Update MySQL Database',
37
+ description: 'Update the configuration of an existing MySQL database in Dokploy. Supports modifying the display name, Docker image, resource limits (CPU and memory), custom start command, environment variables, and external port. Requires the MySQL database ID. Only the provided fields are updated.',
38
+ schema: z
39
+ .object({
40
+ mysqlId: myId,
41
+ name: z.string().min(1).optional().describe('Display name'),
42
+ appName: z.string().min(1).optional().describe('App-level identifier'),
43
+ description: z.string().nullable().optional().describe('Description'),
44
+ dockerImage: z.string().optional().describe('Docker image'),
45
+ memoryReservation: z.number().nullable().optional().describe('Memory reservation in MB'),
46
+ memoryLimit: z.number().nullable().optional().describe('Memory limit in MB'),
47
+ cpuReservation: z.number().nullable().optional().describe('CPU reservation'),
48
+ cpuLimit: z.number().nullable().optional().describe('CPU limit'),
49
+ command: z.string().nullable().optional().describe('Custom start command'),
50
+ env: z.string().nullable().optional().describe('Environment variables'),
51
+ externalPort: z.number().nullable().optional().describe('External port'),
52
+ })
53
+ .strict(),
54
+ endpoint: `${DB}.update`,
55
+ });
56
+ const remove = postTool({
57
+ name: `dokploy_${DB}_remove`,
58
+ title: 'Remove MySQL Database',
59
+ description: 'Permanently delete a MySQL database from Dokploy. This action removes the database container, its data, and all associated configuration. Requires the MySQL database ID. This operation is destructive and cannot be undone.',
60
+ schema: z.object({ mysqlId: myId }).strict(),
61
+ endpoint: `${DB}.remove`,
62
+ annotations: { destructiveHint: true },
63
+ });
64
+ const move = postTool({
65
+ name: `dokploy_${DB}_move`,
66
+ title: 'Move MySQL Database',
67
+ description: 'Move a MySQL database from its current project to a different project within Dokploy. Requires the MySQL database ID and the destination project ID. The database configuration and data are preserved during the move.',
68
+ schema: z
69
+ .object({
70
+ mysqlId: myId,
71
+ targetProjectId: z.string().min(1).describe('Destination project ID'),
72
+ })
73
+ .strict(),
74
+ endpoint: `${DB}.move`,
75
+ });
76
+ const deploy = postTool({
77
+ name: `dokploy_${DB}_deploy`,
78
+ title: 'Deploy MySQL Database',
79
+ description: 'Deploy a MySQL database container in Dokploy. Triggers the build and start process for the specified database. Requires the MySQL database ID. Returns the deployment status.',
80
+ schema: z.object({ mysqlId: myId }).strict(),
81
+ endpoint: `${DB}.deploy`,
82
+ });
83
+ const start = postTool({
84
+ name: `dokploy_${DB}_start`,
85
+ title: 'Start MySQL Database',
86
+ description: 'Start a previously stopped MySQL database container in Dokploy. The database must already be deployed. Requires the MySQL database ID. Returns the updated status after starting.',
87
+ schema: z.object({ mysqlId: myId }).strict(),
88
+ endpoint: `${DB}.start`,
89
+ });
90
+ const stop = postTool({
91
+ name: `dokploy_${DB}_stop`,
92
+ title: 'Stop MySQL Database',
93
+ description: 'Stop a running MySQL database container in Dokploy. The database data is preserved but the container will no longer accept connections. Requires the MySQL database ID. This is a destructive action as it interrupts active connections.',
94
+ schema: z.object({ mysqlId: myId }).strict(),
95
+ endpoint: `${DB}.stop`,
96
+ annotations: { destructiveHint: true },
97
+ });
98
+ const reload = postTool({
99
+ name: `dokploy_${DB}_reload`,
100
+ title: 'Reload MySQL Database',
101
+ description: 'Reload the MySQL database container in Dokploy without a full restart. Applies configuration changes that do not require a rebuild. Requires the MySQL database ID and the app-level identifier. Returns the reload status.',
102
+ schema: z
103
+ .object({
104
+ mysqlId: myId,
105
+ appName: z.string().min(1).describe('App-level identifier'),
106
+ })
107
+ .strict(),
108
+ endpoint: `${DB}.reload`,
109
+ });
110
+ const rebuild = postTool({
111
+ name: `dokploy_${DB}_rebuild`,
112
+ title: 'Rebuild MySQL Database',
113
+ description: 'Rebuild the MySQL database container from scratch in Dokploy. This tears down the existing container and recreates it with the current configuration. Requires the MySQL database ID. Useful after changing the Docker image or when the container is in a broken state.',
114
+ schema: z.object({ mysqlId: myId }).strict(),
115
+ endpoint: `${DB}.rebuild`,
116
+ });
117
+ const changeStatus = postTool({
118
+ name: `dokploy_${DB}_change_status`,
119
+ title: 'Change MySQL Status',
120
+ description: 'Manually set the application status of a MySQL database in Dokploy. Accepts one of: idle, running, done, or error. Requires the MySQL database ID and the new status value. Useful for correcting a stale or incorrect status.',
121
+ schema: z
122
+ .object({
123
+ mysqlId: myId,
124
+ applicationStatus: z
125
+ .enum(['idle', 'running', 'done', 'error'])
126
+ .describe('New application status'),
127
+ })
128
+ .strict(),
129
+ endpoint: `${DB}.changeStatus`,
130
+ });
131
+ const saveExternalPort = postTool({
132
+ name: `dokploy_${DB}_save_external_port`,
133
+ title: 'Save MySQL External Port',
134
+ description: 'Set or clear the external port mapping for a MySQL database in Dokploy. When set, the database is accessible from outside the Docker network on the specified port. Pass null to remove the external port. Requires the MySQL database ID.',
135
+ schema: z
136
+ .object({
137
+ mysqlId: myId,
138
+ externalPort: z.number().nullable().describe('External port number (null to remove)'),
139
+ })
140
+ .strict(),
141
+ endpoint: `${DB}.saveExternalPort`,
142
+ });
143
+ const saveEnvironment = postTool({
144
+ name: `dokploy_${DB}_save_environment`,
145
+ title: 'Save MySQL Environment',
146
+ description: 'Overwrite the environment variables for a MySQL database in Dokploy. Replaces all existing environment variables with the provided value. Pass the variables as a single string (one per line, KEY=VALUE format). Requires the MySQL database ID.',
147
+ schema: z
148
+ .object({
149
+ mysqlId: myId,
150
+ env: z.string().nullable().optional().describe('Environment variables as a string'),
151
+ })
152
+ .strict(),
153
+ endpoint: `${DB}.saveEnvironment`,
154
+ });
155
+ // ── export ───────────────────────────────────────────────────────────
156
+ export const mysqlTools = [
157
+ one,
158
+ create,
159
+ update,
160
+ remove,
161
+ move,
162
+ deploy,
163
+ start,
164
+ stop,
165
+ reload,
166
+ rebuild,
167
+ changeStatus,
168
+ saveExternalPort,
169
+ saveEnvironment,
170
+ ];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const portTools: ToolDefinition[];
@@ -0,0 +1,54 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── helpers ──────────────────────────────────────────────────────────
4
+ const portId = z.string().min(1).describe('Unique port mapping ID');
5
+ // ── tools ────────────────────────────────────────────────────────────
6
+ const one = getTool({
7
+ name: 'dokploy_port_one',
8
+ title: 'Get Port Mapping',
9
+ description: 'Retrieve the full configuration of a specific port mapping by its unique ID. Requires the portId parameter. Returns the port mapping object including the published port, target port, protocol (TCP/UDP), and associated application ID.',
10
+ schema: z.object({ portId }).strict(),
11
+ endpoint: '/port.one',
12
+ });
13
+ const create = postTool({
14
+ name: 'dokploy_port_create',
15
+ title: 'Create Port Mapping',
16
+ description: 'Create a new port mapping for a Dokploy application. Maps an externally published port to a target port inside the container. Requires the published port number, target port number, and application ID. Optionally specify the protocol as TCP (default) or UDP. Returns the created port mapping configuration.',
17
+ schema: z
18
+ .object({
19
+ publishedPort: z.number().describe('The externally published port number'),
20
+ targetPort: z.number().describe('The target port inside the container'),
21
+ applicationId: z.string().min(1).describe('ID of the application to add the port mapping to'),
22
+ protocol: z
23
+ .enum(['tcp', 'udp'])
24
+ .optional()
25
+ .default('tcp')
26
+ .describe('Network protocol for the port mapping'),
27
+ })
28
+ .strict(),
29
+ endpoint: '/port.create',
30
+ });
31
+ const update = postTool({
32
+ name: 'dokploy_port_update',
33
+ title: 'Update Port Mapping',
34
+ description: 'Update an existing port mapping configuration for a Dokploy application. Requires the portId of the mapping to modify. Optionally update the published port, target port, or protocol (TCP/UDP). Returns the updated port mapping configuration.',
35
+ schema: z
36
+ .object({
37
+ portId,
38
+ publishedPort: z.number().optional().describe('New externally published port number'),
39
+ targetPort: z.number().optional().describe('New target port inside the container'),
40
+ protocol: z.enum(['tcp', 'udp']).optional().describe('New network protocol'),
41
+ })
42
+ .strict(),
43
+ endpoint: '/port.update',
44
+ });
45
+ const deleteTool = postTool({
46
+ name: 'dokploy_port_delete',
47
+ title: 'Delete Port Mapping',
48
+ description: 'Permanently delete a port mapping from a Dokploy application. This action is irreversible and removes the external port exposure for the container. Requires the portId parameter. The container port will no longer be accessible on the previously published port.',
49
+ schema: z.object({ portId }).strict(),
50
+ endpoint: '/port.delete',
51
+ annotations: { destructiveHint: true },
52
+ });
53
+ // ── export ───────────────────────────────────────────────────────────
54
+ export const portTools = [one, create, update, deleteTool];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const postgresTools: ToolDefinition[];
@@ -0,0 +1,169 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── helpers ──────────────────────────────────────────────────────────
4
+ const pgId = z.string().min(1).describe('Unique Postgres database ID');
5
+ const DB = 'postgres';
6
+ // ── tools ────────────────────────────────────────────────────────────
7
+ const one = getTool({
8
+ name: `dokploy_${DB}_one`,
9
+ title: 'Get Postgres Details',
10
+ description: 'Retrieve detailed information about a specific Postgres database managed by Dokploy. Returns the full configuration including connection settings, resource limits, environment variables, and current status. Requires the unique Postgres database ID.',
11
+ schema: z.object({ postgresId: pgId }).strict(),
12
+ endpoint: `${DB}.one`,
13
+ });
14
+ const create = postTool({
15
+ name: `dokploy_${DB}_create`,
16
+ title: 'Create Postgres Database',
17
+ description: 'Create a new Postgres database instance inside a Dokploy project. Requires a display name, app-level identifier, database name, user credentials, and the target project ID. Optionally specify a Docker image, description, or remote server. Returns the newly created database record.',
18
+ schema: z
19
+ .object({
20
+ name: z.string().min(1).describe('Display name for the database'),
21
+ appName: z.string().min(1).describe('Unique app-level identifier'),
22
+ databaseName: z.string().min(1).describe('Name of the database to create'),
23
+ databaseUser: z.string().min(1).describe('Database user'),
24
+ databasePassword: z.string().min(1).describe('Database password'),
25
+ projectId: z.string().min(1).describe('Project ID to create the database in'),
26
+ dockerImage: z.string().optional().describe('Docker image (default: postgres:15)'),
27
+ description: z.string().nullable().optional().describe('Optional description'),
28
+ serverId: z.string().nullable().optional().describe('Target server ID (null for local)'),
29
+ })
30
+ .strict(),
31
+ endpoint: `${DB}.create`,
32
+ });
33
+ const update = postTool({
34
+ name: `dokploy_${DB}_update`,
35
+ title: 'Update Postgres Database',
36
+ description: 'Update the configuration of an existing Postgres database in Dokploy. Supports modifying the display name, Docker image, resource limits (CPU and memory), custom start command, environment variables, and external port. Requires the Postgres database ID. Only the provided fields are updated.',
37
+ schema: z
38
+ .object({
39
+ postgresId: pgId,
40
+ name: z.string().min(1).optional().describe('Display name'),
41
+ appName: z.string().min(1).optional().describe('App-level identifier'),
42
+ description: z.string().nullable().optional().describe('Description'),
43
+ dockerImage: z.string().optional().describe('Docker image'),
44
+ memoryReservation: z.number().nullable().optional().describe('Memory reservation in MB'),
45
+ memoryLimit: z.number().nullable().optional().describe('Memory limit in MB'),
46
+ cpuReservation: z.number().nullable().optional().describe('CPU reservation'),
47
+ cpuLimit: z.number().nullable().optional().describe('CPU limit'),
48
+ command: z.string().nullable().optional().describe('Custom start command'),
49
+ env: z.string().nullable().optional().describe('Environment variables'),
50
+ externalPort: z.number().nullable().optional().describe('External port'),
51
+ })
52
+ .strict(),
53
+ endpoint: `${DB}.update`,
54
+ });
55
+ const remove = postTool({
56
+ name: `dokploy_${DB}_remove`,
57
+ title: 'Remove Postgres Database',
58
+ description: 'Permanently delete a Postgres database from Dokploy. This action removes the database container, its data, and all associated configuration. Requires the Postgres database ID. This operation is destructive and cannot be undone.',
59
+ schema: z.object({ postgresId: pgId }).strict(),
60
+ endpoint: `${DB}.remove`,
61
+ annotations: { destructiveHint: true },
62
+ });
63
+ const move = postTool({
64
+ name: `dokploy_${DB}_move`,
65
+ title: 'Move Postgres Database',
66
+ description: 'Move a Postgres database from its current project to a different project within Dokploy. Requires the Postgres database ID and the destination project ID. The database configuration and data are preserved during the move.',
67
+ schema: z
68
+ .object({
69
+ postgresId: pgId,
70
+ targetProjectId: z.string().min(1).describe('Destination project ID'),
71
+ })
72
+ .strict(),
73
+ endpoint: `${DB}.move`,
74
+ });
75
+ const deploy = postTool({
76
+ name: `dokploy_${DB}_deploy`,
77
+ title: 'Deploy Postgres Database',
78
+ description: 'Deploy a Postgres database container in Dokploy. Triggers the build and start process for the specified database. Requires the Postgres database ID. Returns the deployment status.',
79
+ schema: z.object({ postgresId: pgId }).strict(),
80
+ endpoint: `${DB}.deploy`,
81
+ });
82
+ const start = postTool({
83
+ name: `dokploy_${DB}_start`,
84
+ title: 'Start Postgres Database',
85
+ description: 'Start a previously stopped Postgres database container in Dokploy. The database must already be deployed. Requires the Postgres database ID. Returns the updated status after starting.',
86
+ schema: z.object({ postgresId: pgId }).strict(),
87
+ endpoint: `${DB}.start`,
88
+ });
89
+ const stop = postTool({
90
+ name: `dokploy_${DB}_stop`,
91
+ title: 'Stop Postgres Database',
92
+ description: 'Stop a running Postgres database container in Dokploy. The database data is preserved but the container will no longer accept connections. Requires the Postgres database ID. This is a destructive action as it interrupts active connections.',
93
+ schema: z.object({ postgresId: pgId }).strict(),
94
+ endpoint: `${DB}.stop`,
95
+ annotations: { destructiveHint: true },
96
+ });
97
+ const reload = postTool({
98
+ name: `dokploy_${DB}_reload`,
99
+ title: 'Reload Postgres Database',
100
+ description: 'Reload the Postgres database container in Dokploy without a full restart. Applies configuration changes that do not require a rebuild. Requires the Postgres database ID and the app-level identifier. Returns the reload status.',
101
+ schema: z
102
+ .object({
103
+ postgresId: pgId,
104
+ appName: z.string().min(1).describe('App-level identifier'),
105
+ })
106
+ .strict(),
107
+ endpoint: `${DB}.reload`,
108
+ });
109
+ const rebuild = postTool({
110
+ name: `dokploy_${DB}_rebuild`,
111
+ title: 'Rebuild Postgres Database',
112
+ description: 'Rebuild the Postgres database container from scratch in Dokploy. This tears down the existing container and recreates it with the current configuration. Requires the Postgres database ID. Useful after changing the Docker image or when the container is in a broken state.',
113
+ schema: z.object({ postgresId: pgId }).strict(),
114
+ endpoint: `${DB}.rebuild`,
115
+ });
116
+ const changeStatus = postTool({
117
+ name: `dokploy_${DB}_change_status`,
118
+ title: 'Change Postgres Status',
119
+ description: 'Manually set the application status of a Postgres database in Dokploy. Accepts one of: idle, running, done, or error. Requires the Postgres database ID and the new status value. Useful for correcting a stale or incorrect status.',
120
+ schema: z
121
+ .object({
122
+ postgresId: pgId,
123
+ applicationStatus: z
124
+ .enum(['idle', 'running', 'done', 'error'])
125
+ .describe('New application status'),
126
+ })
127
+ .strict(),
128
+ endpoint: `${DB}.changeStatus`,
129
+ });
130
+ const saveExternalPort = postTool({
131
+ name: `dokploy_${DB}_save_external_port`,
132
+ title: 'Save Postgres External Port',
133
+ description: 'Set or clear the external port mapping for a Postgres database in Dokploy. When set, the database is accessible from outside the Docker network on the specified port. Pass null to remove the external port. Requires the Postgres database ID.',
134
+ schema: z
135
+ .object({
136
+ postgresId: pgId,
137
+ externalPort: z.number().nullable().describe('External port number (null to remove)'),
138
+ })
139
+ .strict(),
140
+ endpoint: `${DB}.saveExternalPort`,
141
+ });
142
+ const saveEnvironment = postTool({
143
+ name: `dokploy_${DB}_save_environment`,
144
+ title: 'Save Postgres Environment',
145
+ description: 'Overwrite the environment variables for a Postgres database in Dokploy. Replaces all existing environment variables with the provided value. Pass the variables as a single string (one per line, KEY=VALUE format). Requires the Postgres database ID.',
146
+ schema: z
147
+ .object({
148
+ postgresId: pgId,
149
+ env: z.string().nullable().optional().describe('Environment variables as a string'),
150
+ })
151
+ .strict(),
152
+ endpoint: `${DB}.saveEnvironment`,
153
+ });
154
+ // ── export ───────────────────────────────────────────────────────────
155
+ export const postgresTools = [
156
+ one,
157
+ create,
158
+ update,
159
+ remove,
160
+ move,
161
+ deploy,
162
+ start,
163
+ stop,
164
+ reload,
165
+ rebuild,
166
+ changeStatus,
167
+ saveExternalPort,
168
+ saveEnvironment,
169
+ ];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const projectTools: ToolDefinition[];
@@ -0,0 +1,94 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── tools ────────────────────────────────────────────────────────────
4
+ const all = getTool({
5
+ name: 'dokploy_project_all',
6
+ title: 'List All Projects',
7
+ description: 'List all projects in the Dokploy instance. Takes no parameters and returns an array of project objects, each containing the project ID, name, description, and associated services. Useful for discovering available projects before performing operations on them.',
8
+ schema: z.object({}).strict(),
9
+ endpoint: '/project.all',
10
+ });
11
+ const one = getTool({
12
+ name: 'dokploy_project_one',
13
+ title: 'Get Project Details',
14
+ description: 'Retrieve detailed information about a single Dokploy project by its unique ID. Returns the full project object including its name, description, environment variables, and all associated services such as applications, databases, and compose stacks.',
15
+ schema: z
16
+ .object({
17
+ projectId: z.string().min(1).describe('The unique project ID'),
18
+ })
19
+ .strict(),
20
+ endpoint: '/project.one',
21
+ });
22
+ const create = postTool({
23
+ name: 'dokploy_project_create',
24
+ title: 'Create Project',
25
+ description: 'Create a new project in Dokploy. Requires a project name and optionally accepts a description. Projects serve as organizational containers for applications, databases, and other services. Returns the newly created project object with its generated ID.',
26
+ schema: z
27
+ .object({
28
+ name: z.string().min(1).describe('The name of the project'),
29
+ description: z.string().nullable().optional().describe('Optional project description'),
30
+ })
31
+ .strict(),
32
+ endpoint: '/project.create',
33
+ });
34
+ const update = postTool({
35
+ name: 'dokploy_project_update',
36
+ title: 'Update Project',
37
+ description: 'Update an existing Dokploy project. Requires the project ID and accepts optional fields to modify including name, description, and environment variables. Only the provided fields will be updated; omitted fields remain unchanged. Returns the updated project object.',
38
+ schema: z
39
+ .object({
40
+ projectId: z.string().min(1).describe('The unique project ID'),
41
+ name: z.string().optional().describe('New project name'),
42
+ description: z.string().nullable().optional().describe('New project description'),
43
+ env: z.string().nullable().optional().describe('Environment variables for the project'),
44
+ })
45
+ .strict(),
46
+ endpoint: '/project.update',
47
+ });
48
+ const duplicate = postTool({
49
+ name: 'dokploy_project_duplicate',
50
+ title: 'Duplicate Project',
51
+ description: 'Duplicate an existing Dokploy project, creating a new project with the same configuration. Requires the source environment ID and a name for the new project. Optionally include services from the original project, either all services or a selected subset specified by their IDs and types. Returns the newly created duplicate project.',
52
+ schema: z
53
+ .object({
54
+ sourceEnvironmentId: z
55
+ .string()
56
+ .min(1)
57
+ .describe('The ID of the source environment to duplicate'),
58
+ name: z.string().min(1).describe('The name for the duplicated project'),
59
+ description: z.string().optional().describe('Description for the duplicated project'),
60
+ duplicateInSameProject: z
61
+ .boolean()
62
+ .optional()
63
+ .describe('Whether to duplicate within the same project'),
64
+ includeServices: z
65
+ .boolean()
66
+ .optional()
67
+ .describe('Whether to include services in the duplicate'),
68
+ selectedServices: z
69
+ .array(z
70
+ .object({
71
+ id: z.string().min(1).describe('The service ID'),
72
+ type: z.string().min(1).describe('The service type'),
73
+ })
74
+ .strict())
75
+ .optional()
76
+ .describe('Specific services to include in the duplicate'),
77
+ })
78
+ .strict(),
79
+ endpoint: '/project.duplicate',
80
+ });
81
+ const remove = postTool({
82
+ name: 'dokploy_project_remove',
83
+ title: 'Remove Project',
84
+ description: 'Permanently remove a Dokploy project and all its associated resources including applications, databases, and compose stacks. This action is irreversible and will delete all data within the project. Requires the project ID to remove.',
85
+ schema: z
86
+ .object({
87
+ projectId: z.string().min(1).describe('The unique project ID to remove'),
88
+ })
89
+ .strict(),
90
+ endpoint: '/project.remove',
91
+ annotations: { destructiveHint: true },
92
+ });
93
+ // ── export ───────────────────────────────────────────────────────────
94
+ export const projectTools = [all, one, create, update, duplicate, remove];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const redirectsTools: ToolDefinition[];
@@ -0,0 +1,53 @@
1
+ import { z } from 'zod';
2
+ import { getTool, postTool } from './_factory.js';
3
+ // ── helpers ──────────────────────────────────────────────────────────
4
+ const redirectId = z.string().min(1).describe('Unique redirect rule ID');
5
+ // ── tools ────────────────────────────────────────────────────────────
6
+ const one = getTool({
7
+ name: 'dokploy_redirect_one',
8
+ title: 'Get Redirect Rule',
9
+ description: 'Get details of a specific redirect rule by its unique ID. Requires the redirectId parameter. Returns the full redirect configuration including regex pattern, replacement URL, and whether it is a permanent (301) or temporary (302) redirect.',
10
+ schema: z.object({ redirectId }).strict(),
11
+ endpoint: '/redirects.one',
12
+ });
13
+ const create = postTool({
14
+ name: 'dokploy_redirect_create',
15
+ title: 'Create Redirect Rule',
16
+ description: 'Create a new redirect rule for an application. Requires a regex pattern to match incoming requests, a replacement URL or path, a permanent flag indicating 301 vs 302 redirect, and the target applicationId. Returns the newly created redirect rule with its assigned ID.',
17
+ schema: z
18
+ .object({
19
+ regex: z.string().min(1).describe('Regular expression pattern to match incoming requests'),
20
+ replacement: z.string().min(1).describe('Replacement URL or path for matched requests'),
21
+ permanent: z.boolean().describe('Whether the redirect is permanent (301) or temporary (302)'),
22
+ applicationId: z.string().min(1).describe('ID of the application to add the redirect to'),
23
+ })
24
+ .strict(),
25
+ endpoint: '/redirects.create',
26
+ });
27
+ const update = postTool({
28
+ name: 'dokploy_redirect_update',
29
+ title: 'Update Redirect Rule',
30
+ description: 'Update an existing redirect rule by its ID. Requires the redirectId and accepts optional fields: regex pattern, replacement URL, and permanent flag. Only provided fields will be updated; omitted fields remain unchanged. Returns the updated redirect rule.',
31
+ schema: z
32
+ .object({
33
+ redirectId,
34
+ regex: z.string().optional().describe('New regular expression pattern'),
35
+ replacement: z.string().optional().describe('New replacement URL or path'),
36
+ permanent: z
37
+ .boolean()
38
+ .optional()
39
+ .describe('Whether the redirect is permanent (301) or temporary (302)'),
40
+ })
41
+ .strict(),
42
+ endpoint: '/redirects.update',
43
+ });
44
+ const deleteTool = postTool({
45
+ name: 'dokploy_redirect_delete',
46
+ title: 'Delete Redirect Rule',
47
+ description: 'Delete a redirect rule permanently by its ID. This action is irreversible and the redirect will stop being applied immediately. Requires the redirectId parameter. Returns a confirmation of the deletion.',
48
+ schema: z.object({ redirectId }).strict(),
49
+ endpoint: '/redirects.delete',
50
+ annotations: { destructiveHint: true },
51
+ });
52
+ // ── export ───────────────────────────────────────────────────────────
53
+ export const redirectsTools = [one, create, update, deleteTool];
@@ -0,0 +1,2 @@
1
+ import { type ToolDefinition } from './_factory.js';
2
+ export declare const redisTools: ToolDefinition[];