@xano/developer-mcp 1.0.49 → 1.0.51

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.
@@ -42,6 +42,7 @@ const RESERVED_VARIABLES = [
42
42
  "$response",
43
43
  "$output",
44
44
  "$input",
45
+ "$index",
45
46
  "$auth",
46
47
  "$env",
47
48
  "$db",
@@ -111,7 +111,7 @@ $db.table.field // Database field reference (in queries)
111
111
  $this // Current item in loops/maps
112
112
  ```
113
113
 
114
- **Reserved Variables:** The following cannot be used as variable names: `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`.
114
+ **Reserved Variables:** The following cannot be used as variable names: `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`, `$index`.
115
115
 
116
116
  ### Type Names
117
117
 
@@ -63,8 +63,8 @@ foreach ($input.items) {
63
63
 
64
64
  // For loop (iterate N times)
65
65
  for (10) {
66
- each as $index {
67
- debug.log { value = $index }
66
+ each as $idx {
67
+ debug.log { value = $idx }
68
68
  }
69
69
  }
70
70
 
@@ -249,7 +249,7 @@ var $msg { value = ($status|to_text) ~ ": " ~ ($data|json_encode) }
249
249
 
250
250
  ## Reserved Variables (Cannot Use)
251
251
 
252
- `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`
252
+ `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`, `$index`
253
253
 
254
254
  ## Input Block Syntax
255
255
 
@@ -143,14 +143,14 @@ stack {
143
143
  }
144
144
 
145
145
  // Foreach (array iteration) - no built-in index; count manually if needed
146
- var $index {
146
+ var $idx {
147
147
  value = 0
148
148
  }
149
149
  foreach ($input.items) {
150
150
  each as $item {
151
151
  debug.log { value = $item.name }
152
- debug.log { value = $index }
153
- math.add $index { value = 1 }
152
+ debug.log { value = $idx }
153
+ math.add $idx { value = 1 }
154
154
  }
155
155
  }
156
156
 
@@ -445,21 +445,6 @@ foreach ($items) {
445
445
  }
446
446
  ```
447
447
 
448
- ### Loop with Index
449
-
450
- ```xs
451
- foreach ($items) {
452
- each as $item, $index {
453
- db.add "item" {
454
- data = {
455
- value: $item,
456
- position: $index
457
- }
458
- }
459
- }
460
- }
461
- ```
462
-
463
448
  ---
464
449
 
465
450
  ## Naming Rules
@@ -24,6 +24,7 @@ These variable names are reserved and cannot be used:
24
24
  | `$db` | Database table reference for queries |
25
25
  | `$this` | Current context reference |
26
26
  | `$result` | Used in reduce operations |
27
+ | `$index` | Reserved for some array operations |
27
28
 
28
29
  ```xs
29
30
  // ❌ Wrong - using reserved variable name
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "MCP server and library for Xano development - XanoScript validation, Meta API, Run API, and CLI documentation",
5
5
  "type": "module",
6
6
  "main": "dist/lib.js",