@yawlabs/tailscale-mcp 0.1.6 → 0.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 +73 -7
- 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
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const oauthClientTools: readonly [{
|
|
3
|
+
readonly name: "tailscale_list_oauth_clients";
|
|
4
|
+
readonly description: "List all OAuth clients configured for your tailnet.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List OAuth clients";
|
|
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_get_oauth_client";
|
|
16
|
+
readonly description: "Get details for a specific OAuth client.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Get OAuth client";
|
|
19
|
+
readonly readOnlyHint: true;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
24
|
+
readonly inputSchema: z.ZodObject<{
|
|
25
|
+
clientId: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
clientId: string;
|
|
28
|
+
}, {
|
|
29
|
+
clientId: string;
|
|
30
|
+
}>;
|
|
31
|
+
readonly handler: (input: {
|
|
32
|
+
clientId: string;
|
|
33
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "tailscale_create_oauth_client";
|
|
36
|
+
readonly description: "Create a new OAuth client for programmatic API access. Returns the client secret — save it immediately, as it cannot be retrieved again.";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Create OAuth client";
|
|
39
|
+
readonly readOnlyHint: false;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: false;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
44
|
+
readonly inputSchema: z.ZodObject<{
|
|
45
|
+
name: z.ZodString;
|
|
46
|
+
scopes: z.ZodArray<z.ZodString, "many">;
|
|
47
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
48
|
+
description: z.ZodOptional<z.ZodString>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
name: string;
|
|
51
|
+
scopes: string[];
|
|
52
|
+
tags?: string[] | undefined;
|
|
53
|
+
description?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
name: string;
|
|
56
|
+
scopes: string[];
|
|
57
|
+
tags?: string[] | undefined;
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
}>;
|
|
60
|
+
readonly handler: (input: {
|
|
61
|
+
name: string;
|
|
62
|
+
scopes: string[];
|
|
63
|
+
tags?: string[];
|
|
64
|
+
description?: string;
|
|
65
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
66
|
+
}, {
|
|
67
|
+
readonly name: "tailscale_update_oauth_client";
|
|
68
|
+
readonly description: "Update an OAuth client's name, description, or scopes.";
|
|
69
|
+
readonly annotations: {
|
|
70
|
+
readonly title: "Update OAuth client";
|
|
71
|
+
readonly readOnlyHint: false;
|
|
72
|
+
readonly destructiveHint: false;
|
|
73
|
+
readonly idempotentHint: true;
|
|
74
|
+
readonly openWorldHint: true;
|
|
75
|
+
};
|
|
76
|
+
readonly inputSchema: z.ZodObject<{
|
|
77
|
+
clientId: z.ZodString;
|
|
78
|
+
name: z.ZodOptional<z.ZodString>;
|
|
79
|
+
scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
80
|
+
description: z.ZodOptional<z.ZodString>;
|
|
81
|
+
}, "strip", z.ZodTypeAny, {
|
|
82
|
+
clientId: string;
|
|
83
|
+
name?: string | undefined;
|
|
84
|
+
description?: string | undefined;
|
|
85
|
+
scopes?: string[] | undefined;
|
|
86
|
+
}, {
|
|
87
|
+
clientId: string;
|
|
88
|
+
name?: string | undefined;
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
scopes?: string[] | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
readonly handler: (input: {
|
|
93
|
+
clientId: string;
|
|
94
|
+
name?: string;
|
|
95
|
+
scopes?: string[];
|
|
96
|
+
description?: string;
|
|
97
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
98
|
+
}, {
|
|
99
|
+
readonly name: "tailscale_delete_oauth_client";
|
|
100
|
+
readonly description: "Delete an OAuth client. This is irreversible — any integrations using this client will lose access immediately.";
|
|
101
|
+
readonly annotations: {
|
|
102
|
+
readonly title: "Delete OAuth client";
|
|
103
|
+
readonly readOnlyHint: false;
|
|
104
|
+
readonly destructiveHint: true;
|
|
105
|
+
readonly idempotentHint: true;
|
|
106
|
+
readonly openWorldHint: true;
|
|
107
|
+
};
|
|
108
|
+
readonly inputSchema: z.ZodObject<{
|
|
109
|
+
clientId: z.ZodString;
|
|
110
|
+
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
clientId: string;
|
|
112
|
+
}, {
|
|
113
|
+
clientId: string;
|
|
114
|
+
}>;
|
|
115
|
+
readonly handler: (input: {
|
|
116
|
+
clientId: string;
|
|
117
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
118
|
+
}];
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiDelete, apiGet, apiPatch, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
|
+
export const oauthClientTools = [
|
|
4
|
+
{
|
|
5
|
+
name: "tailscale_list_oauth_clients",
|
|
6
|
+
description: "List all OAuth clients configured for your tailnet.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List OAuth clients",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
14
|
+
inputSchema: z.object({}),
|
|
15
|
+
handler: async () => {
|
|
16
|
+
return apiGet(`/tailnet/${getTailnet()}/oauth-clients`);
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "tailscale_get_oauth_client",
|
|
21
|
+
description: "Get details for a specific OAuth client.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Get OAuth client",
|
|
24
|
+
readOnlyHint: true,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
29
|
+
inputSchema: z.object({
|
|
30
|
+
clientId: z.string().describe("The OAuth client ID"),
|
|
31
|
+
}),
|
|
32
|
+
handler: async (input) => {
|
|
33
|
+
return apiGet(`/tailnet/${getTailnet()}/oauth-clients/${encPath(input.clientId)}`);
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "tailscale_create_oauth_client",
|
|
38
|
+
description: "Create a new OAuth client for programmatic API access. Returns the client secret — save it immediately, as it cannot be retrieved again.",
|
|
39
|
+
annotations: {
|
|
40
|
+
title: "Create OAuth client",
|
|
41
|
+
readOnlyHint: false,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: false,
|
|
44
|
+
openWorldHint: true,
|
|
45
|
+
},
|
|
46
|
+
inputSchema: z.object({
|
|
47
|
+
name: z.string().describe("A human-readable name for this OAuth client"),
|
|
48
|
+
scopes: z
|
|
49
|
+
.array(z.string())
|
|
50
|
+
.describe("OAuth scopes to grant (e.g. ['devices:read', 'dns', 'acl']). See Tailscale docs for available scopes."),
|
|
51
|
+
tags: z.array(z.string()).optional().describe("ACL tags to assign to the OAuth client"),
|
|
52
|
+
description: z.string().optional().describe("Description for this OAuth client"),
|
|
53
|
+
}),
|
|
54
|
+
handler: async (input) => {
|
|
55
|
+
return apiPost(`/tailnet/${getTailnet()}/oauth-clients`, input);
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "tailscale_update_oauth_client",
|
|
60
|
+
description: "Update an OAuth client's name, description, or scopes.",
|
|
61
|
+
annotations: {
|
|
62
|
+
title: "Update OAuth client",
|
|
63
|
+
readOnlyHint: false,
|
|
64
|
+
destructiveHint: false,
|
|
65
|
+
idempotentHint: true,
|
|
66
|
+
openWorldHint: true,
|
|
67
|
+
},
|
|
68
|
+
inputSchema: z.object({
|
|
69
|
+
clientId: z.string().describe("The OAuth client ID to update"),
|
|
70
|
+
name: z.string().optional().describe("Updated name"),
|
|
71
|
+
scopes: z.array(z.string()).optional().describe("Updated OAuth scopes"),
|
|
72
|
+
description: z.string().optional().describe("Updated description"),
|
|
73
|
+
}),
|
|
74
|
+
handler: async (input) => {
|
|
75
|
+
const { clientId, ...body } = input;
|
|
76
|
+
const cleanBody = {};
|
|
77
|
+
for (const [key, value] of Object.entries(body)) {
|
|
78
|
+
if (value !== undefined)
|
|
79
|
+
cleanBody[key] = value;
|
|
80
|
+
}
|
|
81
|
+
return apiPatch(`/tailnet/${getTailnet()}/oauth-clients/${encPath(clientId)}`, cleanBody);
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "tailscale_delete_oauth_client",
|
|
86
|
+
description: "Delete an OAuth client. This is irreversible — any integrations using this client will lose access immediately.",
|
|
87
|
+
annotations: {
|
|
88
|
+
title: "Delete OAuth client",
|
|
89
|
+
readOnlyHint: false,
|
|
90
|
+
destructiveHint: true,
|
|
91
|
+
idempotentHint: true,
|
|
92
|
+
openWorldHint: true,
|
|
93
|
+
},
|
|
94
|
+
inputSchema: z.object({
|
|
95
|
+
clientId: z.string().describe("The OAuth client ID to delete"),
|
|
96
|
+
}),
|
|
97
|
+
handler: async (input) => {
|
|
98
|
+
return apiDelete(`/tailnet/${getTailnet()}/oauth-clients/${encPath(input.clientId)}`);
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
];
|
|
102
|
+
//# sourceMappingURL=oauth-clients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-clients.js","sourceRoot":"","sources":["../../src/tools/oauth-clients.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtF,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE;YACX,KAAK,EAAE,oBAAoB;YAC3B,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,OAAO,MAAM,CAAC,YAAY,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAC1D,CAAC;KACF;IACD;QACE,IAAI,EAAE,4BAA4B;QAClC,WAAW,EAAE,0CAA0C;QACvD,WAAW,EAAE;YACX,KAAK,EAAE,kBAAkB;YACzB,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,QAAQ,EAAE,CAAC,CAAC,MA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D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAA2B,EAAE,EAAE;YAC7C,OAAO,SAAS,CAAC,YAAY,UAAU,EAAE,kBAAkB,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACxF,CAAC;KACF;CACO,CAAC"}
|
package/dist/tools/posture.d.ts
CHANGED
|
@@ -2,11 +2,25 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const postureTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_list_posture_integrations";
|
|
4
4
|
readonly description: "List all device posture integrations configured for your tailnet.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List posture integrations";
|
|
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_get_posture_integration";
|
|
9
16
|
readonly description: "Get details for a specific device posture integration.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Get posture integration";
|
|
19
|
+
readonly readOnlyHint: true;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
10
24
|
readonly inputSchema: z.ZodObject<{
|
|
11
25
|
integrationId: z.ZodString;
|
|
12
26
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -20,6 +34,13 @@ export declare const postureTools: readonly [{
|
|
|
20
34
|
}, {
|
|
21
35
|
readonly name: "tailscale_create_posture_integration";
|
|
22
36
|
readonly description: "Create a new device posture integration.";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Create posture integration";
|
|
39
|
+
readonly readOnlyHint: false;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: false;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
23
44
|
readonly inputSchema: z.ZodObject<{
|
|
24
45
|
provider: z.ZodString;
|
|
25
46
|
clientId: z.ZodString;
|
|
@@ -49,6 +70,13 @@ export declare const postureTools: readonly [{
|
|
|
49
70
|
}, {
|
|
50
71
|
readonly name: "tailscale_update_posture_integration";
|
|
51
72
|
readonly description: "Update an existing posture integration's credentials or configuration.";
|
|
73
|
+
readonly annotations: {
|
|
74
|
+
readonly title: "Update posture integration";
|
|
75
|
+
readonly readOnlyHint: false;
|
|
76
|
+
readonly destructiveHint: false;
|
|
77
|
+
readonly idempotentHint: true;
|
|
78
|
+
readonly openWorldHint: true;
|
|
79
|
+
};
|
|
52
80
|
readonly inputSchema: z.ZodObject<{
|
|
53
81
|
integrationId: z.ZodString;
|
|
54
82
|
clientId: z.ZodOptional<z.ZodString>;
|
|
@@ -78,6 +106,13 @@ export declare const postureTools: readonly [{
|
|
|
78
106
|
}, {
|
|
79
107
|
readonly name: "tailscale_delete_posture_integration";
|
|
80
108
|
readonly description: "Delete a posture integration. This is irreversible.";
|
|
109
|
+
readonly annotations: {
|
|
110
|
+
readonly title: "Delete posture integration";
|
|
111
|
+
readonly readOnlyHint: false;
|
|
112
|
+
readonly destructiveHint: true;
|
|
113
|
+
readonly idempotentHint: true;
|
|
114
|
+
readonly openWorldHint: true;
|
|
115
|
+
};
|
|
81
116
|
readonly inputSchema: z.ZodObject<{
|
|
82
117
|
integrationId: z.ZodString;
|
|
83
118
|
}, "strip", z.ZodTypeAny, {
|
package/dist/tools/posture.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
2
|
+
import { apiDelete, apiGet, apiPatch, apiPost, encPath, getTailnet } from "../api.js";
|
|
3
3
|
export const postureTools = [
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_list_posture_integrations",
|
|
6
6
|
description: "List all device posture integrations configured for your tailnet.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List posture integrations",
|
|
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()}/posture/integrations`);
|
|
@@ -12,6 +19,13 @@ export const postureTools = [
|
|
|
12
19
|
{
|
|
13
20
|
name: "tailscale_get_posture_integration",
|
|
14
21
|
description: "Get details for a specific device posture integration.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Get posture integration",
|
|
24
|
+
readOnlyHint: true,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
15
29
|
inputSchema: z.object({
|
|
16
30
|
integrationId: z.string().describe("The posture integration ID"),
|
|
17
31
|
}),
|
|
@@ -22,6 +36,13 @@ export const postureTools = [
|
|
|
22
36
|
{
|
|
23
37
|
name: "tailscale_create_posture_integration",
|
|
24
38
|
description: "Create a new device posture integration.",
|
|
39
|
+
annotations: {
|
|
40
|
+
title: "Create posture integration",
|
|
41
|
+
readOnlyHint: false,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: false,
|
|
44
|
+
openWorldHint: true,
|
|
45
|
+
},
|
|
25
46
|
inputSchema: z.object({
|
|
26
47
|
provider: z.string().describe("The posture provider (e.g. 'crowdstrike', 'sentinelone', 'intune')"),
|
|
27
48
|
clientId: z.string().describe("The OAuth client ID for the provider"),
|
|
@@ -36,6 +57,13 @@ export const postureTools = [
|
|
|
36
57
|
{
|
|
37
58
|
name: "tailscale_update_posture_integration",
|
|
38
59
|
description: "Update an existing posture integration's credentials or configuration.",
|
|
60
|
+
annotations: {
|
|
61
|
+
title: "Update posture integration",
|
|
62
|
+
readOnlyHint: false,
|
|
63
|
+
destructiveHint: false,
|
|
64
|
+
idempotentHint: true,
|
|
65
|
+
openWorldHint: true,
|
|
66
|
+
},
|
|
39
67
|
inputSchema: z.object({
|
|
40
68
|
integrationId: z.string().describe("The posture integration ID to update"),
|
|
41
69
|
clientId: z.string().optional().describe("Updated OAuth client ID for the provider"),
|
|
@@ -57,6 +85,13 @@ export const postureTools = [
|
|
|
57
85
|
{
|
|
58
86
|
name: "tailscale_delete_posture_integration",
|
|
59
87
|
description: "Delete a posture integration. This is irreversible.",
|
|
88
|
+
annotations: {
|
|
89
|
+
title: "Delete posture integration",
|
|
90
|
+
readOnlyHint: false,
|
|
91
|
+
destructiveHint: true,
|
|
92
|
+
idempotentHint: true,
|
|
93
|
+
openWorldHint: true,
|
|
94
|
+
},
|
|
60
95
|
inputSchema: z.object({
|
|
61
96
|
integrationId: z.string().describe("The posture integration ID to delete"),
|
|
62
97
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"posture.js","sourceRoot":"","sources":["../../src/tools/posture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"posture.js","sourceRoot":"","sources":["../../src/tools/posture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtF,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,qCAAqC;QAC3C,WAAW,EAAE,mEAAmE;QAChF,WAAW,EAAE;YACX,KAAK,EAAE,2BAA2B;YAClC,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI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I,CAAC,EAAE,CAAC;gBAChD,IAAI,KAAK,KAAK,SAAS;oBAAE,SAAS,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;YAClD,CAAC;YACD,OAAO,QAAQ,CAAC,YAAY,UAAU,EAAE,yBAAyB,OAAO,CAAC,aAAa,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QACxG,CAAC;KACF;IACD;QACE,IAAI,EAAE,sCAAsC;QAC5C,WAAW,EAAE,qDAAqD;QAClE,WAAW,EAAE;YACX,KAAK,EAAE,4BAA4B;YACnC,YAAY,EAAE,KAAK;YACnB,eAAe,EAAE,IAAI;YACrB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,sCAAsC,CAAC;SAC3E,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAAgC,EAAE,EAAE;YAClD,OAAO,SAAS,CAAC,YAAY,UAAU,EAAE,yBAAyB,OAAO,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;QACpG,CAAC;KACF;CACO,CAAC"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const serviceTools: readonly [{
|
|
3
|
+
readonly name: "tailscale_list_services";
|
|
4
|
+
readonly description: "List all Tailscale Services in your tailnet. Services provide stable MagicDNS names and virtual IPs, decoupled from individual devices.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "List services";
|
|
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_get_service";
|
|
16
|
+
readonly description: "Get details for a specific Tailscale Service, including its MagicDNS name, virtual IP, and configuration.";
|
|
17
|
+
readonly annotations: {
|
|
18
|
+
readonly title: "Get service";
|
|
19
|
+
readonly readOnlyHint: true;
|
|
20
|
+
readonly destructiveHint: false;
|
|
21
|
+
readonly idempotentHint: true;
|
|
22
|
+
readonly openWorldHint: true;
|
|
23
|
+
};
|
|
24
|
+
readonly inputSchema: z.ZodObject<{
|
|
25
|
+
serviceName: z.ZodString;
|
|
26
|
+
}, "strip", z.ZodTypeAny, {
|
|
27
|
+
serviceName: string;
|
|
28
|
+
}, {
|
|
29
|
+
serviceName: string;
|
|
30
|
+
}>;
|
|
31
|
+
readonly handler: (input: {
|
|
32
|
+
serviceName: string;
|
|
33
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
34
|
+
}, {
|
|
35
|
+
readonly name: "tailscale_update_service";
|
|
36
|
+
readonly description: "Update a Tailscale Service's configuration.";
|
|
37
|
+
readonly annotations: {
|
|
38
|
+
readonly title: "Update service";
|
|
39
|
+
readonly readOnlyHint: false;
|
|
40
|
+
readonly destructiveHint: false;
|
|
41
|
+
readonly idempotentHint: true;
|
|
42
|
+
readonly openWorldHint: true;
|
|
43
|
+
};
|
|
44
|
+
readonly inputSchema: z.ZodObject<{
|
|
45
|
+
serviceName: z.ZodString;
|
|
46
|
+
ports: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
47
|
+
protocol: z.ZodEnum<["tcp", "udp"]>;
|
|
48
|
+
port: z.ZodNumber;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
protocol: "tcp" | "udp";
|
|
51
|
+
port: number;
|
|
52
|
+
}, {
|
|
53
|
+
protocol: "tcp" | "udp";
|
|
54
|
+
port: number;
|
|
55
|
+
}>, "many">>;
|
|
56
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
57
|
+
autoApproveHosts: z.ZodOptional<z.ZodBoolean>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
serviceName: string;
|
|
60
|
+
tags?: string[] | undefined;
|
|
61
|
+
ports?: {
|
|
62
|
+
protocol: "tcp" | "udp";
|
|
63
|
+
port: number;
|
|
64
|
+
}[] | undefined;
|
|
65
|
+
autoApproveHosts?: boolean | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
serviceName: string;
|
|
68
|
+
tags?: string[] | undefined;
|
|
69
|
+
ports?: {
|
|
70
|
+
protocol: "tcp" | "udp";
|
|
71
|
+
port: number;
|
|
72
|
+
}[] | undefined;
|
|
73
|
+
autoApproveHosts?: boolean | undefined;
|
|
74
|
+
}>;
|
|
75
|
+
readonly handler: (input: {
|
|
76
|
+
serviceName: string;
|
|
77
|
+
ports?: {
|
|
78
|
+
protocol: string;
|
|
79
|
+
port: number;
|
|
80
|
+
}[];
|
|
81
|
+
tags?: string[];
|
|
82
|
+
autoApproveHosts?: boolean;
|
|
83
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
84
|
+
}, {
|
|
85
|
+
readonly name: "tailscale_delete_service";
|
|
86
|
+
readonly description: "Delete a Tailscale Service. This is irreversible — the service's MagicDNS name and virtual IP will be released.";
|
|
87
|
+
readonly annotations: {
|
|
88
|
+
readonly title: "Delete service";
|
|
89
|
+
readonly readOnlyHint: false;
|
|
90
|
+
readonly destructiveHint: true;
|
|
91
|
+
readonly idempotentHint: false;
|
|
92
|
+
readonly openWorldHint: true;
|
|
93
|
+
};
|
|
94
|
+
readonly inputSchema: z.ZodObject<{
|
|
95
|
+
serviceName: z.ZodString;
|
|
96
|
+
}, "strip", z.ZodTypeAny, {
|
|
97
|
+
serviceName: string;
|
|
98
|
+
}, {
|
|
99
|
+
serviceName: string;
|
|
100
|
+
}>;
|
|
101
|
+
readonly handler: (input: {
|
|
102
|
+
serviceName: string;
|
|
103
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
104
|
+
}, {
|
|
105
|
+
readonly name: "tailscale_list_service_hosts";
|
|
106
|
+
readonly description: "List devices hosting a specific Tailscale Service.";
|
|
107
|
+
readonly annotations: {
|
|
108
|
+
readonly title: "List service hosts";
|
|
109
|
+
readonly readOnlyHint: true;
|
|
110
|
+
readonly destructiveHint: false;
|
|
111
|
+
readonly idempotentHint: true;
|
|
112
|
+
readonly openWorldHint: true;
|
|
113
|
+
};
|
|
114
|
+
readonly inputSchema: z.ZodObject<{
|
|
115
|
+
serviceName: z.ZodString;
|
|
116
|
+
}, "strip", z.ZodTypeAny, {
|
|
117
|
+
serviceName: string;
|
|
118
|
+
}, {
|
|
119
|
+
serviceName: string;
|
|
120
|
+
}>;
|
|
121
|
+
readonly handler: (input: {
|
|
122
|
+
serviceName: string;
|
|
123
|
+
}) => Promise<import("../api.js").ApiResponse<unknown>>;
|
|
124
|
+
}];
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { apiDelete, apiGet, apiPatch, encPath, getTailnet } from "../api.js";
|
|
3
|
+
export const serviceTools = [
|
|
4
|
+
{
|
|
5
|
+
name: "tailscale_list_services",
|
|
6
|
+
description: "List all Tailscale Services in your tailnet. Services provide stable MagicDNS names and virtual IPs, decoupled from individual devices.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "List services",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
14
|
+
inputSchema: z.object({}),
|
|
15
|
+
handler: async () => {
|
|
16
|
+
return apiGet(`/tailnet/${getTailnet()}/services`);
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "tailscale_get_service",
|
|
21
|
+
description: "Get details for a specific Tailscale Service, including its MagicDNS name, virtual IP, and configuration.",
|
|
22
|
+
annotations: {
|
|
23
|
+
title: "Get service",
|
|
24
|
+
readOnlyHint: true,
|
|
25
|
+
destructiveHint: false,
|
|
26
|
+
idempotentHint: true,
|
|
27
|
+
openWorldHint: true,
|
|
28
|
+
},
|
|
29
|
+
inputSchema: z.object({
|
|
30
|
+
serviceName: z.string().describe("The service name"),
|
|
31
|
+
}),
|
|
32
|
+
handler: async (input) => {
|
|
33
|
+
return apiGet(`/tailnet/${getTailnet()}/services/${encPath(input.serviceName)}`);
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
name: "tailscale_update_service",
|
|
38
|
+
description: "Update a Tailscale Service's configuration.",
|
|
39
|
+
annotations: {
|
|
40
|
+
title: "Update service",
|
|
41
|
+
readOnlyHint: false,
|
|
42
|
+
destructiveHint: false,
|
|
43
|
+
idempotentHint: true,
|
|
44
|
+
openWorldHint: true,
|
|
45
|
+
},
|
|
46
|
+
inputSchema: z.object({
|
|
47
|
+
serviceName: z.string().describe("The service name to update"),
|
|
48
|
+
ports: z
|
|
49
|
+
.array(z.object({
|
|
50
|
+
protocol: z.enum(["tcp", "udp"]).describe("Protocol (tcp or udp)"),
|
|
51
|
+
port: z.number().describe("Port number"),
|
|
52
|
+
}))
|
|
53
|
+
.optional()
|
|
54
|
+
.describe("Ports the service listens on"),
|
|
55
|
+
tags: z.array(z.string()).optional().describe("ACL tags for the service"),
|
|
56
|
+
autoApproveHosts: z
|
|
57
|
+
.boolean()
|
|
58
|
+
.optional()
|
|
59
|
+
.describe("Whether to auto-approve devices that want to host this service"),
|
|
60
|
+
}),
|
|
61
|
+
handler: async (input) => {
|
|
62
|
+
const { serviceName, ...body } = input;
|
|
63
|
+
const cleanBody = {};
|
|
64
|
+
for (const [key, value] of Object.entries(body)) {
|
|
65
|
+
if (value !== undefined)
|
|
66
|
+
cleanBody[key] = value;
|
|
67
|
+
}
|
|
68
|
+
return apiPatch(`/tailnet/${getTailnet()}/services/${encPath(serviceName)}`, cleanBody);
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "tailscale_delete_service",
|
|
73
|
+
description: "Delete a Tailscale Service. This is irreversible — the service's MagicDNS name and virtual IP will be released.",
|
|
74
|
+
annotations: {
|
|
75
|
+
title: "Delete service",
|
|
76
|
+
readOnlyHint: false,
|
|
77
|
+
destructiveHint: true,
|
|
78
|
+
idempotentHint: false,
|
|
79
|
+
openWorldHint: true,
|
|
80
|
+
},
|
|
81
|
+
inputSchema: z.object({
|
|
82
|
+
serviceName: z.string().describe("The service name to delete"),
|
|
83
|
+
}),
|
|
84
|
+
handler: async (input) => {
|
|
85
|
+
return apiDelete(`/tailnet/${getTailnet()}/services/${encPath(input.serviceName)}`);
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: "tailscale_list_service_hosts",
|
|
90
|
+
description: "List devices hosting a specific Tailscale Service.",
|
|
91
|
+
annotations: {
|
|
92
|
+
title: "List service hosts",
|
|
93
|
+
readOnlyHint: true,
|
|
94
|
+
destructiveHint: false,
|
|
95
|
+
idempotentHint: true,
|
|
96
|
+
openWorldHint: true,
|
|
97
|
+
},
|
|
98
|
+
inputSchema: z.object({
|
|
99
|
+
serviceName: z.string().describe("The service name"),
|
|
100
|
+
}),
|
|
101
|
+
handler: async (input) => {
|
|
102
|
+
return apiGet(`/tailnet/${getTailnet()}/services/${encPath(input.serviceName)}/hosts`);
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
];
|
|
106
|
+
//# sourceMappingURL=services.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"services.js","sourceRoot":"","sources":["../../src/tools/services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE7E,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B;QACE,IAAI,EAAE,yBAAyB;QAC/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AC,QAAQ,CAAC,4BAA4B,CAAC;SAC/D,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAA8B,EAAE,EAAE;YAChD,OAAO,SAAS,CAAC,YAAY,UAAU,EAAE,aAAa,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACtF,CAAC;KACF;IACD;QACE,IAAI,EAAE,8BAA8B;QACpC,WAAW,EAAE,oDAAoD;QACjE,WAAW,EAAE;YACX,KAAK,EAAE,oBAAoB;YAC3B,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,KAAK;YACtB,cAAc,EAAE,IAAI;YACpB,aAAa,EAAE,IAAI;SACpB;QACD,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;YACpB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;SACrD,CAAC;QACF,OAAO,EAAE,KAAK,EAAE,KAA8B,EAAE,EAAE;YAChD,OAAO,MAAM,CAAC,YAAY,UAAU,EAAE,aAAa,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACzF,CAAC;KACF;CACO,CAAC"}
|
package/dist/tools/status.d.ts
CHANGED
|
@@ -2,6 +2,13 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const statusTools: readonly [{
|
|
3
3
|
readonly name: "tailscale_status";
|
|
4
4
|
readonly description: "Check that the Tailscale API connection is working. Returns your tailnet name, device count, and confirms authentication is valid. Use this to verify setup.";
|
|
5
|
+
readonly annotations: {
|
|
6
|
+
readonly title: "Check API status";
|
|
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<{
|
|
7
14
|
devices: unknown[];
|
package/dist/tools/status.js
CHANGED
|
@@ -4,6 +4,13 @@ export const statusTools = [
|
|
|
4
4
|
{
|
|
5
5
|
name: "tailscale_status",
|
|
6
6
|
description: "Check that the Tailscale API connection is working. Returns your tailnet name, device count, and confirms authentication is valid. Use this to verify setup.",
|
|
7
|
+
annotations: {
|
|
8
|
+
title: "Check API status",
|
|
9
|
+
readOnlyHint: true,
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
idempotentHint: true,
|
|
12
|
+
openWorldHint: true,
|
|
13
|
+
},
|
|
7
14
|
inputSchema: z.object({}),
|
|
8
15
|
handler: async () => {
|
|
9
16
|
const [devicesRes, settingsRes] = await Promise.all([
|
package/dist/tools/status.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/tools/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAE/C,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,8JAA8J;QAChK,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC;QACzB,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,CAAC,UAAU,EAAE,WAAW,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;gBAClD,MAAM,CAAyB,YAAY,UAAU,EAAE,oBAAoB,CAAC;gBAC5E,MAAM,CAA0B,YAAY,UAAU,EAAE,WAAW,CAAC;aACrE,CAAC,CAAC;YAEH,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;gBACnB,OAAO,UAAU,CAAC;YACpB,CAAC;YACD,MAAM,WAAW,GAAG,UAAU,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC,CAAC;YAE1D,OAAO;gBACL,EAAE,EAAE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