@yawlabs/tailscale-mcp 0.1.6 → 0.2.1
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 +104 -14
- package/dist/api.js +2 -2
- package/dist/api.js.map +1 -1
- package/dist/index.js +59 -8
- package/dist/index.js.map +1 -1
- package/dist/tools/acl.d.ts +28 -0
- package/dist/tools/acl.js +33 -4
- package/dist/tools/acl.js.map +1 -1
- package/dist/tools/audit.d.ts +14 -0
- package/dist/tools/audit.js +19 -15
- package/dist/tools/audit.js.map +1 -1
- package/dist/tools/devices.d.ts +91 -0
- package/dist/tools/devices.js +102 -4
- package/dist/tools/devices.js.map +1 -1
- package/dist/tools/dns.d.ts +56 -0
- package/dist/tools/dns.js +57 -1
- package/dist/tools/dns.js.map +1 -1
- package/dist/tools/invites.d.ts +56 -0
- package/dist/tools/invites.js +59 -9
- package/dist/tools/invites.js.map +1 -1
- package/dist/tools/keys.d.ts +28 -0
- package/dist/tools/keys.js +29 -1
- package/dist/tools/keys.js.map +1 -1
- package/dist/tools/log-streaming.d.ts +90 -0
- package/dist/tools/log-streaming.js +89 -0
- package/dist/tools/log-streaming.js.map +1 -0
- package/dist/tools/network-lock.d.ts +7 -0
- package/dist/tools/network-lock.js +7 -0
- package/dist/tools/network-lock.js.map +1 -1
- package/dist/tools/oauth-clients.d.ts +118 -0
- package/dist/tools/oauth-clients.js +102 -0
- package/dist/tools/oauth-clients.js.map +1 -0
- package/dist/tools/posture.d.ts +35 -0
- package/dist/tools/posture.js +36 -1
- package/dist/tools/posture.js.map +1 -1
- package/dist/tools/services.d.ts +124 -0
- package/dist/tools/services.js +106 -0
- package/dist/tools/services.js.map +1 -0
- package/dist/tools/status.d.ts +7 -0
- package/dist/tools/status.js +7 -0
- package/dist/tools/status.js.map +1 -1
- package/dist/tools/tailnet.d.ts +28 -0
- package/dist/tools/tailnet.js +28 -0
- package/dist/tools/tailnet.js.map +1 -1
- package/dist/tools/users.d.ts +42 -0
- package/dist/tools/users.js +45 -2
- package/dist/tools/users.js.map +1 -1
- package/dist/tools/webhooks.d.ts +42 -0
- package/dist/tools/webhooks.js +43 -1
- package/dist/tools/webhooks.js.map +1 -1
- package/dist/tools/workload-identity.d.ts +118 -0
- package/dist/tools/workload-identity.js +105 -0
- package/dist/tools/workload-identity.js.map +1 -0
- package/package.json +6 -2
package/dist/tools/devices.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const deviceTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_list_devices";
|
|
4
4
|
readonly description: "List all devices in your tailnet with their status, IP addresses, OS, and last seen time.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List devices";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
5
12
|
readonly inputSchema: z.ZodObject<{
|
|
6
13
|
fields: z.ZodOptional<z.ZodString>;
|
|
7
14
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -15,6 +22,13 @@ export declare const deviceTools: readonly [{
|
|
|
15
22
|
}, {
|
|
16
23
|
readonly name: "tailscale_get_device";
|
|
17
24
|
readonly description: "Get detailed information about a specific device by its ID.";
|
|
25
|
+
readonly annotations: {
|
|
26
|
+
readonly title: "Get device";
|
|
27
|
+
readonly readOnlyHint: true;
|
|
28
|
+
readonly destructiveHint: false;
|
|
29
|
+
readonly idempotentHint: true;
|
|
30
|
+
readonly openWorldHint: true;
|
|
31
|
+
};
|
|
18
32
|
readonly inputSchema: z.ZodObject<{
|
|
19
33
|
deviceId: z.ZodString;
|
|
20
34
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -28,6 +42,13 @@ export declare const deviceTools: readonly [{
|
|
|
28
42
|
}, {
|
|
29
43
|
readonly name: "tailscale_authorize_device";
|
|
30
44
|
readonly description: "Authorize a device that is pending authorization.";
|
|
45
|
+
readonly annotations: {
|
|
46
|
+
readonly title: "Authorize device";
|
|
47
|
+
readonly readOnlyHint: false;
|
|
48
|
+
readonly destructiveHint: false;
|
|
49
|
+
readonly idempotentHint: true;
|
|
50
|
+
readonly openWorldHint: true;
|
|
51
|
+
};
|
|
31
52
|
readonly inputSchema: z.ZodObject<{
|
|
32
53
|
deviceId: z.ZodString;
|
|
33
54
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -41,6 +62,13 @@ export declare const deviceTools: readonly [{
|
|
|
41
62
|
}, {
|
|
42
63
|
readonly name: "tailscale_deauthorize_device";
|
|
43
64
|
readonly description: "Deauthorize a device, immediately removing its access to the tailnet. The device will need to be re-authorized to reconnect.";
|
|
65
|
+
readonly annotations: {
|
|
66
|
+
readonly title: "Deauthorize device";
|
|
67
|
+
readonly readOnlyHint: false;
|
|
68
|
+
readonly destructiveHint: true;
|
|
69
|
+
readonly idempotentHint: true;
|
|
70
|
+
readonly openWorldHint: true;
|
|
71
|
+
};
|
|
44
72
|
readonly inputSchema: z.ZodObject<{
|
|
45
73
|
deviceId: z.ZodString;
|
|
46
74
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -54,6 +82,13 @@ export declare const deviceTools: readonly [{
|
|
|
54
82
|
}, {
|
|
55
83
|
readonly name: "tailscale_delete_device";
|
|
56
84
|
readonly description: "Permanently remove a device from the tailnet. This is irreversible — the device must re-authenticate to rejoin.";
|
|
85
|
+
readonly annotations: {
|
|
86
|
+
readonly title: "Delete device";
|
|
87
|
+
readonly readOnlyHint: false;
|
|
88
|
+
readonly destructiveHint: true;
|
|
89
|
+
readonly idempotentHint: false;
|
|
90
|
+
readonly openWorldHint: true;
|
|
91
|
+
};
|
|
57
92
|
readonly inputSchema: z.ZodObject<{
|
|
58
93
|
deviceId: z.ZodString;
|
|
59
94
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -67,6 +102,13 @@ export declare const deviceTools: readonly [{
|
|
|
67
102
|
}, {
|
|
68
103
|
readonly name: "tailscale_rename_device";
|
|
69
104
|
readonly description: "Set the name of a device in the tailnet.";
|
|
105
|
+
readonly annotations: {
|
|
106
|
+
readonly title: "Rename device";
|
|
107
|
+
readonly readOnlyHint: false;
|
|
108
|
+
readonly destructiveHint: false;
|
|
109
|
+
readonly idempotentHint: true;
|
|
110
|
+
readonly openWorldHint: true;
|
|
111
|
+
};
|
|
70
112
|
readonly inputSchema: z.ZodObject<{
|
|
71
113
|
deviceId: z.ZodString;
|
|
72
114
|
name: z.ZodString;
|
|
@@ -84,6 +126,13 @@ export declare const deviceTools: readonly [{
|
|
|
84
126
|
}, {
|
|
85
127
|
readonly name: "tailscale_expire_device";
|
|
86
128
|
readonly description: "Expire a device's key, forcing it to re-authenticate.";
|
|
129
|
+
readonly annotations: {
|
|
130
|
+
readonly title: "Expire device key";
|
|
131
|
+
readonly readOnlyHint: false;
|
|
132
|
+
readonly destructiveHint: true;
|
|
133
|
+
readonly idempotentHint: true;
|
|
134
|
+
readonly openWorldHint: true;
|
|
135
|
+
};
|
|
87
136
|
readonly inputSchema: z.ZodObject<{
|
|
88
137
|
deviceId: z.ZodString;
|
|
89
138
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -97,6 +146,13 @@ export declare const deviceTools: readonly [{
|
|
|
97
146
|
}, {
|
|
98
147
|
readonly name: "tailscale_get_device_routes";
|
|
99
148
|
readonly description: "Get the subnet routes a device advertises and which are enabled.";
|
|
149
|
+
readonly annotations: {
|
|
150
|
+
readonly title: "Get device routes";
|
|
151
|
+
readonly readOnlyHint: true;
|
|
152
|
+
readonly destructiveHint: false;
|
|
153
|
+
readonly idempotentHint: true;
|
|
154
|
+
readonly openWorldHint: true;
|
|
155
|
+
};
|
|
100
156
|
readonly inputSchema: z.ZodObject<{
|
|
101
157
|
deviceId: z.ZodString;
|
|
102
158
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -110,6 +166,13 @@ export declare const deviceTools: readonly [{
|
|
|
110
166
|
}, {
|
|
111
167
|
readonly name: "tailscale_set_device_routes";
|
|
112
168
|
readonly description: "Set the enabled subnet routes for a device. Replaces all currently enabled routes — pass the full list of routes you want enabled.";
|
|
169
|
+
readonly annotations: {
|
|
170
|
+
readonly title: "Set device routes";
|
|
171
|
+
readonly readOnlyHint: false;
|
|
172
|
+
readonly destructiveHint: false;
|
|
173
|
+
readonly idempotentHint: true;
|
|
174
|
+
readonly openWorldHint: true;
|
|
175
|
+
};
|
|
113
176
|
readonly inputSchema: z.ZodObject<{
|
|
114
177
|
deviceId: z.ZodString;
|
|
115
178
|
routes: z.ZodArray<z.ZodString, "many">;
|
|
@@ -127,6 +190,13 @@ export declare const deviceTools: readonly [{
|
|
|
127
190
|
}, {
|
|
128
191
|
readonly name: "tailscale_get_device_posture_attributes";
|
|
129
192
|
readonly description: "Get all posture attributes for a device, including custom and system-managed attributes.";
|
|
193
|
+
readonly annotations: {
|
|
194
|
+
readonly title: "Get device posture attributes";
|
|
195
|
+
readonly readOnlyHint: true;
|
|
196
|
+
readonly destructiveHint: false;
|
|
197
|
+
readonly idempotentHint: true;
|
|
198
|
+
readonly openWorldHint: true;
|
|
199
|
+
};
|
|
130
200
|
readonly inputSchema: z.ZodObject<{
|
|
131
201
|
deviceId: z.ZodString;
|
|
132
202
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -140,6 +210,13 @@ export declare const deviceTools: readonly [{
|
|
|
140
210
|
}, {
|
|
141
211
|
readonly name: "tailscale_set_device_posture_attribute";
|
|
142
212
|
readonly description: "Set a custom posture attribute on a device. Creates or updates the attribute. Attribute keys must start with 'custom:'. Useful for compliance tracking, JIT access, and custom security policies.";
|
|
213
|
+
readonly annotations: {
|
|
214
|
+
readonly title: "Set device posture attribute";
|
|
215
|
+
readonly readOnlyHint: false;
|
|
216
|
+
readonly destructiveHint: false;
|
|
217
|
+
readonly idempotentHint: true;
|
|
218
|
+
readonly openWorldHint: true;
|
|
219
|
+
};
|
|
143
220
|
readonly inputSchema: z.ZodObject<{
|
|
144
221
|
deviceId: z.ZodString;
|
|
145
222
|
attributeKey: z.ZodString;
|
|
@@ -165,6 +242,13 @@ export declare const deviceTools: readonly [{
|
|
|
165
242
|
}, {
|
|
166
243
|
readonly name: "tailscale_delete_device_posture_attribute";
|
|
167
244
|
readonly description: "Delete a custom posture attribute from a device. This is irreversible.";
|
|
245
|
+
readonly annotations: {
|
|
246
|
+
readonly title: "Delete device posture attribute";
|
|
247
|
+
readonly readOnlyHint: false;
|
|
248
|
+
readonly destructiveHint: true;
|
|
249
|
+
readonly idempotentHint: true;
|
|
250
|
+
readonly openWorldHint: true;
|
|
251
|
+
};
|
|
168
252
|
readonly inputSchema: z.ZodObject<{
|
|
169
253
|
deviceId: z.ZodString;
|
|
170
254
|
attributeKey: z.ZodString;
|
|
@@ -182,6 +266,13 @@ export declare const deviceTools: readonly [{
|
|
|
182
266
|
}, {
|
|
183
267
|
readonly name: "tailscale_set_device_tags";
|
|
184
268
|
readonly description: "Set ACL tags on a device. Replaces all existing tags — pass the full list of tags you want applied.";
|
|
269
|
+
readonly annotations: {
|
|
270
|
+
readonly title: "Set device tags";
|
|
271
|
+
readonly readOnlyHint: false;
|
|
272
|
+
readonly destructiveHint: false;
|
|
273
|
+
readonly idempotentHint: true;
|
|
274
|
+
readonly openWorldHint: true;
|
|
275
|
+
};
|
|
185
276
|
readonly inputSchema: z.ZodObject<{
|
|
186
277
|
deviceId: z.ZodString;
|
|
187
278
|
tags: z.ZodArray<z.ZodString, "many">;
|
package/dist/tools/devices.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { apiGet, apiPost,
|
|
2
|
+
import { apiDelete, apiGet, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
3
|
export const deviceTools = [
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_list_devices",
|
|
6
6
|
description: "List all devices in your tailnet with their status, IP addresses, OS, and last seen time.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List devices",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
7
14
|
inputSchema: z.object({
|
|
8
15
|
fields: z
|
|
9
16
|
.string()
|
|
@@ -18,6 +25,13 @@ export const deviceTools = [
|
|
|
18
25
|
{
|
|
19
26
|
name: "tailscale_get_device",
|
|
20
27
|
description: "Get detailed information about a specific device by its ID.",
|
|
28
|
+
annotations: {
|
|
29
|
+
title: "Get device",
|
|
30
|
+
readOnlyHint: true,
|
|
31
|
+
destructiveHint: false,
|
|
32
|
+
idempotentHint: true,
|
|
33
|
+
openWorldHint: true,
|
|
34
|
+
},
|
|
21
35
|
inputSchema: z.object({
|
|
22
36
|
deviceId: z.string().describe("The device ID (numeric or nodekey format)"),
|
|
23
37
|
}),
|
|
@@ -28,6 +42,13 @@ export const deviceTools = [
|
|
|
28
42
|
{
|
|
29
43
|
name: "tailscale_authorize_device",
|
|
30
44
|
description: "Authorize a device that is pending authorization.",
|
|
45
|
+
annotations: {
|
|
46
|
+
title: "Authorize device",
|
|
47
|
+
readOnlyHint: false,
|
|
48
|
+
destructiveHint: false,
|
|
49
|
+
idempotentHint: true,
|
|
50
|
+
openWorldHint: true,
|
|
51
|
+
},
|
|
31
52
|
inputSchema: z.object({
|
|
32
53
|
deviceId: z.string().describe("The device ID to authorize"),
|
|
33
54
|
}),
|
|
@@ -38,6 +59,13 @@ export const deviceTools = [
|
|
|
38
59
|
{
|
|
39
60
|
name: "tailscale_deauthorize_device",
|
|
40
61
|
description: "Deauthorize a device, immediately removing its access to the tailnet. The device will need to be re-authorized to reconnect.",
|
|
62
|
+
annotations: {
|
|
63
|
+
title: "Deauthorize device",
|
|
64
|
+
readOnlyHint: false,
|
|
65
|
+
destructiveHint: true,
|
|
66
|
+
idempotentHint: true,
|
|
67
|
+
openWorldHint: true,
|
|
68
|
+
},
|
|
41
69
|
inputSchema: z.object({
|
|
42
70
|
deviceId: z.string().describe("The device ID to deauthorize"),
|
|
43
71
|
}),
|
|
@@ -48,6 +76,13 @@ export const deviceTools = [
|
|
|
48
76
|
{
|
|
49
77
|
name: "tailscale_delete_device",
|
|
50
78
|
description: "Permanently remove a device from the tailnet. This is irreversible — the device must re-authenticate to rejoin.",
|
|
79
|
+
annotations: {
|
|
80
|
+
title: "Delete device",
|
|
81
|
+
readOnlyHint: false,
|
|
82
|
+
destructiveHint: true,
|
|
83
|
+
idempotentHint: false,
|
|
84
|
+
openWorldHint: true,
|
|
85
|
+
},
|
|
51
86
|
inputSchema: z.object({
|
|
52
87
|
deviceId: z.string().describe("The device ID to delete"),
|
|
53
88
|
}),
|
|
@@ -58,6 +93,13 @@ export const deviceTools = [
|
|
|
58
93
|
{
|
|
59
94
|
name: "tailscale_rename_device",
|
|
60
95
|
description: "Set the name of a device in the tailnet.",
|
|
96
|
+
annotations: {
|
|
97
|
+
title: "Rename device",
|
|
98
|
+
readOnlyHint: false,
|
|
99
|
+
destructiveHint: false,
|
|
100
|
+
idempotentHint: true,
|
|
101
|
+
openWorldHint: true,
|
|
102
|
+
},
|
|
61
103
|
inputSchema: z.object({
|
|
62
104
|
deviceId: z.string().describe("The device ID to rename"),
|
|
63
105
|
name: z.string().describe("The new name for the device (FQDN within your tailnet)"),
|
|
@@ -69,6 +111,13 @@ export const deviceTools = [
|
|
|
69
111
|
{
|
|
70
112
|
name: "tailscale_expire_device",
|
|
71
113
|
description: "Expire a device's key, forcing it to re-authenticate.",
|
|
114
|
+
annotations: {
|
|
115
|
+
title: "Expire device key",
|
|
116
|
+
readOnlyHint: false,
|
|
117
|
+
destructiveHint: true,
|
|
118
|
+
idempotentHint: true,
|
|
119
|
+
openWorldHint: true,
|
|
120
|
+
},
|
|
72
121
|
inputSchema: z.object({
|
|
73
122
|
deviceId: z.string().describe("The device ID to expire"),
|
|
74
123
|
}),
|
|
@@ -79,6 +128,13 @@ export const deviceTools = [
|
|
|
79
128
|
{
|
|
80
129
|
name: "tailscale_get_device_routes",
|
|
81
130
|
description: "Get the subnet routes a device advertises and which are enabled.",
|
|
131
|
+
annotations: {
|
|
132
|
+
title: "Get device routes",
|
|
133
|
+
readOnlyHint: true,
|
|
134
|
+
destructiveHint: false,
|
|
135
|
+
idempotentHint: true,
|
|
136
|
+
openWorldHint: true,
|
|
137
|
+
},
|
|
82
138
|
inputSchema: z.object({
|
|
83
139
|
deviceId: z.string().describe("The device ID"),
|
|
84
140
|
}),
|
|
@@ -89,9 +145,18 @@ export const deviceTools = [
|
|
|
89
145
|
{
|
|
90
146
|
name: "tailscale_set_device_routes",
|
|
91
147
|
description: "Set the enabled subnet routes for a device. Replaces all currently enabled routes — pass the full list of routes you want enabled.",
|
|
148
|
+
annotations: {
|
|
149
|
+
title: "Set device routes",
|
|
150
|
+
readOnlyHint: false,
|
|
151
|
+
destructiveHint: false,
|
|
152
|
+
idempotentHint: true,
|
|
153
|
+
openWorldHint: true,
|
|
154
|
+
},
|
|
92
155
|
inputSchema: z.object({
|
|
93
156
|
deviceId: z.string().describe("The device ID"),
|
|
94
|
-
routes: z
|
|
157
|
+
routes: z
|
|
158
|
+
.array(z.string())
|
|
159
|
+
.describe("Full list of CIDR routes to enable (e.g. ['10.0.0.0/24', '192.168.1.0/24']). Replaces existing enabled routes."),
|
|
95
160
|
}),
|
|
96
161
|
handler: async (input) => {
|
|
97
162
|
return apiPost(`/device/${encPath(input.deviceId)}/routes`, { routes: input.routes });
|
|
@@ -100,6 +165,13 @@ export const deviceTools = [
|
|
|
100
165
|
{
|
|
101
166
|
name: "tailscale_get_device_posture_attributes",
|
|
102
167
|
description: "Get all posture attributes for a device, including custom and system-managed attributes.",
|
|
168
|
+
annotations: {
|
|
169
|
+
title: "Get device posture attributes",
|
|
170
|
+
readOnlyHint: true,
|
|
171
|
+
destructiveHint: false,
|
|
172
|
+
idempotentHint: true,
|
|
173
|
+
openWorldHint: true,
|
|
174
|
+
},
|
|
103
175
|
inputSchema: z.object({
|
|
104
176
|
deviceId: z.string().describe("The device ID"),
|
|
105
177
|
}),
|
|
@@ -110,11 +182,21 @@ export const deviceTools = [
|
|
|
110
182
|
{
|
|
111
183
|
name: "tailscale_set_device_posture_attribute",
|
|
112
184
|
description: "Set a custom posture attribute on a device. Creates or updates the attribute. Attribute keys must start with 'custom:'. Useful for compliance tracking, JIT access, and custom security policies.",
|
|
185
|
+
annotations: {
|
|
186
|
+
title: "Set device posture attribute",
|
|
187
|
+
readOnlyHint: false,
|
|
188
|
+
destructiveHint: false,
|
|
189
|
+
idempotentHint: true,
|
|
190
|
+
openWorldHint: true,
|
|
191
|
+
},
|
|
113
192
|
inputSchema: z.object({
|
|
114
193
|
deviceId: z.string().describe("The device ID"),
|
|
115
194
|
attributeKey: z.string().describe("The attribute key (must start with 'custom:', e.g. 'custom:lastAuditDate')"),
|
|
116
195
|
value: z.string().describe("The attribute value"),
|
|
117
|
-
expiry: z
|
|
196
|
+
expiry: z
|
|
197
|
+
.string()
|
|
198
|
+
.optional()
|
|
199
|
+
.describe("Optional expiry time in RFC3339 format (e.g. '2026-12-01T00:00:00Z'). Attribute is automatically removed after expiry."),
|
|
118
200
|
}),
|
|
119
201
|
handler: async (input) => {
|
|
120
202
|
if (!input.attributeKey.startsWith("custom:")) {
|
|
@@ -129,6 +211,13 @@ export const deviceTools = [
|
|
|
129
211
|
{
|
|
130
212
|
name: "tailscale_delete_device_posture_attribute",
|
|
131
213
|
description: "Delete a custom posture attribute from a device. This is irreversible.",
|
|
214
|
+
annotations: {
|
|
215
|
+
title: "Delete device posture attribute",
|
|
216
|
+
readOnlyHint: false,
|
|
217
|
+
destructiveHint: true,
|
|
218
|
+
idempotentHint: true,
|
|
219
|
+
openWorldHint: true,
|
|
220
|
+
},
|
|
132
221
|
inputSchema: z.object({
|
|
133
222
|
deviceId: z.string().describe("The device ID"),
|
|
134
223
|
attributeKey: z.string().describe("The attribute key to delete (e.g. 'custom:lastAuditDate')"),
|
|
@@ -140,9 +229,18 @@ export const deviceTools = [
|
|
|
140
229
|
{
|
|
141
230
|
name: "tailscale_set_device_tags",
|
|
142
231
|
description: "Set ACL tags on a device. Replaces all existing tags — pass the full list of tags you want applied.",
|
|
232
|
+
annotations: {
|
|
233
|
+
title: "Set device tags",
|
|
234
|
+
readOnlyHint: false,
|
|
235
|
+
destructiveHint: false,
|
|
236
|
+
idempotentHint: true,
|
|
237
|
+
openWorldHint: true,
|
|
238
|
+
},
|
|
143
239
|
inputSchema: z.object({
|
|
144
240
|
deviceId: z.string().describe("The device ID"),
|
|
145
|
-
tags: z
|
|
241
|
+
tags: z
|
|
242
|
+
.array(z.string())
|
|
243
|
+
.describe("Full list of ACL tags (e.g. ['tag:server', 'tag:production']). Replaces all existing tags."),
|
|
146
244
|
}),
|
|
147
245
|
handler: async (input) => {
|
|
148
246
|
const invalid = input.tags.filter((t) => !t.startsWith("tag:"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/tools/devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"devices.js","sourceRoot":"","sources":["../../src/tools/devices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE5E,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,wBAAwB;QAC9B,WAAW,EAAE,2FAA2F;QACxG,WAAW,EAAE;YACX,KAAK,EAAE,cAAc;YACrB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,MAAM,EAA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AAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;YAChE,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBACvB,MAAM,IAAI,KAAK,CAAC,yDAAyD,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACjG,CAAC;YACD,OAAO,OAAO,CAAC,WAAW,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAClF,CAAC;KACF;CACO,CAAC"}
|
package/dist/tools/dns.d.ts
CHANGED
|
@@ -2,11 +2,25 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const dnsTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_get_nameservers";
|
|
4
4
|
readonly description: "Get the DNS nameservers configured for your tailnet.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "Get nameservers";
|
|
7
|
+
readonly readOnlyHint: true;
|
|
8
|
+
readonly destructiveHint: false;
|
|
9
|
+
readonly idempotentHint: true;
|
|
10
|
+
readonly openWorldHint: true;
|
|
11
|
+
};
|
|
5
12
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
6
13
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
7
14
|
}, {
|
|
8
15
|
readonly name: "tailscale_set_nameservers";
|
|
9
16
|
readonly description: "Set the DNS nameservers for your tailnet. Replaces all existing nameservers.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Set nameservers";
|
|
19
|
+
readonly readOnlyHint: false;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
10
24
|
readonly inputSchema: z.ZodObject<{
|
|
11
25
|
dns: z.ZodArray<z.ZodString, "many">;
|
|
12
26
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -20,11 +34,25 @@ export declare const dnsTools: readonly [{
|
|
|
20
34
|
}, {
|
|
21
35
|
readonly name: "tailscale_get_search_paths";
|
|
22
36
|
readonly description: "Get the DNS search paths configured for your tailnet.";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Get DNS search paths";
|
|
39
|
+
readonly readOnlyHint: true;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: true;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
23
44
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
24
45
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
25
46
|
}, {
|
|
26
47
|
readonly name: "tailscale_set_search_paths";
|
|
27
48
|
readonly description: "Set the DNS search paths for your tailnet. Replaces all existing search paths.";
|
|
49
|
+
readonly annotations: {
|
|
50
|
+
readonly title: "Set DNS search paths";
|
|
51
|
+
readonly readOnlyHint: false;
|
|
52
|
+
readonly destructiveHint: false;
|
|
53
|
+
readonly idempotentHint: true;
|
|
54
|
+
readonly openWorldHint: true;
|
|
55
|
+
};
|
|
28
56
|
readonly inputSchema: z.ZodObject<{
|
|
29
57
|
searchPaths: z.ZodArray<z.ZodString, "many">;
|
|
30
58
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -38,11 +66,25 @@ export declare const dnsTools: readonly [{
|
|
|
38
66
|
}, {
|
|
39
67
|
readonly name: "tailscale_get_split_dns";
|
|
40
68
|
readonly description: "Get the split DNS configuration for your tailnet.";
|
|
69
|
+
readonly annotations: {
|
|
70
|
+
readonly title: "Get split DNS";
|
|
71
|
+
readonly readOnlyHint: true;
|
|
72
|
+
readonly destructiveHint: false;
|
|
73
|
+
readonly idempotentHint: true;
|
|
74
|
+
readonly openWorldHint: true;
|
|
75
|
+
};
|
|
41
76
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
42
77
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
43
78
|
}, {
|
|
44
79
|
readonly name: "tailscale_set_split_dns";
|
|
45
80
|
readonly description: "Set split DNS configuration. Maps domains to specific nameservers. Replaces the entire split DNS configuration.";
|
|
81
|
+
readonly annotations: {
|
|
82
|
+
readonly title: "Set split DNS";
|
|
83
|
+
readonly readOnlyHint: false;
|
|
84
|
+
readonly destructiveHint: false;
|
|
85
|
+
readonly idempotentHint: true;
|
|
86
|
+
readonly openWorldHint: true;
|
|
87
|
+
};
|
|
46
88
|
readonly inputSchema: z.ZodObject<{
|
|
47
89
|
splitDns: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
|
|
48
90
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -56,11 +98,25 @@ export declare const dnsTools: readonly [{
|
|
|
56
98
|
}, {
|
|
57
99
|
readonly name: "tailscale_get_dns_preferences";
|
|
58
100
|
readonly description: "Get DNS preferences for your tailnet, including whether MagicDNS is enabled.";
|
|
101
|
+
readonly annotations: {
|
|
102
|
+
readonly title: "Get DNS preferences";
|
|
103
|
+
readonly readOnlyHint: true;
|
|
104
|
+
readonly destructiveHint: false;
|
|
105
|
+
readonly idempotentHint: true;
|
|
106
|
+
readonly openWorldHint: true;
|
|
107
|
+
};
|
|
59
108
|
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
60
109
|
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
61
110
|
}, {
|
|
62
111
|
readonly name: "tailscale_set_dns_preferences";
|
|
63
112
|
readonly description: "Set DNS preferences for your tailnet, such as enabling or disabling MagicDNS.";
|
|
113
|
+
readonly annotations: {
|
|
114
|
+
readonly title: "Set DNS preferences";
|
|
115
|
+
readonly readOnlyHint: false;
|
|
116
|
+
readonly destructiveHint: false;
|
|
117
|
+
readonly idempotentHint: true;
|
|
118
|
+
readonly openWorldHint: true;
|
|
119
|
+
};
|
|
64
120
|
readonly inputSchema: z.ZodObject<{
|
|
65
121
|
magicDNS: z.ZodBoolean;
|
|
66
122
|
}, "strip", z.ZodTypeAny, {
|
package/dist/tools/dns.js
CHANGED
|
@@ -4,6 +4,13 @@ export const dnsTools = [
|
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_get_nameservers",
|
|
6
6
|
description: "Get the DNS nameservers configured for your tailnet.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Get nameservers",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
7
14
|
inputSchema: z.object({}),
|
|
8
15
|
handler: async () => {
|
|
9
16
|
return apiGet(`/tailnet/${getTailnet()}/dns/nameservers`);
|
|
@@ -12,6 +19,13 @@ export const dnsTools = [
|
|
|
12
19
|
{
|
|
13
20
|
name: "tailscale_set_nameservers",
|
|
14
21
|
description: "Set the DNS nameservers for your tailnet. Replaces all existing nameservers.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Set nameservers",
|
|
24
|
+
readOnlyHint: false,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
15
29
|
inputSchema: z.object({
|
|
16
30
|
dns: z.array(z.string()).describe("List of DNS server IP addresses (e.g. ['8.8.8.8', '1.1.1.1'])"),
|
|
17
31
|
}),
|
|
@@ -22,6 +36,13 @@ export const dnsTools = [
|
|
|
22
36
|
{
|
|
23
37
|
name: "tailscale_get_search_paths",
|
|
24
38
|
description: "Get the DNS search paths configured for your tailnet.",
|
|
39
|
+
annotations: {
|
|
40
|
+
title: "Get DNS search paths",
|
|
41
|
+
readOnlyHint: true,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: true,
|
|
44
|
+
openWorldHint: true,
|
|
45
|
+
},
|
|
25
46
|
inputSchema: z.object({}),
|
|
26
47
|
handler: async () => {
|
|
27
48
|
return apiGet(`/tailnet/${getTailnet()}/dns/searchpaths`);
|
|
@@ -30,6 +51,13 @@ export const dnsTools = [
|
|
|
30
51
|
{
|
|
31
52
|
name: "tailscale_set_search_paths",
|
|
32
53
|
description: "Set the DNS search paths for your tailnet. Replaces all existing search paths.",
|
|
54
|
+
annotations: {
|
|
55
|
+
title: "Set DNS search paths",
|
|
56
|
+
readOnlyHint: false,
|
|
57
|
+
destructiveHint: false,
|
|
58
|
+
idempotentHint: true,
|
|
59
|
+
openWorldHint: true,
|
|
60
|
+
},
|
|
33
61
|
inputSchema: z.object({
|
|
34
62
|
searchPaths: z.array(z.string()).describe("List of DNS search domains (e.g. ['example.com', 'internal.corp'])"),
|
|
35
63
|
}),
|
|
@@ -42,6 +70,13 @@ export const dnsTools = [
|
|
|
42
70
|
{
|
|
43
71
|
name: "tailscale_get_split_dns",
|
|
44
72
|
description: "Get the split DNS configuration for your tailnet.",
|
|
73
|
+
annotations: {
|
|
74
|
+
title: "Get split DNS",
|
|
75
|
+
readOnlyHint: true,
|
|
76
|
+
destructiveHint: false,
|
|
77
|
+
idempotentHint: true,
|
|
78
|
+
openWorldHint: true,
|
|
79
|
+
},
|
|
45
80
|
inputSchema: z.object({}),
|
|
46
81
|
handler: async () => {
|
|
47
82
|
return apiGet(`/tailnet/${getTailnet()}/dns/split-dns`);
|
|
@@ -50,10 +85,17 @@ export const dnsTools = [
|
|
|
50
85
|
{
|
|
51
86
|
name: "tailscale_set_split_dns",
|
|
52
87
|
description: "Set split DNS configuration. Maps domains to specific nameservers. Replaces the entire split DNS configuration.",
|
|
88
|
+
annotations: {
|
|
89
|
+
title: "Set split DNS",
|
|
90
|
+
readOnlyHint: false,
|
|
91
|
+
destructiveHint: false,
|
|
92
|
+
idempotentHint: true,
|
|
93
|
+
openWorldHint: true,
|
|
94
|
+
},
|
|
53
95
|
inputSchema: z.object({
|
|
54
96
|
splitDns: z
|
|
55
97
|
.record(z.string(), z.array(z.string()))
|
|
56
|
-
.describe(
|
|
98
|
+
.describe('Map of domain to nameserver list (e.g. { "corp.example.com": ["10.0.0.1"], "internal.dev": ["10.0.0.2"] })'),
|
|
57
99
|
}),
|
|
58
100
|
handler: async (input) => {
|
|
59
101
|
return apiPut(`/tailnet/${getTailnet()}/dns/split-dns`, input.splitDns);
|
|
@@ -62,6 +104,13 @@ export const dnsTools = [
|
|
|
62
104
|
{
|
|
63
105
|
name: "tailscale_get_dns_preferences",
|
|
64
106
|
description: "Get DNS preferences for your tailnet, including whether MagicDNS is enabled.",
|
|
107
|
+
annotations: {
|
|
108
|
+
title: "Get DNS preferences",
|
|
109
|
+
readOnlyHint: true,
|
|
110
|
+
destructiveHint: false,
|
|
111
|
+
idempotentHint: true,
|
|
112
|
+
openWorldHint: true,
|
|
113
|
+
},
|
|
65
114
|
inputSchema: z.object({}),
|
|
66
115
|
handler: async () => {
|
|
67
116
|
return apiGet(`/tailnet/${getTailnet()}/dns/preferences`);
|
|
@@ -70,6 +119,13 @@ export const dnsTools = [
|
|
|
70
119
|
{
|
|
71
120
|
name: "tailscale_set_dns_preferences",
|
|
72
121
|
description: "Set DNS preferences for your tailnet, such as enabling or disabling MagicDNS.",
|
|
122
|
+
annotations: {
|
|
123
|
+
title: "Set DNS preferences",
|
|
124
|
+
readOnlyHint: false,
|
|
125
|
+
destructiveHint: false,
|
|
126
|
+
idempotentHint: true,
|
|
127
|
+
openWorldHint: true,
|
|
128
|
+
},
|
|
73
129
|
inputSchema: z.object({
|
|
74
130
|
magicDNS: z.boolean().describe("Whether to enable MagicDNS"),
|
|
75
131
|
}),
|
package/dist/tools/dns.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dns.js","sourceRoot":"","sources":["../../src/tools/dns.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE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