@owine/unifi-network-mcp 2.0.1 → 2.0.2
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/dist/tools/acl.js +107 -79
- package/dist/tools/clients.js +75 -59
- package/dist/tools/devices.js +95 -63
- package/dist/tools/dns-policies.js +77 -57
- package/dist/tools/firewall.js +200 -148
- package/dist/tools/hotspot.js +123 -103
- package/dist/tools/networks.js +106 -82
- package/dist/tools/sites.js +23 -19
- package/dist/tools/supporting.js +185 -153
- package/dist/tools/system.js +5 -1
- package/dist/tools/traffic-matching.js +83 -63
- package/dist/tools/wifi.js +84 -64
- package/package.json +4 -4
package/dist/tools/hotspot.js
CHANGED
|
@@ -6,28 +6,32 @@ const responses_js_1 = require("../utils/responses.js");
|
|
|
6
6
|
const query_js_1 = require("../utils/query.js");
|
|
7
7
|
const safety_js_1 = require("../utils/safety.js");
|
|
8
8
|
function registerHotspotTools(server, client, readOnly = false) {
|
|
9
|
-
server.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
9
|
+
server.registerTool("unifi_list_vouchers", {
|
|
10
|
+
description: "List all hotspot vouchers at a site",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
13
|
+
offset: zod_1.z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.nonnegative()
|
|
17
|
+
.optional()
|
|
18
|
+
.default(0)
|
|
19
|
+
.describe("Number of records to skip (default: 0)"),
|
|
20
|
+
limit: zod_1.z
|
|
21
|
+
.number()
|
|
22
|
+
.int()
|
|
23
|
+
.min(1)
|
|
24
|
+
.max(1000)
|
|
25
|
+
.optional()
|
|
26
|
+
.default(100)
|
|
27
|
+
.describe("Number of records to return (default: 100, max: 1000)"),
|
|
28
|
+
filter: zod_1.z
|
|
29
|
+
.string()
|
|
30
|
+
.optional()
|
|
31
|
+
.describe("Filter expression (e.g., 'expired.eq(true)')"),
|
|
32
|
+
},
|
|
33
|
+
annotations: safety_js_1.READ_ONLY,
|
|
34
|
+
}, async ({ siteId, offset, limit, filter }) => {
|
|
31
35
|
try {
|
|
32
36
|
const query = (0, query_js_1.buildQuery)({ offset, limit, filter });
|
|
33
37
|
const data = await client.get(`/sites/${siteId}/hotspot/vouchers${query}`);
|
|
@@ -37,10 +41,14 @@ function registerHotspotTools(server, client, readOnly = false) {
|
|
|
37
41
|
return (0, responses_js_1.formatError)(err);
|
|
38
42
|
}
|
|
39
43
|
});
|
|
40
|
-
server.
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
server.registerTool("unifi_get_voucher", {
|
|
45
|
+
description: "Get a specific hotspot voucher by ID",
|
|
46
|
+
inputSchema: {
|
|
47
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
48
|
+
voucherId: zod_1.z.string().describe("Voucher ID"),
|
|
49
|
+
},
|
|
50
|
+
annotations: safety_js_1.READ_ONLY,
|
|
51
|
+
}, async ({ siteId, voucherId }) => {
|
|
44
52
|
try {
|
|
45
53
|
const data = await client.get(`/sites/${siteId}/hotspot/vouchers/${voucherId}`);
|
|
46
54
|
return (0, responses_js_1.formatSuccess)(data);
|
|
@@ -51,57 +59,61 @@ function registerHotspotTools(server, client, readOnly = false) {
|
|
|
51
59
|
});
|
|
52
60
|
if (readOnly)
|
|
53
61
|
return;
|
|
54
|
-
server.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.string()
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
.
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
.
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
|
|
104
|
-
|
|
62
|
+
server.registerTool("unifi_create_voucher", {
|
|
63
|
+
description: "Create hotspot vouchers",
|
|
64
|
+
inputSchema: {
|
|
65
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
66
|
+
name: zod_1.z
|
|
67
|
+
.string()
|
|
68
|
+
.describe("Voucher note/name (duplicated across all generated vouchers)"),
|
|
69
|
+
timeLimitMinutes: zod_1.z
|
|
70
|
+
.number()
|
|
71
|
+
.int()
|
|
72
|
+
.min(1)
|
|
73
|
+
.max(1000000)
|
|
74
|
+
.describe("How long the voucher provides access (1-1000000 minutes)"),
|
|
75
|
+
count: zod_1.z
|
|
76
|
+
.number()
|
|
77
|
+
.int()
|
|
78
|
+
.min(1)
|
|
79
|
+
.max(1000)
|
|
80
|
+
.optional()
|
|
81
|
+
.default(1)
|
|
82
|
+
.describe("Number of vouchers to create (1-1000, default: 1)"),
|
|
83
|
+
authorizedGuestLimit: zod_1.z
|
|
84
|
+
.number()
|
|
85
|
+
.int()
|
|
86
|
+
.min(1)
|
|
87
|
+
.optional()
|
|
88
|
+
.describe("How many guests can use this voucher"),
|
|
89
|
+
dataUsageLimitMBytes: zod_1.z
|
|
90
|
+
.number()
|
|
91
|
+
.int()
|
|
92
|
+
.min(1)
|
|
93
|
+
.max(1048576)
|
|
94
|
+
.optional()
|
|
95
|
+
.describe("Data usage limit in megabytes (1-1048576)"),
|
|
96
|
+
rxRateLimitKbps: zod_1.z
|
|
97
|
+
.number()
|
|
98
|
+
.int()
|
|
99
|
+
.min(2)
|
|
100
|
+
.max(100000)
|
|
101
|
+
.optional()
|
|
102
|
+
.describe("Download rate limit in kbps (2-100000)"),
|
|
103
|
+
txRateLimitKbps: zod_1.z
|
|
104
|
+
.number()
|
|
105
|
+
.int()
|
|
106
|
+
.min(2)
|
|
107
|
+
.max(100000)
|
|
108
|
+
.optional()
|
|
109
|
+
.describe("Upload rate limit in kbps (2-100000)"),
|
|
110
|
+
dryRun: zod_1.z
|
|
111
|
+
.boolean()
|
|
112
|
+
.optional()
|
|
113
|
+
.describe("Preview this action without executing it"),
|
|
114
|
+
},
|
|
115
|
+
annotations: safety_js_1.WRITE_NOT_IDEMPOTENT,
|
|
116
|
+
}, async ({ siteId, name, timeLimitMinutes, count, authorizedGuestLimit, dataUsageLimitMBytes, rxRateLimitKbps, txRateLimitKbps, dryRun, }) => {
|
|
105
117
|
try {
|
|
106
118
|
const body = {
|
|
107
119
|
name,
|
|
@@ -126,18 +138,22 @@ function registerHotspotTools(server, client, readOnly = false) {
|
|
|
126
138
|
return (0, responses_js_1.formatError)(err);
|
|
127
139
|
}
|
|
128
140
|
});
|
|
129
|
-
server.
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.
|
|
134
|
-
.
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
+
server.registerTool("unifi_delete_voucher", {
|
|
142
|
+
description: "DESTRUCTIVE: Delete a hotspot voucher",
|
|
143
|
+
inputSchema: {
|
|
144
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
145
|
+
voucherId: zod_1.z.string().describe("Voucher ID"),
|
|
146
|
+
confirm: zod_1.z
|
|
147
|
+
.boolean()
|
|
148
|
+
.optional()
|
|
149
|
+
.describe("Must be true to execute this destructive action"),
|
|
150
|
+
dryRun: zod_1.z
|
|
151
|
+
.boolean()
|
|
152
|
+
.optional()
|
|
153
|
+
.describe("Preview this action without executing it"),
|
|
154
|
+
},
|
|
155
|
+
annotations: safety_js_1.DESTRUCTIVE,
|
|
156
|
+
}, async ({ siteId, voucherId, confirm, dryRun }) => {
|
|
141
157
|
const guard = (0, safety_js_1.requireConfirmation)(confirm, "This will permanently delete the voucher");
|
|
142
158
|
if (guard)
|
|
143
159
|
return guard;
|
|
@@ -152,20 +168,24 @@ function registerHotspotTools(server, client, readOnly = false) {
|
|
|
152
168
|
return (0, responses_js_1.formatError)(err);
|
|
153
169
|
}
|
|
154
170
|
});
|
|
155
|
-
server.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
.string()
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
.
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
.
|
|
167
|
-
|
|
168
|
-
|
|
171
|
+
server.registerTool("unifi_bulk_delete_vouchers", {
|
|
172
|
+
description: "DESTRUCTIVE: Bulk delete hotspot vouchers based on filter criteria",
|
|
173
|
+
inputSchema: {
|
|
174
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
175
|
+
filter: zod_1.z
|
|
176
|
+
.string()
|
|
177
|
+
.describe("Required filter expression (e.g., 'expired.eq(true)', 'name.like(guest*)')"),
|
|
178
|
+
confirm: zod_1.z
|
|
179
|
+
.boolean()
|
|
180
|
+
.optional()
|
|
181
|
+
.describe("Must be true to execute this destructive action"),
|
|
182
|
+
dryRun: zod_1.z
|
|
183
|
+
.boolean()
|
|
184
|
+
.optional()
|
|
185
|
+
.describe("Preview this action without executing it"),
|
|
186
|
+
},
|
|
187
|
+
annotations: safety_js_1.DESTRUCTIVE,
|
|
188
|
+
}, async ({ siteId, filter, confirm, dryRun }) => {
|
|
169
189
|
try {
|
|
170
190
|
const guard = (0, safety_js_1.requireConfirmation)(confirm, "This will delete all vouchers matching the filter");
|
|
171
191
|
if (guard)
|
package/dist/tools/networks.js
CHANGED
|
@@ -6,26 +6,30 @@ const responses_js_1 = require("../utils/responses.js");
|
|
|
6
6
|
const query_js_1 = require("../utils/query.js");
|
|
7
7
|
const safety_js_1 = require("../utils/safety.js");
|
|
8
8
|
function registerNetworkTools(server, client, readOnly = false) {
|
|
9
|
-
server.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.
|
|
27
|
-
|
|
28
|
-
|
|
9
|
+
server.registerTool("unifi_list_networks", {
|
|
10
|
+
description: "List all networks at a site",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
13
|
+
offset: zod_1.z
|
|
14
|
+
.number()
|
|
15
|
+
.int()
|
|
16
|
+
.nonnegative()
|
|
17
|
+
.optional()
|
|
18
|
+
.describe("Number of records to skip (default: 0)"),
|
|
19
|
+
limit: zod_1.z
|
|
20
|
+
.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(1)
|
|
23
|
+
.max(200)
|
|
24
|
+
.optional()
|
|
25
|
+
.describe("Number of records to return (default: 25, max: 200)"),
|
|
26
|
+
filter: zod_1.z
|
|
27
|
+
.string()
|
|
28
|
+
.optional()
|
|
29
|
+
.describe("Filter expression"),
|
|
30
|
+
},
|
|
31
|
+
annotations: safety_js_1.READ_ONLY,
|
|
32
|
+
}, async ({ siteId, offset, limit, filter }) => {
|
|
29
33
|
try {
|
|
30
34
|
const query = (0, query_js_1.buildQuery)({ offset, limit, filter });
|
|
31
35
|
const data = await client.get(`/sites/${siteId}/networks${query}`);
|
|
@@ -35,10 +39,14 @@ function registerNetworkTools(server, client, readOnly = false) {
|
|
|
35
39
|
return (0, responses_js_1.formatError)(err);
|
|
36
40
|
}
|
|
37
41
|
});
|
|
38
|
-
server.
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
server.registerTool("unifi_get_network", {
|
|
43
|
+
description: "Get a specific network by ID",
|
|
44
|
+
inputSchema: {
|
|
45
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
46
|
+
networkId: zod_1.z.string().describe("Network ID"),
|
|
47
|
+
},
|
|
48
|
+
annotations: safety_js_1.READ_ONLY,
|
|
49
|
+
}, async ({ siteId, networkId }) => {
|
|
42
50
|
try {
|
|
43
51
|
const data = await client.get(`/sites/${siteId}/networks/${networkId}`);
|
|
44
52
|
return (0, responses_js_1.formatSuccess)(data);
|
|
@@ -47,10 +55,14 @@ function registerNetworkTools(server, client, readOnly = false) {
|
|
|
47
55
|
return (0, responses_js_1.formatError)(err);
|
|
48
56
|
}
|
|
49
57
|
});
|
|
50
|
-
server.
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
server.registerTool("unifi_get_network_references", {
|
|
59
|
+
description: "Get references to a network (what WiFi broadcasts, firewall zones, etc. use this network)",
|
|
60
|
+
inputSchema: {
|
|
61
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
62
|
+
networkId: zod_1.z.string().describe("Network ID"),
|
|
63
|
+
},
|
|
64
|
+
annotations: safety_js_1.READ_ONLY,
|
|
65
|
+
}, async ({ siteId, networkId }) => {
|
|
54
66
|
try {
|
|
55
67
|
const data = await client.get(`/sites/${siteId}/networks/${networkId}/references`);
|
|
56
68
|
return (0, responses_js_1.formatSuccess)(data);
|
|
@@ -61,24 +73,28 @@ function registerNetworkTools(server, client, readOnly = false) {
|
|
|
61
73
|
});
|
|
62
74
|
if (readOnly)
|
|
63
75
|
return;
|
|
64
|
-
server.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
.
|
|
73
|
-
.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
server.registerTool("unifi_create_network", {
|
|
77
|
+
description: "Create a new network",
|
|
78
|
+
inputSchema: {
|
|
79
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
80
|
+
name: zod_1.z.string().describe("Network name"),
|
|
81
|
+
management: zod_1.z
|
|
82
|
+
.enum(["UNMANAGED", "GATEWAY", "SWITCH"])
|
|
83
|
+
.describe("Network management type"),
|
|
84
|
+
enabled: zod_1.z.boolean().describe("Enable the network"),
|
|
85
|
+
vlanId: zod_1.z
|
|
86
|
+
.number()
|
|
87
|
+
.int()
|
|
88
|
+
.min(1)
|
|
89
|
+
.max(4009)
|
|
90
|
+
.describe("VLAN ID (1 for default, 2+ for additional)"),
|
|
91
|
+
dryRun: zod_1.z
|
|
92
|
+
.boolean()
|
|
93
|
+
.optional()
|
|
94
|
+
.describe("Preview this action without executing it"),
|
|
95
|
+
},
|
|
96
|
+
annotations: safety_js_1.WRITE_NOT_IDEMPOTENT,
|
|
97
|
+
}, async ({ siteId, name, management, enabled, vlanId, dryRun }) => {
|
|
82
98
|
try {
|
|
83
99
|
const body = { name, management, enabled, vlanId };
|
|
84
100
|
if (dryRun)
|
|
@@ -90,25 +106,29 @@ function registerNetworkTools(server, client, readOnly = false) {
|
|
|
90
106
|
return (0, responses_js_1.formatError)(err);
|
|
91
107
|
}
|
|
92
108
|
});
|
|
93
|
-
server.
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
.
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
.
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
.
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
server.registerTool("unifi_update_network", {
|
|
110
|
+
description: "Update an existing network",
|
|
111
|
+
inputSchema: {
|
|
112
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
113
|
+
networkId: zod_1.z.string().describe("Network ID"),
|
|
114
|
+
name: zod_1.z.string().describe("Network name"),
|
|
115
|
+
management: zod_1.z
|
|
116
|
+
.enum(["UNMANAGED", "GATEWAY", "SWITCH"])
|
|
117
|
+
.describe("Network management type"),
|
|
118
|
+
enabled: zod_1.z.boolean().describe("Enable the network"),
|
|
119
|
+
vlanId: zod_1.z
|
|
120
|
+
.number()
|
|
121
|
+
.int()
|
|
122
|
+
.min(1)
|
|
123
|
+
.max(4009)
|
|
124
|
+
.describe("VLAN ID (1-4009)"),
|
|
125
|
+
dryRun: zod_1.z
|
|
126
|
+
.boolean()
|
|
127
|
+
.optional()
|
|
128
|
+
.describe("Preview this action without executing it"),
|
|
129
|
+
},
|
|
130
|
+
annotations: safety_js_1.WRITE,
|
|
131
|
+
}, async ({ siteId, networkId, name, management, enabled, vlanId, dryRun }) => {
|
|
112
132
|
try {
|
|
113
133
|
const body = { name, management, enabled, vlanId };
|
|
114
134
|
if (dryRun)
|
|
@@ -120,23 +140,27 @@ function registerNetworkTools(server, client, readOnly = false) {
|
|
|
120
140
|
return (0, responses_js_1.formatError)(err);
|
|
121
141
|
}
|
|
122
142
|
});
|
|
123
|
-
server.
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
.
|
|
128
|
-
.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
.
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
.
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
server.registerTool("unifi_delete_network", {
|
|
144
|
+
description: "DESTRUCTIVE: Delete a network — all clients on this network will be disconnected",
|
|
145
|
+
inputSchema: {
|
|
146
|
+
siteId: zod_1.z.string().describe("Site ID"),
|
|
147
|
+
networkId: zod_1.z.string().describe("Network ID"),
|
|
148
|
+
force: zod_1.z
|
|
149
|
+
.boolean()
|
|
150
|
+
.optional()
|
|
151
|
+
.default(false)
|
|
152
|
+
.describe("Force delete (default: false)"),
|
|
153
|
+
confirm: zod_1.z
|
|
154
|
+
.boolean()
|
|
155
|
+
.optional()
|
|
156
|
+
.describe("Must be true to execute this destructive action"),
|
|
157
|
+
dryRun: zod_1.z
|
|
158
|
+
.boolean()
|
|
159
|
+
.optional()
|
|
160
|
+
.describe("Preview this action without executing it"),
|
|
161
|
+
},
|
|
162
|
+
annotations: safety_js_1.DESTRUCTIVE,
|
|
163
|
+
}, async ({ siteId, networkId, force, confirm, dryRun }) => {
|
|
140
164
|
const guard = (0, safety_js_1.requireConfirmation)(confirm, "This will delete the network and disconnect all clients on it");
|
|
141
165
|
if (guard)
|
|
142
166
|
return guard;
|
package/dist/tools/sites.js
CHANGED
|
@@ -6,25 +6,29 @@ const responses_js_1 = require("../utils/responses.js");
|
|
|
6
6
|
const query_js_1 = require("../utils/query.js");
|
|
7
7
|
const safety_js_1 = require("../utils/safety.js");
|
|
8
8
|
function registerSiteTools(server, client) {
|
|
9
|
-
server.
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
9
|
+
server.registerTool("unifi_list_sites", {
|
|
10
|
+
description: "List all sites available to the API key",
|
|
11
|
+
inputSchema: {
|
|
12
|
+
offset: zod_1.z
|
|
13
|
+
.number()
|
|
14
|
+
.int()
|
|
15
|
+
.nonnegative()
|
|
16
|
+
.optional()
|
|
17
|
+
.describe("Number of records to skip (default: 0)"),
|
|
18
|
+
limit: zod_1.z
|
|
19
|
+
.number()
|
|
20
|
+
.int()
|
|
21
|
+
.min(1)
|
|
22
|
+
.max(200)
|
|
23
|
+
.optional()
|
|
24
|
+
.describe("Number of records to return (default: 25, max: 200)"),
|
|
25
|
+
filter: zod_1.z
|
|
26
|
+
.string()
|
|
27
|
+
.optional()
|
|
28
|
+
.describe("Filter expression (e.g., 'name.like(office*)')"),
|
|
29
|
+
},
|
|
30
|
+
annotations: safety_js_1.READ_ONLY,
|
|
31
|
+
}, async ({ offset, limit, filter }) => {
|
|
28
32
|
try {
|
|
29
33
|
const query = (0, query_js_1.buildQuery)({ offset, limit, filter });
|
|
30
34
|
const data = await client.get(`/sites${query}`);
|