@xano/developer-mcp 1.0.39 → 1.0.40

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.
@@ -153,6 +153,7 @@ $text|to_upper // Uppercase
153
153
  $text|substr:0:10 // Substring
154
154
  $text|split:"," // Split to array
155
155
  $text|contains:"x" // Check contains → bool
156
+ $text|strlen // Length of a string
156
157
 
157
158
  // Array
158
159
  $arr|first // First element
@@ -88,6 +88,40 @@ conditional {
88
88
  }
89
89
  ```
90
90
 
91
+ ### Early Return
92
+
93
+ Stop execution and return a value immediately. Useful for guard clauses and skipping unnecessary work.
94
+
95
+ ```xs
96
+ // Guard clause - return early if condition is met
97
+ conditional {
98
+ if ($input.skip) {
99
+ return { value = null }
100
+ }
101
+ }
102
+
103
+ // Return early with a value
104
+ conditional {
105
+ if ($input.use_cache && $cached_result != null) {
106
+ return { value = $cached_result }
107
+ }
108
+ }
109
+
110
+ // Short-circuit with a successful response
111
+ db.get "order" {
112
+ field_name = "id"
113
+ field_value = $input.order_id
114
+ } as $order
115
+
116
+ conditional {
117
+ if ($order.status == "completed") {
118
+ return { value = $order }
119
+ }
120
+ }
121
+
122
+ // Continue with expensive processing for non-completed orders...
123
+ ```
124
+
91
125
  ### API Request with Error Handling
92
126
  ```xs
93
127
  api.request {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
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",