@xano/developer-mcp 2.2.4 → 2.2.6-beta.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.
@@ -0,0 +1,395 @@
1
+ ---
2
+ applyTo: "realtime_server/**/*.xs, channel/**/*.xs, message/**/*.xs, channel_trigger/**/*.xs, realtime_server_trigger/**/*.xs"
3
+ ---
4
+
5
+ # Realtime V2
6
+
7
+ > **TL;DR:** V2 uses `realtime_server` → `channel` → `message`. Clients join resolved paths over `/ws/<server-canonical>` and invoke a message with `action: "broadcast"`. Xano stacks publish with `realtime.publish`. Legacy `realtime_channel`, `realtime_trigger`, `/rt/`, and `api.realtime_event` target a different system.
8
+
9
+ ## Quick Reference
10
+
11
+ | Need | V2 syntax or behavior |
12
+ |------|-----------------------|
13
+ | Create a server | `realtime_server docs_realtime { ... }` |
14
+ | Define a channel template | `channel "rooms/{room_id}"` with `realtime_server = "docs_realtime"` and `input { int room_id }` |
15
+ | Define a client-invoked handler | `message send` with `realtime_server`, `channel`, `input`, `stack`, `response` |
16
+ | Receive everyone’s messages | `deliver_to = "channel"` |
17
+ | Reply only to caller | `deliver_to = "sender"` |
18
+ | Exclude caller | `deliver_to = "others"` |
19
+ | Require a user JWT | `auth = "user"` on the message; `user` must be an auth-enabled table |
20
+ | Inspect socket context | `realtime.get_session as $session` |
21
+ | Publish from an API/function/task | `realtime.publish { realtime_server = "docs_realtime" ... }`; no `as` binding |
22
+ | Veto a channel join | `channel_trigger` with `actions = {join: true}` and `response = {allowed: <boolean>, reason: <text>}` |
23
+
24
+ **Prerequisite:** the instance must have the V2 WebSocket service and `/ws/` route enabled. A successful XanoScript import or publish API response does not prove socket delivery. If a WebSocket upgrade returns HTML instead of HTTP 101, check instance deployment before changing channel code.
25
+
26
+ ## Server, Channel, and Message
27
+
28
+ Create one declaration per `.xs` file. The examples below are also in the source repository’s `examples/realtime-v2/` directory. They are not included in the npm package; copy the definitions below into your own files when using the installed MCP.
29
+
30
+ ### Server
31
+
32
+ ```xs
33
+ realtime_server docs_realtime {
34
+ canonical = "67Dx5RNL"
35
+ active = true
36
+ }
37
+ ```
38
+
39
+ Use a unique `canonical` when creating your own server, or omit it once and pull the generated value. **Preserve the pulled canonical on subsequent pushes.** Omitting it on an update can change the connection address and cause existing clients to receive `Unknown connection hash`. The canonical shown here is illustrative; use your own server’s value.
40
+
41
+ Server references inside XanoScript use the **name**, `docs_realtime`. WebSocket URLs use the **canonical**, not the name.
42
+
43
+ ### Channel
44
+
45
+ ```xs
46
+ channel "rooms/{room_id}" {
47
+ realtime_server = "docs_realtime"
48
+ access = {anonymous: true, presence: false}
49
+ publish = {who: "anyone", direct: false}
50
+ delivery = {guarantee: "at_most_once", per_recipient: false}
51
+ input {
52
+ int room_id
53
+ }
54
+ }
55
+ ```
56
+
57
+ The declaration names the template `rooms/{room_id}`; a client joins a resolved path such as `rooms/42`. Declare each path parameter in the channel's input block. The example permits anonymous clients and client publishing for a test room. These are independent controls:
58
+
59
+ | Clause | Meaning |
60
+ |--------|---------|
61
+ | `access.anonymous` | Whether unauthenticated clients may join |
62
+ | `access.presence` | Whether clients receive presence information |
63
+ | `publish.who` | `nobody`, `anyone`, or `authenticated` may publish |
64
+ | `publish.direct` | Whether clients may address other clients directly |
65
+ | `delivery.guarantee` | The example uses `at_most_once`; delivery may be lost |
66
+
67
+ A room path separates subscriptions; knowing a path is not authorization. Use access policy and a join trigger for restricted rooms.
68
+
69
+ ### Message handler
70
+
71
+ ```xs
72
+ message send {
73
+ realtime_server = "docs_realtime"
74
+ channel = "rooms/{room_id}"
75
+ deliver_to = "channel"
76
+ input {
77
+ text author
78
+ text body
79
+ }
80
+ stack {
81
+ var $sent_at { value = now }
82
+ }
83
+ response = {author: $input.author, body: $input.body, sent_at: $sent_at}
84
+ }
85
+ ```
86
+
87
+ A client invokes `send` with `{author: "Alice", body: "Hello"}`. The server executes the stack and delivers the **response**, including the computed `sent_at`, to subscribed clients. `author` is user-supplied display text in this anonymous demo, not an authenticated identity.
88
+
89
+ The required parent references are the server name and channel **template**. `input`, `stack`, and `response` are required. Message payloads are validated against the input schema; for example, `int count` rejects `"not-an-integer"` with an error frame to the sender.
90
+
91
+ ### Sender-only response and session context
92
+
93
+ ```xs
94
+ message echo {
95
+ realtime_server = "docs_realtime"
96
+ channel = "rooms/{room_id}"
97
+ deliver_to = "sender"
98
+ input {
99
+ text body
100
+ }
101
+ stack {
102
+ realtime.get_session as $session
103
+ }
104
+ response = {body: $input.body, session: $session}
105
+ }
106
+ ```
107
+
108
+ `realtime.get_session` exposes `authenticated`, `client_id`, `dbo_id`, `socket_id`, `channel`, `params`, `extras`, and `opened_at`. For an anonymous client in `rooms/42`, the observed session has `authenticated: false`, `client_id: ""`, `dbo_id: 0`, and `channel: "rooms/42"`.
109
+
110
+ **Path values in the join acknowledgement and `$session.params` were strings** (`{room_id: "42"}`), even though the channel declared `int room_id`. Do not assume these transport/session objects contain already-coerced numbers. Validate or convert them before numeric comparisons or database use.
111
+
112
+ `deliver_to = "others"` delivers to the other subscribers and excludes the caller. The parser also accepts `explicit`; this guide does not prescribe a recipient-selection API for that mode.
113
+
114
+ ## Publish from an API
115
+
116
+ Create the `docs_audit` API group shown in the middleware topic, then add:
117
+
118
+ ```xs
119
+ query publish verb=POST {
120
+ api_group = "docs_audit"
121
+ input {
122
+ int room_id
123
+ text body
124
+ }
125
+ stack {
126
+ realtime.publish {
127
+ realtime_server = "docs_realtime"
128
+ channel = "rooms/" ~ $input.room_id
129
+ message = "announcement"
130
+ data = {body: $input.body}
131
+ }
132
+ }
133
+ response = {ok: true}
134
+ }
135
+ ```
136
+
137
+ POST `{ "room_id": 42, "body": "Hello from Xano" }` to `/api:<api-group-canonical>/publish`. Both connected clients in `rooms/42` should receive a frame with `action: "message"`, `type: "announcement"`, and the supplied body in `payload`.
138
+
139
+ | Attribute | Required | Meaning |
140
+ |-----------|----------|---------|
141
+ | `realtime_server` | Yes | Server name |
142
+ | `channel` | Yes | Resolved channel path |
143
+ | `data` | Yes | Payload to deliver |
144
+ | `message` | No | Delivered frame's `type`; does not invoke a handler |
145
+ | `auth_table`, `auth_id` | No | Identity attribution only; does not authenticate or authorize |
146
+
147
+ `realtime.publish` has no result binding and does not invoke the message handler named by `message`; the `announcement` type above has no handler. Wait for actual incoming frames to verify delivery. A `200 {ok: true}` response alone only confirms the API execution.
148
+
149
+ For an application endpoint, authorize the caller and their access to the target resource before publishing. This anonymous endpoint exists to exercise the demo.
150
+
151
+ ## Publish in the visual editor
152
+
153
+ In a function stack, add **Realtime Publish** from **APIs & Lambdas**, or search for it by name. It is the visual editor equivalent of `realtime.publish`.
154
+
155
+ | Panel field | XanoScript | What to enter |
156
+ | --- | --- | --- |
157
+ | **Realtime Server** | `realtime_server` | Server name, such as `docs_realtime`; not its WebSocket canonical |
158
+ | **Channel** | `channel` | Resolved path, such as `rooms/42` |
159
+ | **Message** (optional) | `message` | Outgoing frame's `type`, such as `announcement` |
160
+ | **Data** | `data` | Payload delivered to subscribers |
161
+ | **Authentication → Database** (optional) | `auth_table` | Table used for identity attribution |
162
+ | **Authentication → Row ID** (optional) | `auth_id` | Attributed record ID; shown after selecting a database |
163
+
164
+ Realtime Server and Channel accept constants, variables, and expressions. Autocomplete offers workspace server names and channel templates as suggestions; it does not restrict values to that list. Resolve a template such as `rooms/{room_id}` to `rooms/42` before publishing. A channel path belongs to a particular server, so supply both fields. If suggestions fail to load, you can still enter the values directly.
165
+
166
+ **Message does not invoke a message handler.** Publishing with `message = "send"` delivers your Data as-is with `type: "send"`; it does not run the `send` handler's input validation, function stack, or per-message authentication. Authorize the calling API or stack before publishing. The optional Authentication fields attach identity metadata only; they do not validate credentials or grant access.
167
+
168
+ ### Availability and version choice
169
+
170
+ **Realtime Publish** requires Realtime V2 support on the instance. In the picker category and search results, it is greyed out with an explanation when V2 is unavailable. An empty autocomplete list is a separate issue and does not mean V2 is disabled.
171
+
172
+ **Realtime Event (v1)** remains available for legacy connections. Its XanoScript statement is `api.realtime_event`. It cannot reach V2 subscribers and can complete without an error while delivering nothing to them. Do not substitute it when Realtime Publish is unavailable; check V2 availability on the instance instead.
173
+
174
+ For raw process-stack integrations, V2 is `mvp:realtime_publish` (`EProcessFunctionType.RealtimePublish`); V1 is `mvp:realtime_event`. These internal identifiers are not XanoScript syntax. Existing statements remain editable; adding a statement is not evidence that socket delivery is available.
175
+
176
+ ## Native WebSocket Client
177
+
178
+ The V2 URL is `wss://<instance-host>/ws/<server-canonical>`. Use the V2 server's canonical, not the workspace's legacy realtime canonical. A user JWT is carried as the WebSocket subprotocol: `new WebSocket(url, [userJwt])`. Do not put a Metadata API access token in frontend code.
179
+
180
+ The following module is shared verbatim with the live demo and verification script. It waits for the join acknowledgement, retries the specific initial readiness error, sends keepalive pings, and closes timers with the socket.
181
+
182
+ ```javascript
183
+ // Native Realtime V2 protocol. Shared by the demo and the live verification.
184
+ export function connectClient({url, channel, token, onFrame = () => {}, onState = () => {}}) {
185
+ const socket = token ? new WebSocket(url, [token]) : new WebSocket(url);
186
+ let joined = false, attempts = 0, retry, heartbeat, deadline;
187
+ let resolveReady, rejectReady;
188
+ const ready = new Promise((resolve, reject) => { resolveReady = resolve; rejectReady = reject; });
189
+ const send = frame => {
190
+ if (socket.readyState !== WebSocket.OPEN) throw new Error('Socket is not open');
191
+ socket.send(JSON.stringify(frame));
192
+ };
193
+ const clear = () => { clearTimeout(retry); clearTimeout(deadline); clearInterval(heartbeat); };
194
+ const join = () => {
195
+ if (socket.readyState !== WebSocket.OPEN || joined) return;
196
+ attempts++;
197
+ send({action: 'join', channel});
198
+ };
199
+ deadline = setTimeout(() => {
200
+ rejectReady(new Error('Timed out joining the V2 channel'));
201
+ clear(); socket.close();
202
+ }, 10000);
203
+ socket.addEventListener('open', () => { onState('Joining'); join(); });
204
+ socket.addEventListener('message', event => {
205
+ let frame;
206
+ try { frame = JSON.parse(event.data); } catch { return; }
207
+ onFrame(frame);
208
+ if (!joined && frame.action === 'error') {
209
+ if (frame.payload?.message === 'Connection is not ready' && attempts < 10) {
210
+ clearTimeout(retry); retry = setTimeout(join, 250);
211
+ } else {
212
+ rejectReady(new Error(frame.payload?.message || 'Join refused'));
213
+ clear(); socket.close();
214
+ }
215
+ }
216
+ if (frame.action === 'join' && frame.channel === channel && frame.payload?.joined) {
217
+ joined = true; clearTimeout(retry); clearTimeout(deadline);
218
+ heartbeat = setInterval(() => { if (socket.readyState === WebSocket.OPEN) send({action:'ping'}); }, 20000);
219
+ onState('Joined'); resolveReady(frame);
220
+ }
221
+ });
222
+ socket.addEventListener('error', () => {
223
+ rejectReady(new Error('WebSocket connection failed. Check the V2 /ws/ route and server canonical.'));
224
+ });
225
+ socket.addEventListener('close', event => {
226
+ clear(); joined = false; onState('Offline');
227
+ rejectReady(new Error(`Connection closed (${event.code})`));
228
+ });
229
+ return {
230
+ ready, socket,
231
+ get joined() { return joined; },
232
+ broadcast(type, payload) {
233
+ if (!joined) throw new Error('Join the channel before publishing');
234
+ send({action: 'broadcast', channel, type, payload});
235
+ },
236
+ send,
237
+ close() { clear(); socket.close(); }
238
+ };
239
+ }
240
+ ```
241
+
242
+ Save that module as `socket.js`, then use it as follows. The address shape is `wss://{instance-host}/ws/{server-canonical}`; the filled-in example below is illustrative. Replace it with your own server address:
243
+
244
+ ```javascript
245
+ import {connectClient} from "./socket.js";
246
+
247
+ const client = connectClient({
248
+ url: "wss://x8ki-letl-twmt.n7.xano.io/ws/67Dx5RNL",
249
+ channel: "rooms/42",
250
+ onFrame(frame) {
251
+ if (frame.action === "message") {
252
+ console.log(frame.type, frame.payload);
253
+ }
254
+ }
255
+ });
256
+
257
+ try {
258
+ await client.ready;
259
+ client.broadcast("send", {author: "Alice", body: "Hello"});
260
+ } catch (error) {
261
+ client.close();
262
+ console.error(error);
263
+ }
264
+ ```
265
+
266
+ Call `client.close()` when the page or component stops using the connection. The demo does this on `pagehide`. A closed connection must join again after reconnecting.
267
+
268
+ ### Wire frames
269
+
270
+ | Direction | Example |
271
+ |-----------|---------|
272
+ | Client → server, join | `{ "action": "join", "channel": "rooms/42" }` |
273
+ | Server → client, joined | `{ "action": "join", "channel": "rooms/42", "payload": { "joined": true, "params": { "room_id": "42" } } }` |
274
+ | Client → server, invoke | `{ "action": "broadcast", "channel": "rooms/42", "type": "send", "payload": { "author": "Alice", "body": "Hello" } }` |
275
+ | Server → client, delivery | `{ "action": "message", "channel": "rooms/42", "type": "send", "payload": { ... } }` |
276
+ | Server → client, error | `{ "action": "error", "payload": { "message": "..." } }` |
277
+
278
+ A `broadcast` receipt is not the delivered message. Render incoming `message` frames, and surface `error` frames separately. The demo never inserts optimistic or simulated deliveries.
279
+
280
+ ## Authentication and Join Authorization
281
+
282
+ A channel can allow anonymous joins while a particular message requires authentication:
283
+
284
+ ```xs
285
+ message protected_echo {
286
+ realtime_server = "docs_realtime"
287
+ channel = "rooms/{room_id}"
288
+ auth = "user"
289
+ deliver_to = "sender"
290
+ input {
291
+ text body
292
+ }
293
+ stack {
294
+ realtime.get_session as $session
295
+ }
296
+ response = {body: $input.body, authenticated: $session.authenticated}
297
+ }
298
+ ```
299
+
300
+ This assumes an existing auth-enabled `user` table. An anonymous invocation is rejected; a valid user JWT supplied as the socket subprotocol can invoke the handler. The JWT is an application user token, distinct from the CLI's administrative token.
301
+
302
+ For a channel-wide gate, create the channel:
303
+
304
+ ```xs
305
+ channel members {
306
+ realtime_server = "docs_realtime"
307
+ access = {anonymous: true, presence: false}
308
+ publish = {who: "authenticated", direct: false}
309
+ input {
310
+ }
311
+ }
312
+ ```
313
+
314
+ Then attach a join trigger by its parent references:
315
+
316
+ ```xs
317
+ channel_trigger member_gate {
318
+ realtime_server = "docs_realtime"
319
+ channel = "members"
320
+
321
+ input {
322
+ enum action {
323
+ values = ["join", "leave", "deliver"]
324
+ }
325
+
326
+ text channel
327
+ json payload
328
+ object client {
329
+ schema {
330
+ json extras
331
+ object permissions {
332
+ schema {
333
+ int dbo_id
334
+ text row_id
335
+ }
336
+ }
337
+ }
338
+ }
339
+ }
340
+
341
+ stack {
342
+ realtime.get_session as $session
343
+ }
344
+
345
+ response = {
346
+ allowed: $session.authenticated
347
+ reason : "Sign in to join members"
348
+ }
349
+
350
+ actions = {join: true}
351
+ }
352
+ ```
353
+
354
+ The trigger input schema above is the platform's pulled schema. The server normalizes these system inputs; do not invent application input parameters on the trigger. This gate explicitly admits authenticated sessions and rejects anonymous sessions with a reason. For membership or tenant authorization, replace the simple authentication decision with checks against your application data.
355
+
356
+ V2 lifecycle scopes are `realtime_server_trigger` for `connect`/`disconnect`, and `channel_trigger` for `join`/`leave`/`deliver`. The executable example here covers `join`. Legacy `realtime_trigger` belongs to V1.
357
+
358
+ ## CLI Workflow and Verification
359
+
360
+ Authenticate with your Xano account at `https://app.xano.com` and select your instance, workspace, and branch:
361
+
362
+ ```bash
363
+ xano auth
364
+ ```
365
+
366
+ Use your selected profile, workspace, and branch explicitly. Replace the uppercase placeholders below with your selections. Save the declarations under `examples/realtime-v2/` in your project, or change `--directory` to the directory you used:
367
+
368
+ ```bash
369
+ xano workspace push --profile YOUR_PROFILE --workspace YOUR_WORKSPACE --branch YOUR_BRANCH --directory examples/realtime-v2 --dry-run
370
+ xano workspace push --profile YOUR_PROFILE --workspace YOUR_WORKSPACE --branch YOUR_BRANCH --directory examples/realtime-v2
371
+ xano workspace pull --profile YOUR_PROFILE --workspace YOUR_WORKSPACE --branch YOUR_BRANCH --directory pulled-workspace
372
+ ```
373
+
374
+ Validate with `xano_validate_xanoscript` before pushing. Pull back and verify server canonicals, channel settings, message parent references, and trigger inputs. Use a current CLI release with Realtime V2 support. V2 objects pull under `realtime_server/`, `channel/`, `message/`, and `channel_trigger/`. Keep explicit parent clauses: folder names do not replace them.
375
+
376
+ If working from the source repository, run `node examples/realtime-v2/verify.mjs` with the frontend config pointed at your deployed examples. Set `XANO_TEST_USER_TOKEN` to an application user JWT to include the authenticated positive test. The script reports that test as skipped if the token is absent.
377
+
378
+ ## Common Mistakes
379
+
380
+ - **Mixing V1 and V2:** `api.realtime_event` and `/rt/` do not target these V2 servers.
381
+ - **Using a template in a publish call:** send to `rooms/42`, not `rooms/{room_id}`.
382
+ - **Using the server name in a socket URL:** use its preserved canonical.
383
+ - **Sending before joining:** wait for a successful join acknowledgement. Socket `open` alone is insufficient.
384
+ - **Confusing acknowledgements with delivery:** assert `action: "message"` on each intended recipient.
385
+ - **Assuming session path values are numeric:** the observed `$session.params.room_id` is text.
386
+ - **Treating a successful import as a realtime test:** connect two clients and verify actual delivered frames.
387
+
388
+ ## Related Topics
389
+
390
+ | Topic | Description |
391
+ |-------|-------------|
392
+ | `realtime` | Legacy V1 channels and events |
393
+ | `middleware` | API post middleware and response envelopes |
394
+ | `apis` | Endpoint definitions |
395
+ | `security` | Application authentication and authorization |
@@ -2,12 +2,16 @@
2
2
  applyTo: "realtime/channel/*.xs, realtime/trigger/*.xs, function/**/*.xs, api/**/*.xs"
3
3
  ---
4
4
 
5
- # Realtime
5
+ # Realtime (Legacy V1)
6
+
7
+ For **Realtime V2** servers, typed channels, message handlers, and `realtime.publish`, use `xano_xanoscript_docs({ topic: "realtime-v2" })`. This topic describes the separate legacy system. The visual editor labels its publishing statement **Realtime Event (v1)** (`api.realtime_event`). For V2, choose **Realtime Publish** (`realtime.publish`) and provide both a server name and resolved channel path. Realtime Event can succeed without delivering anything to V2 subscribers.
6
8
 
7
9
  Push real-time updates to connected clients using channels and events.
8
10
 
9
11
  ## Quick Reference
10
12
 
13
+ **Legacy V1 only.** For V2, request the `realtime-v2` topic.
14
+
11
15
  | Operation | Purpose |
12
16
  |-----------|---------|
13
17
  | `api.realtime_event` | Send event to channel |
@@ -54,6 +54,8 @@ XanoScript has **two families** of higher-order array filters. They are differen
54
54
 
55
55
  The argument is an inline XanoScript expression evaluated per element. Context variables: `$$` (current element, alias `$this`), `$index` (position), `$parent` (whole array), and `$result` (previous result, `reduce` only).
56
56
 
57
+ For the full expression language these arguments use — operators, path navigation with auto-flattening, `[condition]` array filtering, anchoring variables — see `xano_xanoscript_docs({ topic: "expressions" })`.
58
+
57
59
  ```xs
58
60
  // Map - transform each element
59
61
  [{v:1},{v:2}]|map:$$.v*2 // [2,4]
@@ -105,13 +107,13 @@ The single-value sibling is `lambda` — it runs JS code with `$this` bound to t
105
107
  ❌ **Wrong — JS syntax in an expression filter:**
106
108
  ```xs
107
109
  $items|map:"return $this * 2" // map expects an expression, not a JS string
108
- $items|filter:$this.active === true // === is JS; expressions use ==
110
+ $items|filter:(x) => x.active // arrow functions are JS; use an inline expression with $$
109
111
  ```
110
112
 
111
113
  ✅ **Correct:**
112
114
  ```xs
113
115
  $items|map:$$ * 2
114
- $items|filter:$$.active == true
116
+ $items|filter:$$.active == true // == coerces; === is strict (100 === "100" is false)
115
117
  ```
116
118
 
117
119
  ❌ **Wrong — expression syntax in a lambda filter:**
@@ -28,6 +28,7 @@ For detailed references on specific filter categories, use:
28
28
  - `xano_xanoscript_docs({ topic: "syntax/string-filters" })` — String filters, regex, encoding, security filters, text functions
29
29
  - `xano_xanoscript_docs({ topic: "syntax/array-filters" })` — Array filters, expression vs lambda (JS) higher-order filters, array functions
30
30
  - `xano_xanoscript_docs({ topic: "syntax/functions" })` — Math filters/functions, object functions, bitwise operations
31
+ - `xano_xanoscript_docs({ topic: "expressions" })` — Xano expression language: `$$` array filters, anchoring variables (`$0`, `$1`, …), auto-flattening paths, transformer pipes, `set`/assignment updates
31
32
 
32
33
  **The `guid` field (backend-managed — ignore it):** Any construct may carry a top-level `guid = "..."` (e.g. `guid = "tgGYuUFKbBz4_6DIkDR5hUUCRno"`) — a stable identifier Xano assigns and maintains automatically. **Leave it exactly as-is when editing, omit it when writing new code (the backend adds one on save), and never add, change, or remove one unless explicitly asked.**
33
34
 
@@ -199,6 +200,8 @@ conditional {
199
200
 
200
201
  Backticks enter **expression mode** — use them only when you need inline evaluation of a complex expression, not for regular conditionals or variable assignments.
201
202
 
203
+ For the full Xano expression language — `[condition]` array filtering with `$$`, anchoring variables (`$0`, `$1`, …), auto-flattening path navigation, `..` ranges, spread, and `set`/assignment updates — see `xano_xanoscript_docs({ topic: "expressions" })`.
204
+
202
205
  ```xs
203
206
  // ✅ Regular conditionals — no backticks needed
204
207
  conditional {
@@ -211,8 +214,10 @@ var $total { value = $input.qty * $input.price }
211
214
 
212
215
  ### Comparison
213
216
  ```xs
214
- $a == $b // Equal
215
- $a != $b // Not equal
217
+ $a == $b // Equal (loose, type-coercing: 100 == "100" is true)
218
+ $a === $b // Equal (strict, type-sensitive: 100 === "100" is false)
219
+ $a != $b // Not equal (loose)
220
+ $a !== $b // Not equal (strict)
216
221
  $a > $b // Greater than
217
222
  $a >= $b // Greater or equal
218
223
  $a < $b // Less than
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "2.4.0",
3
- "updated": "2026-06-10"
2
+ "version": "2.7.1",
3
+ "updated": "2026-08-03"
4
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "2.2.4",
3
+ "version": "2.2.6-beta.0",
4
4
  "description": "MCP server and library for Xano development - XanoScript validation, Meta API, Run API, and CLI documentation",
5
5
  "mcpName": "io.github.xano-inc/xano-developer-mcp",
6
6
  "type": "module",
@@ -62,7 +62,7 @@
62
62
  "license": "MIT",
63
63
  "dependencies": {
64
64
  "@modelcontextprotocol/sdk": "^1.26.0",
65
- "@xano/xanoscript-language-server": "^12.8.0",
65
+ "@xano/xanoscript-language-server": "^12.14.0",
66
66
  "minimatch": "^10.1.2",
67
67
  "zod": "^4.0.0"
68
68
  },