@yawlabs/tailscale-mcp 0.2.1 → 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.
- package/README.md +25 -19
- package/dist/index.js +22921 -101
- package/package.json +10 -11
- package/dist/api.d.ts +0 -35
- package/dist/api.js +0 -134
- package/dist/api.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.js.map +0 -1
- package/dist/tools/acl.d.ts +0 -86
- package/dist/tools/acl.js +0 -105
- package/dist/tools/acl.js.map +0 -1
- package/dist/tools/audit.d.ts +0 -50
- package/dist/tools/audit.js +0 -60
- package/dist/tools/audit.js.map +0 -1
- package/dist/tools/devices.d.ts +0 -290
- package/dist/tools/devices.js +0 -254
- package/dist/tools/devices.js.map +0 -1
- package/dist/tools/dns.d.ts +0 -130
- package/dist/tools/dns.js +0 -139
- package/dist/tools/dns.js.map +0 -1
- package/dist/tools/invites.d.ts +0 -158
- package/dist/tools/invites.js +0 -160
- package/dist/tools/invites.js.map +0 -1
- package/dist/tools/keys.d.ts +0 -94
- package/dist/tools/keys.js +0 -92
- package/dist/tools/keys.js.map +0 -1
- package/dist/tools/log-streaming.d.ts +0 -90
- package/dist/tools/log-streaming.js +0 -89
- package/dist/tools/log-streaming.js.map +0 -1
- package/dist/tools/network-lock.d.ts +0 -14
- package/dist/tools/network-lock.js +0 -20
- package/dist/tools/network-lock.js.map +0 -1
- package/dist/tools/oauth-clients.d.ts +0 -118
- package/dist/tools/oauth-clients.js +0 -102
- package/dist/tools/oauth-clients.js.map +0 -1
- package/dist/tools/posture.d.ts +0 -126
- package/dist/tools/posture.js +0 -103
- package/dist/tools/posture.js.map +0 -1
- package/dist/tools/services.d.ts +0 -124
- package/dist/tools/services.js +0 -106
- package/dist/tools/services.js.map +0 -1
- package/dist/tools/status.d.ts +0 -26
- package/dist/tools/status.js +0 -38
- package/dist/tools/status.js.map +0 -1
- package/dist/tools/tailnet.d.ts +0 -130
- package/dist/tools/tailnet.js +0 -96
- package/dist/tools/tailnet.js.map +0 -1
- package/dist/tools/users.d.ts +0 -118
- package/dist/tools/users.js +0 -108
- package/dist/tools/users.js.map +0 -1
- package/dist/tools/webhooks.d.ts +0 -126
- package/dist/tools/webhooks.js +0 -121
- package/dist/tools/webhooks.js.map +0 -1
- package/dist/tools/workload-identity.d.ts +0 -118
- package/dist/tools/workload-identity.js +0 -105
- package/dist/tools/workload-identity.js.map +0 -1
package/dist/tools/devices.d.ts
DELETED
|
@@ -1,290 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const deviceTools: readonly [{
|
|
3
|
-
readonly name: "tailscale_list_devices";
|
|
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
|
-
};
|
|
12
|
-
readonly inputSchema: z.ZodObject<{
|
|
13
|
-
fields: z.ZodOptional<z.ZodString>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
fields?: string | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
fields?: string | undefined;
|
|
18
|
-
}>;
|
|
19
|
-
readonly handler: (input: {
|
|
20
|
-
fields?: string;
|
|
21
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
22
|
-
}, {
|
|
23
|
-
readonly name: "tailscale_get_device";
|
|
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
|
-
};
|
|
32
|
-
readonly inputSchema: z.ZodObject<{
|
|
33
|
-
deviceId: z.ZodString;
|
|
34
|
-
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
deviceId: string;
|
|
36
|
-
}, {
|
|
37
|
-
deviceId: string;
|
|
38
|
-
}>;
|
|
39
|
-
readonly handler: (input: {
|
|
40
|
-
deviceId: string;
|
|
41
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
42
|
-
}, {
|
|
43
|
-
readonly name: "tailscale_authorize_device";
|
|
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
|
-
};
|
|
52
|
-
readonly inputSchema: z.ZodObject<{
|
|
53
|
-
deviceId: z.ZodString;
|
|
54
|
-
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
deviceId: string;
|
|
56
|
-
}, {
|
|
57
|
-
deviceId: string;
|
|
58
|
-
}>;
|
|
59
|
-
readonly handler: (input: {
|
|
60
|
-
deviceId: string;
|
|
61
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "tailscale_deauthorize_device";
|
|
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
|
-
};
|
|
72
|
-
readonly inputSchema: z.ZodObject<{
|
|
73
|
-
deviceId: z.ZodString;
|
|
74
|
-
}, "strip", z.ZodTypeAny, {
|
|
75
|
-
deviceId: string;
|
|
76
|
-
}, {
|
|
77
|
-
deviceId: string;
|
|
78
|
-
}>;
|
|
79
|
-
readonly handler: (input: {
|
|
80
|
-
deviceId: string;
|
|
81
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
82
|
-
}, {
|
|
83
|
-
readonly name: "tailscale_delete_device";
|
|
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
|
-
};
|
|
92
|
-
readonly inputSchema: z.ZodObject<{
|
|
93
|
-
deviceId: z.ZodString;
|
|
94
|
-
}, "strip", z.ZodTypeAny, {
|
|
95
|
-
deviceId: string;
|
|
96
|
-
}, {
|
|
97
|
-
deviceId: string;
|
|
98
|
-
}>;
|
|
99
|
-
readonly handler: (input: {
|
|
100
|
-
deviceId: string;
|
|
101
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
102
|
-
}, {
|
|
103
|
-
readonly name: "tailscale_rename_device";
|
|
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
|
-
};
|
|
112
|
-
readonly inputSchema: z.ZodObject<{
|
|
113
|
-
deviceId: z.ZodString;
|
|
114
|
-
name: z.ZodString;
|
|
115
|
-
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
deviceId: string;
|
|
117
|
-
name: string;
|
|
118
|
-
}, {
|
|
119
|
-
deviceId: string;
|
|
120
|
-
name: string;
|
|
121
|
-
}>;
|
|
122
|
-
readonly handler: (input: {
|
|
123
|
-
deviceId: string;
|
|
124
|
-
name: string;
|
|
125
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
126
|
-
}, {
|
|
127
|
-
readonly name: "tailscale_expire_device";
|
|
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
|
-
};
|
|
136
|
-
readonly inputSchema: z.ZodObject<{
|
|
137
|
-
deviceId: z.ZodString;
|
|
138
|
-
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
deviceId: string;
|
|
140
|
-
}, {
|
|
141
|
-
deviceId: string;
|
|
142
|
-
}>;
|
|
143
|
-
readonly handler: (input: {
|
|
144
|
-
deviceId: string;
|
|
145
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
146
|
-
}, {
|
|
147
|
-
readonly name: "tailscale_get_device_routes";
|
|
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
|
-
};
|
|
156
|
-
readonly inputSchema: z.ZodObject<{
|
|
157
|
-
deviceId: z.ZodString;
|
|
158
|
-
}, "strip", z.ZodTypeAny, {
|
|
159
|
-
deviceId: string;
|
|
160
|
-
}, {
|
|
161
|
-
deviceId: string;
|
|
162
|
-
}>;
|
|
163
|
-
readonly handler: (input: {
|
|
164
|
-
deviceId: string;
|
|
165
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
166
|
-
}, {
|
|
167
|
-
readonly name: "tailscale_set_device_routes";
|
|
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
|
-
};
|
|
176
|
-
readonly inputSchema: z.ZodObject<{
|
|
177
|
-
deviceId: z.ZodString;
|
|
178
|
-
routes: z.ZodArray<z.ZodString, "many">;
|
|
179
|
-
}, "strip", z.ZodTypeAny, {
|
|
180
|
-
deviceId: string;
|
|
181
|
-
routes: string[];
|
|
182
|
-
}, {
|
|
183
|
-
deviceId: string;
|
|
184
|
-
routes: string[];
|
|
185
|
-
}>;
|
|
186
|
-
readonly handler: (input: {
|
|
187
|
-
deviceId: string;
|
|
188
|
-
routes: string[];
|
|
189
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
190
|
-
}, {
|
|
191
|
-
readonly name: "tailscale_get_device_posture_attributes";
|
|
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
|
-
};
|
|
200
|
-
readonly inputSchema: z.ZodObject<{
|
|
201
|
-
deviceId: z.ZodString;
|
|
202
|
-
}, "strip", z.ZodTypeAny, {
|
|
203
|
-
deviceId: string;
|
|
204
|
-
}, {
|
|
205
|
-
deviceId: string;
|
|
206
|
-
}>;
|
|
207
|
-
readonly handler: (input: {
|
|
208
|
-
deviceId: string;
|
|
209
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
210
|
-
}, {
|
|
211
|
-
readonly name: "tailscale_set_device_posture_attribute";
|
|
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
|
-
};
|
|
220
|
-
readonly inputSchema: z.ZodObject<{
|
|
221
|
-
deviceId: z.ZodString;
|
|
222
|
-
attributeKey: z.ZodString;
|
|
223
|
-
value: z.ZodString;
|
|
224
|
-
expiry: z.ZodOptional<z.ZodString>;
|
|
225
|
-
}, "strip", z.ZodTypeAny, {
|
|
226
|
-
value: string;
|
|
227
|
-
deviceId: string;
|
|
228
|
-
attributeKey: string;
|
|
229
|
-
expiry?: string | undefined;
|
|
230
|
-
}, {
|
|
231
|
-
value: string;
|
|
232
|
-
deviceId: string;
|
|
233
|
-
attributeKey: string;
|
|
234
|
-
expiry?: string | undefined;
|
|
235
|
-
}>;
|
|
236
|
-
readonly handler: (input: {
|
|
237
|
-
deviceId: string;
|
|
238
|
-
attributeKey: string;
|
|
239
|
-
value: string;
|
|
240
|
-
expiry?: string;
|
|
241
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
242
|
-
}, {
|
|
243
|
-
readonly name: "tailscale_delete_device_posture_attribute";
|
|
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
|
-
};
|
|
252
|
-
readonly inputSchema: z.ZodObject<{
|
|
253
|
-
deviceId: z.ZodString;
|
|
254
|
-
attributeKey: z.ZodString;
|
|
255
|
-
}, "strip", z.ZodTypeAny, {
|
|
256
|
-
deviceId: string;
|
|
257
|
-
attributeKey: string;
|
|
258
|
-
}, {
|
|
259
|
-
deviceId: string;
|
|
260
|
-
attributeKey: string;
|
|
261
|
-
}>;
|
|
262
|
-
readonly handler: (input: {
|
|
263
|
-
deviceId: string;
|
|
264
|
-
attributeKey: string;
|
|
265
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
266
|
-
}, {
|
|
267
|
-
readonly name: "tailscale_set_device_tags";
|
|
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
|
-
};
|
|
276
|
-
readonly inputSchema: z.ZodObject<{
|
|
277
|
-
deviceId: z.ZodString;
|
|
278
|
-
tags: z.ZodArray<z.ZodString, "many">;
|
|
279
|
-
}, "strip", z.ZodTypeAny, {
|
|
280
|
-
deviceId: string;
|
|
281
|
-
tags: string[];
|
|
282
|
-
}, {
|
|
283
|
-
deviceId: string;
|
|
284
|
-
tags: string[];
|
|
285
|
-
}>;
|
|
286
|
-
readonly handler: (input: {
|
|
287
|
-
deviceId: string;
|
|
288
|
-
tags: string[];
|
|
289
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
290
|
-
}];
|
package/dist/tools/devices.js
DELETED
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { apiDelete, apiGet, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
|
-
export const deviceTools = [
|
|
4
|
-
{
|
|
5
|
-
name: "tailscale_list_devices",
|
|
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
|
-
},
|
|
14
|
-
inputSchema: z.object({
|
|
15
|
-
fields: z
|
|
16
|
-
.string()
|
|
17
|
-
.optional()
|
|
18
|
-
.describe("Comma-separated list of fields to include. Omit for all fields. Valid fields: addresses, advertisedRoutes, authorized, blocksIncomingConnections, clientConnectivity, clientVersion, connectedToControl, created, distro, enabledRoutes, expires, hostname, id, isExternal, keyExpiryDisabled, lastSeen, machineKey, name, nodeId, nodeKey, os, sshEnabled, tags, tailnetLockError, tailnetLockKey, updateAvailable, user. Use 'all' for every field."),
|
|
19
|
-
}),
|
|
20
|
-
handler: async (input) => {
|
|
21
|
-
const params = input.fields ? `?fields=${encodeURIComponent(input.fields)}` : "";
|
|
22
|
-
return apiGet(`/tailnet/${getTailnet()}/devices${params}`);
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "tailscale_get_device",
|
|
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
|
-
},
|
|
35
|
-
inputSchema: z.object({
|
|
36
|
-
deviceId: z.string().describe("The device ID (numeric or nodekey format)"),
|
|
37
|
-
}),
|
|
38
|
-
handler: async (input) => {
|
|
39
|
-
return apiGet(`/device/${encPath(input.deviceId)}`);
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "tailscale_authorize_device",
|
|
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
|
-
},
|
|
52
|
-
inputSchema: z.object({
|
|
53
|
-
deviceId: z.string().describe("The device ID to authorize"),
|
|
54
|
-
}),
|
|
55
|
-
handler: async (input) => {
|
|
56
|
-
return apiPost(`/device/${encPath(input.deviceId)}/authorized`, { authorized: true });
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: "tailscale_deauthorize_device",
|
|
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
|
-
},
|
|
69
|
-
inputSchema: z.object({
|
|
70
|
-
deviceId: z.string().describe("The device ID to deauthorize"),
|
|
71
|
-
}),
|
|
72
|
-
handler: async (input) => {
|
|
73
|
-
return apiPost(`/device/${encPath(input.deviceId)}/authorized`, { authorized: false });
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
name: "tailscale_delete_device",
|
|
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
|
-
},
|
|
86
|
-
inputSchema: z.object({
|
|
87
|
-
deviceId: z.string().describe("The device ID to delete"),
|
|
88
|
-
}),
|
|
89
|
-
handler: async (input) => {
|
|
90
|
-
return apiDelete(`/device/${encPath(input.deviceId)}`);
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
name: "tailscale_rename_device",
|
|
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
|
-
},
|
|
103
|
-
inputSchema: z.object({
|
|
104
|
-
deviceId: z.string().describe("The device ID to rename"),
|
|
105
|
-
name: z.string().describe("The new name for the device (FQDN within your tailnet)"),
|
|
106
|
-
}),
|
|
107
|
-
handler: async (input) => {
|
|
108
|
-
return apiPost(`/device/${encPath(input.deviceId)}/name`, { name: input.name });
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
name: "tailscale_expire_device",
|
|
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
|
-
},
|
|
121
|
-
inputSchema: z.object({
|
|
122
|
-
deviceId: z.string().describe("The device ID to expire"),
|
|
123
|
-
}),
|
|
124
|
-
handler: async (input) => {
|
|
125
|
-
return apiPost(`/device/${encPath(input.deviceId)}/expire`);
|
|
126
|
-
},
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
name: "tailscale_get_device_routes",
|
|
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
|
-
},
|
|
138
|
-
inputSchema: z.object({
|
|
139
|
-
deviceId: z.string().describe("The device ID"),
|
|
140
|
-
}),
|
|
141
|
-
handler: async (input) => {
|
|
142
|
-
return apiGet(`/device/${encPath(input.deviceId)}/routes`);
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
name: "tailscale_set_device_routes",
|
|
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
|
-
},
|
|
155
|
-
inputSchema: z.object({
|
|
156
|
-
deviceId: z.string().describe("The device ID"),
|
|
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."),
|
|
160
|
-
}),
|
|
161
|
-
handler: async (input) => {
|
|
162
|
-
return apiPost(`/device/${encPath(input.deviceId)}/routes`, { routes: input.routes });
|
|
163
|
-
},
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
name: "tailscale_get_device_posture_attributes",
|
|
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
|
-
},
|
|
175
|
-
inputSchema: z.object({
|
|
176
|
-
deviceId: z.string().describe("The device ID"),
|
|
177
|
-
}),
|
|
178
|
-
handler: async (input) => {
|
|
179
|
-
return apiGet(`/device/${encPath(input.deviceId)}/attributes`);
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
name: "tailscale_set_device_posture_attribute",
|
|
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
|
-
},
|
|
192
|
-
inputSchema: z.object({
|
|
193
|
-
deviceId: z.string().describe("The device ID"),
|
|
194
|
-
attributeKey: z.string().describe("The attribute key (must start with 'custom:', e.g. 'custom:lastAuditDate')"),
|
|
195
|
-
value: z.string().describe("The attribute value"),
|
|
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."),
|
|
200
|
-
}),
|
|
201
|
-
handler: async (input) => {
|
|
202
|
-
if (!input.attributeKey.startsWith("custom:")) {
|
|
203
|
-
throw new Error(`attributeKey must start with 'custom:' prefix, got: '${input.attributeKey}'`);
|
|
204
|
-
}
|
|
205
|
-
const body = { value: input.value };
|
|
206
|
-
if (input.expiry !== undefined)
|
|
207
|
-
body.expiry = input.expiry;
|
|
208
|
-
return apiPost(`/device/${encPath(input.deviceId)}/attributes/${encPath(input.attributeKey)}`, body);
|
|
209
|
-
},
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
name: "tailscale_delete_device_posture_attribute",
|
|
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
|
-
},
|
|
221
|
-
inputSchema: z.object({
|
|
222
|
-
deviceId: z.string().describe("The device ID"),
|
|
223
|
-
attributeKey: z.string().describe("The attribute key to delete (e.g. 'custom:lastAuditDate')"),
|
|
224
|
-
}),
|
|
225
|
-
handler: async (input) => {
|
|
226
|
-
return apiDelete(`/device/${encPath(input.deviceId)}/attributes/${encPath(input.attributeKey)}`);
|
|
227
|
-
},
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
name: "tailscale_set_device_tags",
|
|
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
|
-
},
|
|
239
|
-
inputSchema: z.object({
|
|
240
|
-
deviceId: z.string().describe("The device ID"),
|
|
241
|
-
tags: z
|
|
242
|
-
.array(z.string())
|
|
243
|
-
.describe("Full list of ACL tags (e.g. ['tag:server', 'tag:production']). Replaces all existing tags."),
|
|
244
|
-
}),
|
|
245
|
-
handler: async (input) => {
|
|
246
|
-
const invalid = input.tags.filter((t) => !t.startsWith("tag:"));
|
|
247
|
-
if (invalid.length > 0) {
|
|
248
|
-
throw new Error(`All tags must start with 'tag:' prefix. Invalid tags: ${invalid.join(", ")}`);
|
|
249
|
-
}
|
|
250
|
-
return apiPost(`/device/${encPath(input.deviceId)}/tags`, { tags: input.tags });
|
|
251
|
-
},
|
|
252
|
-
},
|
|
253
|
-
];
|
|
254
|
-
//# sourceMappingURL=devices.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,EAAE,CAAC;iBACN,MAAM,EAAE;iBACR,QAAQ,EAAE;iBACV,QAAQ,CACP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C,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
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const dnsTools: readonly [{
|
|
3
|
-
readonly name: "tailscale_get_nameservers";
|
|
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
|
-
};
|
|
12
|
-
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
13
|
-
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
14
|
-
}, {
|
|
15
|
-
readonly name: "tailscale_set_nameservers";
|
|
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
|
-
};
|
|
24
|
-
readonly inputSchema: z.ZodObject<{
|
|
25
|
-
dns: z.ZodArray<z.ZodString, "many">;
|
|
26
|
-
}, "strip", z.ZodTypeAny, {
|
|
27
|
-
dns: string[];
|
|
28
|
-
}, {
|
|
29
|
-
dns: string[];
|
|
30
|
-
}>;
|
|
31
|
-
readonly handler: (input: {
|
|
32
|
-
dns: string[];
|
|
33
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
34
|
-
}, {
|
|
35
|
-
readonly name: "tailscale_get_search_paths";
|
|
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
|
-
};
|
|
44
|
-
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
45
|
-
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
46
|
-
}, {
|
|
47
|
-
readonly name: "tailscale_set_search_paths";
|
|
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
|
-
};
|
|
56
|
-
readonly inputSchema: z.ZodObject<{
|
|
57
|
-
searchPaths: z.ZodArray<z.ZodString, "many">;
|
|
58
|
-
}, "strip", z.ZodTypeAny, {
|
|
59
|
-
searchPaths: string[];
|
|
60
|
-
}, {
|
|
61
|
-
searchPaths: string[];
|
|
62
|
-
}>;
|
|
63
|
-
readonly handler: (input: {
|
|
64
|
-
searchPaths: string[];
|
|
65
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
66
|
-
}, {
|
|
67
|
-
readonly name: "tailscale_get_split_dns";
|
|
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
|
-
};
|
|
76
|
-
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
77
|
-
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
78
|
-
}, {
|
|
79
|
-
readonly name: "tailscale_set_split_dns";
|
|
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
|
-
};
|
|
88
|
-
readonly inputSchema: z.ZodObject<{
|
|
89
|
-
splitDns: z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>;
|
|
90
|
-
}, "strip", z.ZodTypeAny, {
|
|
91
|
-
splitDns: Record<string, string[]>;
|
|
92
|
-
}, {
|
|
93
|
-
splitDns: Record<string, string[]>;
|
|
94
|
-
}>;
|
|
95
|
-
readonly handler: (input: {
|
|
96
|
-
splitDns: Record<string, string[]>;
|
|
97
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
98
|
-
}, {
|
|
99
|
-
readonly name: "tailscale_get_dns_preferences";
|
|
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
|
-
};
|
|
108
|
-
readonly inputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
109
|
-
readonly handler: () => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
110
|
-
}, {
|
|
111
|
-
readonly name: "tailscale_set_dns_preferences";
|
|
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
|
-
};
|
|
120
|
-
readonly inputSchema: z.ZodObject<{
|
|
121
|
-
magicDNS: z.ZodBoolean;
|
|
122
|
-
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
magicDNS: boolean;
|
|
124
|
-
}, {
|
|
125
|
-
magicDNS: boolean;
|
|
126
|
-
}>;
|
|
127
|
-
readonly handler: (input: {
|
|
128
|
-
magicDNS: boolean;
|
|
129
|
-
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
130
|
-
}];
|