@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
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const paginationLimit = z.number().min(1).max(100).optional().describe('Maximum number of results');
|
|
4
|
+
const paginationOffset = z.number().min(0).optional().describe('Number of results to skip');
|
|
5
|
+
const create = postTool({
|
|
6
|
+
name: 'dokploy_environment_create',
|
|
7
|
+
title: 'Create Environment',
|
|
8
|
+
description: 'Create a new environment inside a Dokploy project. Requires the project ID and environment name. Optionally set a description. Returns the created environment object.',
|
|
9
|
+
schema: z
|
|
10
|
+
.object({
|
|
11
|
+
name: z.string().min(1).describe('The environment name'),
|
|
12
|
+
description: z.string().optional().describe('Environment description'),
|
|
13
|
+
projectId: z.string().min(1).describe('The project ID'),
|
|
14
|
+
})
|
|
15
|
+
.strict(),
|
|
16
|
+
endpoint: '/environment.create',
|
|
17
|
+
});
|
|
18
|
+
const one = getTool({
|
|
19
|
+
name: 'dokploy_environment_one',
|
|
20
|
+
title: 'Get Environment',
|
|
21
|
+
description: 'Retrieve detailed information about a Dokploy environment by its ID. Returns the environment, services, and related project metadata.',
|
|
22
|
+
schema: z
|
|
23
|
+
.object({
|
|
24
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
25
|
+
})
|
|
26
|
+
.strict(),
|
|
27
|
+
endpoint: '/environment.one',
|
|
28
|
+
});
|
|
29
|
+
const byProjectId = getTool({
|
|
30
|
+
name: 'dokploy_environment_by_project_id',
|
|
31
|
+
title: 'List Environments by Project',
|
|
32
|
+
description: 'List all environments belonging to a Dokploy project. Requires the project ID. Returns the environments configured for that project.',
|
|
33
|
+
schema: z
|
|
34
|
+
.object({
|
|
35
|
+
projectId: z.string().min(1).describe('The project ID'),
|
|
36
|
+
})
|
|
37
|
+
.strict(),
|
|
38
|
+
endpoint: '/environment.byProjectId',
|
|
39
|
+
});
|
|
40
|
+
const remove = postTool({
|
|
41
|
+
name: 'dokploy_environment_remove',
|
|
42
|
+
title: 'Remove Environment',
|
|
43
|
+
description: 'Permanently remove a Dokploy environment. This action is destructive and may remove all services that belong to the environment. Requires the environment ID.',
|
|
44
|
+
schema: z
|
|
45
|
+
.object({
|
|
46
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
47
|
+
})
|
|
48
|
+
.strict(),
|
|
49
|
+
endpoint: '/environment.remove',
|
|
50
|
+
annotations: { destructiveHint: true },
|
|
51
|
+
});
|
|
52
|
+
const update = postTool({
|
|
53
|
+
name: 'dokploy_environment_update',
|
|
54
|
+
title: 'Update Environment',
|
|
55
|
+
description: 'Update an existing Dokploy environment. Requires the environment ID and accepts optional changes to the environment name, description, project assignment, and environment variables.',
|
|
56
|
+
schema: z
|
|
57
|
+
.object({
|
|
58
|
+
environmentId: z.string().min(1).describe('The environment ID'),
|
|
59
|
+
name: z.string().min(1).optional().describe('Environment name'),
|
|
60
|
+
description: z.string().optional().describe('Environment description'),
|
|
61
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
62
|
+
env: z.string().optional().describe('Environment variables'),
|
|
63
|
+
})
|
|
64
|
+
.strict(),
|
|
65
|
+
endpoint: '/environment.update',
|
|
66
|
+
});
|
|
67
|
+
const duplicate = postTool({
|
|
68
|
+
name: 'dokploy_environment_duplicate',
|
|
69
|
+
title: 'Duplicate Environment',
|
|
70
|
+
description: 'Duplicate an existing Dokploy environment. Requires the source environment ID and a name for the new environment. Optionally set a description.',
|
|
71
|
+
schema: z
|
|
72
|
+
.object({
|
|
73
|
+
environmentId: z.string().min(1).describe('The source environment ID'),
|
|
74
|
+
name: z.string().min(1).describe('The new environment name'),
|
|
75
|
+
description: z.string().optional().describe('New environment description'),
|
|
76
|
+
})
|
|
77
|
+
.strict(),
|
|
78
|
+
endpoint: '/environment.duplicate',
|
|
79
|
+
});
|
|
80
|
+
const search = getTool({
|
|
81
|
+
name: 'dokploy_environment_search',
|
|
82
|
+
title: 'Search Environments',
|
|
83
|
+
description: 'Search Dokploy environments by free text or field-specific filters. Supports pagination through limit and offset.',
|
|
84
|
+
schema: z
|
|
85
|
+
.object({
|
|
86
|
+
q: z.string().optional().describe('Free-text query'),
|
|
87
|
+
name: z.string().optional().describe('Environment name'),
|
|
88
|
+
description: z.string().optional().describe('Environment description'),
|
|
89
|
+
projectId: z.string().optional().describe('Project ID'),
|
|
90
|
+
limit: paginationLimit,
|
|
91
|
+
offset: paginationOffset,
|
|
92
|
+
})
|
|
93
|
+
.strict(),
|
|
94
|
+
endpoint: '/environment.search',
|
|
95
|
+
});
|
|
96
|
+
export const environmentTools = [
|
|
97
|
+
create,
|
|
98
|
+
one,
|
|
99
|
+
byProjectId,
|
|
100
|
+
remove,
|
|
101
|
+
update,
|
|
102
|
+
duplicate,
|
|
103
|
+
search,
|
|
104
|
+
];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const getAll = getTool({
|
|
4
|
+
name: 'dokploy_git_provider_get_all',
|
|
5
|
+
title: 'List Git Providers',
|
|
6
|
+
description: 'List all Git provider integrations available in Dokploy, including provider metadata and linked platform records.',
|
|
7
|
+
schema: z.object({}).strict(),
|
|
8
|
+
endpoint: '/gitProvider.getAll',
|
|
9
|
+
});
|
|
10
|
+
const remove = postTool({
|
|
11
|
+
name: 'dokploy_git_provider_remove',
|
|
12
|
+
title: 'Remove Git Provider',
|
|
13
|
+
description: 'Remove a Git provider integration from Dokploy. Requires the Git provider ID. This is a destructive action.',
|
|
14
|
+
schema: z
|
|
15
|
+
.object({
|
|
16
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
17
|
+
})
|
|
18
|
+
.strict(),
|
|
19
|
+
endpoint: '/gitProvider.remove',
|
|
20
|
+
annotations: { destructiveHint: true },
|
|
21
|
+
});
|
|
22
|
+
export const gitProviderTools = [getAll, remove];
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const githubIdSchema = z.string().min(1).describe('GitHub provider ID');
|
|
4
|
+
const one = getTool({
|
|
5
|
+
name: 'dokploy_github_one',
|
|
6
|
+
title: 'Get GitHub Provider',
|
|
7
|
+
description: 'Retrieve a GitHub provider integration by its ID.',
|
|
8
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
9
|
+
endpoint: '/github.one',
|
|
10
|
+
});
|
|
11
|
+
const getGithubRepositories = getTool({
|
|
12
|
+
name: 'dokploy_github_get_github_repositories',
|
|
13
|
+
title: 'List GitHub Repositories',
|
|
14
|
+
description: 'List GitHub repositories available through a Dokploy GitHub provider integration. Requires the GitHub provider ID.',
|
|
15
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
16
|
+
endpoint: '/github.getGithubRepositories',
|
|
17
|
+
});
|
|
18
|
+
const getGithubBranches = getTool({
|
|
19
|
+
name: 'dokploy_github_get_github_branches',
|
|
20
|
+
title: 'List GitHub Branches',
|
|
21
|
+
description: 'List branches for a GitHub repository through Dokploy. Requires the repository name and owner. Optionally pass the GitHub provider ID.',
|
|
22
|
+
schema: z
|
|
23
|
+
.object({
|
|
24
|
+
repo: z.string().min(1).describe('Repository name'),
|
|
25
|
+
owner: z.string().min(1).describe('Repository owner'),
|
|
26
|
+
githubId: z.string().optional().describe('GitHub provider ID'),
|
|
27
|
+
})
|
|
28
|
+
.strict(),
|
|
29
|
+
endpoint: '/github.getGithubBranches',
|
|
30
|
+
});
|
|
31
|
+
const githubProviders = getTool({
|
|
32
|
+
name: 'dokploy_github_github_providers',
|
|
33
|
+
title: 'List GitHub Providers',
|
|
34
|
+
description: 'List GitHub provider integrations configured in Dokploy.',
|
|
35
|
+
schema: z.object({}).strict(),
|
|
36
|
+
endpoint: '/github.githubProviders',
|
|
37
|
+
});
|
|
38
|
+
const testConnection = postTool({
|
|
39
|
+
name: 'dokploy_github_test_connection',
|
|
40
|
+
title: 'Test GitHub Connection',
|
|
41
|
+
description: 'Test a Dokploy GitHub provider connection by its ID.',
|
|
42
|
+
schema: z.object({ githubId: githubIdSchema }).strict(),
|
|
43
|
+
endpoint: '/github.testConnection',
|
|
44
|
+
});
|
|
45
|
+
const update = postTool({
|
|
46
|
+
name: 'dokploy_github_update',
|
|
47
|
+
title: 'Update GitHub Provider',
|
|
48
|
+
description: 'Update a Dokploy GitHub provider integration. Requires the provider ID, display name, linked Git provider ID, and GitHub App name.',
|
|
49
|
+
schema: z
|
|
50
|
+
.object({
|
|
51
|
+
githubId: githubIdSchema,
|
|
52
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
53
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
54
|
+
githubAppName: z.string().min(1).describe('GitHub App name'),
|
|
55
|
+
})
|
|
56
|
+
.strict(),
|
|
57
|
+
endpoint: '/github.update',
|
|
58
|
+
});
|
|
59
|
+
export const githubTools = [
|
|
60
|
+
one,
|
|
61
|
+
getGithubRepositories,
|
|
62
|
+
getGithubBranches,
|
|
63
|
+
githubProviders,
|
|
64
|
+
testConnection,
|
|
65
|
+
update,
|
|
66
|
+
];
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getTool, postTool } from './_factory.js';
|
|
3
|
+
const nullableString = z.string().nullable().optional();
|
|
4
|
+
const gitlabIdSchema = z.string().min(1).describe('GitLab provider ID');
|
|
5
|
+
const create = postTool({
|
|
6
|
+
name: 'dokploy_gitlab_create',
|
|
7
|
+
title: 'Create GitLab Provider',
|
|
8
|
+
description: 'Create a new GitLab provider integration in Dokploy. Requires the auth ID, name, and GitLab URL. Additional OAuth and provider fields may also be supplied.',
|
|
9
|
+
schema: z
|
|
10
|
+
.object({
|
|
11
|
+
applicationId: z.string().optional().describe('Application ID'),
|
|
12
|
+
secret: z.string().optional().describe('OAuth client secret'),
|
|
13
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
14
|
+
gitProviderId: z.string().optional().describe('Git provider ID'),
|
|
15
|
+
redirectUri: z.string().optional().describe('OAuth redirect URI'),
|
|
16
|
+
authId: z.string().min(1).describe('Auth ID'),
|
|
17
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
18
|
+
gitlabUrl: z.string().min(1).describe('GitLab URL'),
|
|
19
|
+
gitlabInternalUrl: nullableString.describe('Internal GitLab URL'),
|
|
20
|
+
})
|
|
21
|
+
.strict(),
|
|
22
|
+
endpoint: '/gitlab.create',
|
|
23
|
+
});
|
|
24
|
+
const one = getTool({
|
|
25
|
+
name: 'dokploy_gitlab_one',
|
|
26
|
+
title: 'Get GitLab Provider',
|
|
27
|
+
description: 'Retrieve a GitLab provider integration by its ID.',
|
|
28
|
+
schema: z.object({ gitlabId: gitlabIdSchema }).strict(),
|
|
29
|
+
endpoint: '/gitlab.one',
|
|
30
|
+
});
|
|
31
|
+
const getGitlabRepositories = getTool({
|
|
32
|
+
name: 'dokploy_gitlab_get_gitlab_repositories',
|
|
33
|
+
title: 'List GitLab Repositories',
|
|
34
|
+
description: 'List repositories available through a Dokploy GitLab provider integration. Requires the GitLab provider ID.',
|
|
35
|
+
schema: z.object({ gitlabId: gitlabIdSchema }).strict(),
|
|
36
|
+
endpoint: '/gitlab.getGitlabRepositories',
|
|
37
|
+
});
|
|
38
|
+
const getGitlabBranches = getTool({
|
|
39
|
+
name: 'dokploy_gitlab_get_gitlab_branches',
|
|
40
|
+
title: 'List GitLab Branches',
|
|
41
|
+
description: 'List branches for a GitLab repository through Dokploy. Requires the owner and repository. Optionally pass the project numeric ID and GitLab provider ID.',
|
|
42
|
+
schema: z
|
|
43
|
+
.object({
|
|
44
|
+
id: z.number().optional().describe('GitLab project numeric ID'),
|
|
45
|
+
owner: z.string().describe('Repository owner'),
|
|
46
|
+
repo: z.string().describe('Repository name'),
|
|
47
|
+
gitlabId: z.string().optional().describe('GitLab provider ID'),
|
|
48
|
+
})
|
|
49
|
+
.strict(),
|
|
50
|
+
endpoint: '/gitlab.getGitlabBranches',
|
|
51
|
+
});
|
|
52
|
+
const gitlabProviders = getTool({
|
|
53
|
+
name: 'dokploy_gitlab_gitlab_providers',
|
|
54
|
+
title: 'List GitLab Providers',
|
|
55
|
+
description: 'List GitLab provider integrations configured in Dokploy.',
|
|
56
|
+
schema: z.object({}).strict(),
|
|
57
|
+
endpoint: '/gitlab.gitlabProviders',
|
|
58
|
+
});
|
|
59
|
+
const testConnection = postTool({
|
|
60
|
+
name: 'dokploy_gitlab_test_connection',
|
|
61
|
+
title: 'Test GitLab Connection',
|
|
62
|
+
description: 'Test a Dokploy GitLab provider integration. Requires the GitLab provider ID and optionally accepts the group name.',
|
|
63
|
+
schema: z
|
|
64
|
+
.object({
|
|
65
|
+
gitlabId: gitlabIdSchema,
|
|
66
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
67
|
+
})
|
|
68
|
+
.strict(),
|
|
69
|
+
endpoint: '/gitlab.testConnection',
|
|
70
|
+
});
|
|
71
|
+
const update = postTool({
|
|
72
|
+
name: 'dokploy_gitlab_update',
|
|
73
|
+
title: 'Update GitLab Provider',
|
|
74
|
+
description: 'Update a Dokploy GitLab provider integration. Requires the GitLab provider ID, display name, GitLab URL, and linked Git provider ID. Optional OAuth and group fields may also be supplied.',
|
|
75
|
+
schema: z
|
|
76
|
+
.object({
|
|
77
|
+
applicationId: z.string().optional().describe('Application ID'),
|
|
78
|
+
secret: z.string().optional().describe('OAuth client secret'),
|
|
79
|
+
groupName: z.string().optional().describe('GitLab group name'),
|
|
80
|
+
redirectUri: z.string().optional().describe('OAuth redirect URI'),
|
|
81
|
+
name: z.string().min(1).describe('Provider display name'),
|
|
82
|
+
gitlabId: gitlabIdSchema,
|
|
83
|
+
gitlabUrl: z.string().min(1).describe('GitLab URL'),
|
|
84
|
+
gitProviderId: z.string().min(1).describe('Git provider ID'),
|
|
85
|
+
gitlabInternalUrl: nullableString.describe('Internal GitLab URL'),
|
|
86
|
+
})
|
|
87
|
+
.strict(),
|
|
88
|
+
endpoint: '/gitlab.update',
|
|
89
|
+
});
|
|
90
|
+
export const gitlabTools = [
|
|
91
|
+
create,
|
|
92
|
+
one,
|
|
93
|
+
getGitlabRepositories,
|
|
94
|
+
getGitlabBranches,
|
|
95
|
+
gitlabProviders,
|
|
96
|
+
testConnection,
|
|
97
|
+
update,
|
|
98
|
+
];
|
package/dist/tools/index.js
CHANGED
|
@@ -8,29 +8,48 @@ import { deploymentTools } from './deployment.js';
|
|
|
8
8
|
import { destinationTools } from './destination.js';
|
|
9
9
|
import { dockerTools } from './docker.js';
|
|
10
10
|
import { domainTools } from './domain.js';
|
|
11
|
+
import { environmentTools } from './environment.js';
|
|
12
|
+
import { gitProviderTools } from './git-provider.js';
|
|
13
|
+
import { githubTools } from './github.js';
|
|
14
|
+
import { gitlabTools } from './gitlab.js';
|
|
11
15
|
import { mariadbTools } from './mariadb.js';
|
|
12
16
|
import { mongoTools } from './mongo.js';
|
|
13
17
|
import { mountsTools } from './mounts.js';
|
|
14
18
|
import { mysqlTools } from './mysql.js';
|
|
19
|
+
import { notificationTools } from './notification.js';
|
|
20
|
+
import { patchTools } from './patch.js';
|
|
15
21
|
import { portTools } from './port.js';
|
|
16
22
|
import { postgresTools } from './postgres.js';
|
|
23
|
+
import { previewDeploymentTools } from './preview-deployment.js';
|
|
17
24
|
import { projectTools } from './project.js';
|
|
18
25
|
import { redirectsTools } from './redirects.js';
|
|
19
26
|
import { redisTools } from './redis.js';
|
|
20
27
|
import { registryTools } from './registry.js';
|
|
28
|
+
import { rollbackTools } from './rollback.js';
|
|
29
|
+
import { scheduleTools } from './schedule.js';
|
|
21
30
|
import { securityTools } from './security.js';
|
|
31
|
+
import { serverTools } from './server.js';
|
|
22
32
|
import { settingsTools } from './settings.js';
|
|
33
|
+
import { sshKeyTools } from './ssh-key.js';
|
|
23
34
|
import { userTools } from './user.js';
|
|
35
|
+
import { volumeBackupsTools } from './volume-backups.js';
|
|
24
36
|
export const allTools = [
|
|
25
37
|
...projectTools,
|
|
38
|
+
...environmentTools,
|
|
26
39
|
...applicationTools,
|
|
27
40
|
...composeTools,
|
|
28
41
|
...domainTools,
|
|
42
|
+
...patchTools,
|
|
29
43
|
...postgresTools,
|
|
44
|
+
...previewDeploymentTools,
|
|
30
45
|
...mysqlTools,
|
|
31
46
|
...mariadbTools,
|
|
32
47
|
...mongoTools,
|
|
33
48
|
...redisTools,
|
|
49
|
+
...notificationTools,
|
|
50
|
+
...rollbackTools,
|
|
51
|
+
...scheduleTools,
|
|
52
|
+
...volumeBackupsTools,
|
|
34
53
|
...deploymentTools,
|
|
35
54
|
...dockerTools,
|
|
36
55
|
...certificatesTools,
|
|
@@ -45,4 +64,9 @@ export const allTools = [
|
|
|
45
64
|
...settingsTools,
|
|
46
65
|
...adminTools,
|
|
47
66
|
...userTools,
|
|
67
|
+
...serverTools,
|
|
68
|
+
...sshKeyTools,
|
|
69
|
+
...gitProviderTools,
|
|
70
|
+
...githubTools,
|
|
71
|
+
...gitlabTools,
|
|
48
72
|
];
|
package/dist/tools/mariadb.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const mariadbTools: ToolDefinition[];
|
|
1
|
+
export declare const mariadbTools: import("./_factory.js").ToolDefinition[];
|
package/dist/tools/mariadb.js
CHANGED
|
@@ -1,170 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
title: 'Get MariaDB Details',
|
|
10
|
-
description: 'Retrieve the full configuration and status details of a MariaDB database managed by Dokploy. Requires the unique MariaDB database ID. Returns all metadata including name, image, resource limits, environment variables, and current application status.',
|
|
11
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
12
|
-
endpoint: `${DB}.one`,
|
|
13
|
-
});
|
|
14
|
-
const create = postTool({
|
|
15
|
-
name: `dokploy_${DB}_create`,
|
|
16
|
-
title: 'Create MariaDB Database',
|
|
17
|
-
description: 'Create a new MariaDB 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'),
|
|
2
|
+
import { createDatabaseTools } from './_database.js';
|
|
3
|
+
export const mariadbTools = createDatabaseTools({
|
|
4
|
+
type: 'mariadb',
|
|
5
|
+
idField: 'mariadbId',
|
|
6
|
+
displayName: 'MariaDB',
|
|
7
|
+
defaultImage: 'mariadb:11',
|
|
8
|
+
createFields: z.object({
|
|
22
9
|
databaseName: z.string().min(1).describe('Name of the database to create'),
|
|
23
10
|
databaseUser: z.string().min(1).describe('Database user'),
|
|
24
11
|
databasePassword: z.string().min(1).describe('Database password'),
|
|
25
|
-
databaseRootPassword: z.string().min(1).describe('Root password for MariaDB'),
|
|
26
|
-
|
|
27
|
-
dockerImage: z.string().optional().describe('Docker image (default: mariadb:11)'),
|
|
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 MariaDB Database',
|
|
37
|
-
description: 'Update the configuration of an existing MariaDB database in Dokploy. Requires the MariaDB database ID and accepts optional fields such as name, Docker image, resource limits (memory and CPU), custom start command, environment variables, and external port. Returns the updated database configuration.',
|
|
38
|
-
schema: z
|
|
39
|
-
.object({
|
|
40
|
-
mariadbId: mdbId,
|
|
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 MariaDB Database',
|
|
59
|
-
description: 'Permanently delete a MariaDB database from Dokploy. Requires the MariaDB database ID. This is a destructive operation that removes the container, all associated data, and configuration. Returns the operation status confirming deletion.',
|
|
60
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
61
|
-
endpoint: `${DB}.remove`,
|
|
62
|
-
annotations: { destructiveHint: true },
|
|
63
|
-
});
|
|
64
|
-
const move = postTool({
|
|
65
|
-
name: `dokploy_${DB}_move`,
|
|
66
|
-
title: 'Move MariaDB Database',
|
|
67
|
-
description: 'Move a MariaDB database from its current project to a different project within Dokploy. Requires the MariaDB database ID and the destination project ID. The database configuration and data remain intact during the move. Returns the operation status.',
|
|
68
|
-
schema: z
|
|
69
|
-
.object({
|
|
70
|
-
mariadbId: mdbId,
|
|
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 MariaDB Database',
|
|
79
|
-
description: 'Deploy a MariaDB database in Dokploy, pulling the configured Docker image and starting the container. Requires the MariaDB database ID. This triggers a full deployment lifecycle including image pull, container creation, and startup. Returns the deployment operation status.',
|
|
80
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
81
|
-
endpoint: `${DB}.deploy`,
|
|
82
|
-
});
|
|
83
|
-
const start = postTool({
|
|
84
|
-
name: `dokploy_${DB}_start`,
|
|
85
|
-
title: 'Start MariaDB Database',
|
|
86
|
-
description: 'Start a previously stopped MariaDB database container in Dokploy. Requires the MariaDB database ID. The container will resume with its existing data and configuration. Returns the operation status.',
|
|
87
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
88
|
-
endpoint: `${DB}.start`,
|
|
89
|
-
});
|
|
90
|
-
const stop = postTool({
|
|
91
|
-
name: `dokploy_${DB}_stop`,
|
|
92
|
-
title: 'Stop MariaDB Database',
|
|
93
|
-
description: 'Stop a currently running MariaDB database container in Dokploy. Requires the MariaDB database ID. The container will be gracefully stopped but its data and configuration are preserved for future restarts. Returns the operation status.',
|
|
94
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
95
|
-
endpoint: `${DB}.stop`,
|
|
96
|
-
annotations: { destructiveHint: true },
|
|
97
|
-
});
|
|
98
|
-
const reload = postTool({
|
|
99
|
-
name: `dokploy_${DB}_reload`,
|
|
100
|
-
title: 'Reload MariaDB Database',
|
|
101
|
-
description: 'Reload the MariaDB database container in Dokploy without performing a full rebuild. Requires the MariaDB database ID and the app-level identifier. This restarts the container with its current configuration. Returns the operation status.',
|
|
102
|
-
schema: z
|
|
103
|
-
.object({
|
|
104
|
-
mariadbId: mdbId,
|
|
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 MariaDB Database',
|
|
113
|
-
description: 'Rebuild the MariaDB database container from scratch in Dokploy. Requires the MariaDB database ID. This tears down the existing container and recreates it using the current configuration, which is useful when the container state has become inconsistent. Returns the operation status.',
|
|
114
|
-
schema: z.object({ mariadbId: mdbId }).strict(),
|
|
115
|
-
endpoint: `${DB}.rebuild`,
|
|
116
|
-
});
|
|
117
|
-
const changeStatus = postTool({
|
|
118
|
-
name: `dokploy_${DB}_change_status`,
|
|
119
|
-
title: 'Change MariaDB Status',
|
|
120
|
-
description: 'Manually set the application status of a MariaDB database in Dokploy. Requires the MariaDB database ID and the desired status (idle, running, done, or error). This is typically used for administrative overrides when the reported status does not match reality. Returns the updated status.',
|
|
121
|
-
schema: z
|
|
122
|
-
.object({
|
|
123
|
-
mariadbId: mdbId,
|
|
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 MariaDB External Port',
|
|
134
|
-
description: 'Set or clear the external port mapping for a MariaDB database in Dokploy. Requires the MariaDB database ID and the desired external port number, or null to remove the external port mapping. This controls whether the database is accessible from outside the Docker network. Returns the operation status.',
|
|
135
|
-
schema: z
|
|
136
|
-
.object({
|
|
137
|
-
mariadbId: mdbId,
|
|
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 MariaDB Environment',
|
|
146
|
-
description: 'Overwrite the environment variables for a MariaDB database in Dokploy. Requires the MariaDB database ID and the environment variables as a string. This replaces all existing environment variables with the provided values. Returns the operation status.',
|
|
147
|
-
schema: z
|
|
148
|
-
.object({
|
|
149
|
-
mariadbId: mdbId,
|
|
150
|
-
env: z.string().nullable().optional().describe('Environment variables as a string'),
|
|
151
|
-
})
|
|
152
|
-
.strict(),
|
|
153
|
-
endpoint: `${DB}.saveEnvironment`,
|
|
12
|
+
databaseRootPassword: z.string().min(1).optional().describe('Root password for MariaDB'),
|
|
13
|
+
}),
|
|
154
14
|
});
|
|
155
|
-
// ── export ───────────────────────────────────────────────────────────
|
|
156
|
-
export const mariadbTools = [
|
|
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
|
-
];
|
package/dist/tools/mongo.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const mongoTools: ToolDefinition[];
|
|
1
|
+
export declare const mongoTools: import("./_factory.js").ToolDefinition[];
|