@xano/developer-mcp 1.0.44 → 1.0.46

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.
@@ -228,10 +228,14 @@ var $msg { value = ($status|to_text) ~ ": " ~ ($data|json_encode) }
228
228
 
229
229
  ## Input Block Syntax
230
230
 
231
+ `?` after the **type** = nullable, `?` after the **variable name** = optional (not required).
232
+
231
233
  ```xs
232
234
  input {
233
- text name // Required
234
- text nickname? // Optional (can be omitted)
235
+ text name // Required, not nullable
236
+ text? name // Required, nullable (can send null)
237
+ text name? // Optional (can be omitted)
238
+ text? name? // Optional and nullable
235
239
  text role?="user" // Optional with default
236
240
  email contact filters=trim // With filters
237
241
  text[] tags // Array type
@@ -83,10 +83,14 @@ Reference with path: `function.run "math/add" { ... }`
83
83
 
84
84
  For complete type and filter reference, use `xanoscript_docs({ topic: "types" })`.
85
85
 
86
+ `?` after the **type** = nullable (`text?`), `?` after the **variable name** = not required (`age?`).
87
+
86
88
  ```xs
87
89
  input {
88
- text name filters=trim
89
- int age? filters=min:0
90
+ text name filters=trim // Required, not nullable
91
+ text? bio filters=trim // Required, nullable
92
+ int age? filters=min:0 // Optional (not required)
93
+ text? nickname? filters=trim // Optional and nullable
90
94
  email contact filters=lower { sensitive = true }
91
95
  }
92
96
  ```
@@ -172,13 +172,23 @@ var $message { value = "Status: " ~ ($status|to_text) ~ " - " ~ ($data|json_enco
172
172
 
173
173
  > **Full reference:** For complete input types and validation options, see `xanoscript_docs({ topic: "types" })`.
174
174
 
175
+ The `?` has different meanings depending on placement:
176
+ - **After the type** (`text?`) → **nullable** (value can be `null`)
177
+ - **After the variable name** (`name?`) → **not required** (optional)
178
+
175
179
  ```xs
176
180
  input {
177
- // Required input
181
+ // Required, not nullable
178
182
  text name
179
183
 
180
- // Optional input (can be omitted)
181
- text nickname?
184
+ // Required, nullable (caller must provide, but can send null)
185
+ text? name
186
+
187
+ // Optional, not nullable (can be omitted, but if sent must have value)
188
+ text name?
189
+
190
+ // Optional AND nullable (can be omitted or sent as null)
191
+ text? name?
182
192
 
183
193
  // Optional with default value
184
194
  text role?="user"
@@ -186,9 +196,6 @@ input {
186
196
  // With filters applied
187
197
  email contact filters=trim|lower
188
198
 
189
- // Optional with default AND filters
190
- text search?="" filters=trim
191
-
192
199
  // Array type
193
200
  text[] tags filters=trim
194
201
 
@@ -6,7 +6,7 @@ applyTo: "function/**/*.xs, api/**/*.xs, tool/**/*.xs, agent/**/*.xs"
6
6
 
7
7
  Reference for XanoScript data types, input blocks, and validation.
8
8
 
9
- > **TL;DR:** Use `text` not `string`, `int` not `integer`, `bool` not `boolean`. Add `?` for nullable, `?=value` for defaults. Use `filters=` for validation. Arrays use `type[]` syntax.
9
+ > **TL;DR:** Use `text` not `string`, `int` not `integer`, `bool` not `boolean`. `?` after the **type** = nullable (`text?`), `?` after the **variable name** = optional/not required (`name?`). Use `filters=` for validation. Arrays use `type[]` syntax.
10
10
 
11
11
  ---
12
12
 
@@ -36,13 +36,21 @@ Reference for XanoScript data types, input blocks, and validation.
36
36
  | `geo_point` / `geo_polygon` / `geo_linestring` | Geographic data |
37
37
 
38
38
  ### Modifiers
39
- | Syntax | Meaning |
40
- |--------|---------|
41
- | `text?` | Nullable (can be null) |
42
- | `text name?` | Optional (not required) |
43
- | `text name?="default"` | Optional with default |
44
- | `text[]` | Array of type |
45
- | `text[1:10]` | Array with size constraints |
39
+
40
+ The `?` has different meanings depending on placement:
41
+
42
+ - **After the type** (`text?`) the value is **nullable** (can be `null`)
43
+ - **After the variable name** (`name?`) the value is **not required** (optional)
44
+
45
+ | Syntax | Nullable | Required | Description |
46
+ |--------|----------|----------|-------------|
47
+ | `text name` | No | Yes | Required, cannot be null |
48
+ | `text? name` | Yes | Yes | Required, can be null |
49
+ | `text name?` | No | No | Optional, cannot be null |
50
+ | `text? name?` | Yes | No | Optional, can be null |
51
+ | `text name?="default"` | No | No | Optional with default value |
52
+ | `text[]` | — | — | Array of type |
53
+ | `text[1:10]` | — | — | Array with size constraints |
46
54
 
47
55
  ---
48
56
 
@@ -291,22 +299,29 @@ input {
291
299
 
292
300
  ## Nullable vs Optional
293
301
 
302
+ The `?` marker controls two independent behaviors based on where it's placed:
303
+
304
+ - **`?` after the type** (e.g., `text?`) → **nullable**: the value can be `null`
305
+ - **`?` after the variable name** (e.g., `name?`) → **not required**: the caller can omit the field entirely
306
+
307
+ These combine to form four distinct behaviors:
308
+
294
309
  ```xs
295
310
  input {
296
- // Required, cannot be null
297
- text required_field
311
+ // Required, cannot be null — caller MUST provide a non-null value
312
+ text name filters=trim
298
313
 
299
- // Required, can be null (must provide, can send null)
300
- text? nullable_field
314
+ // Required, CAN be null caller MUST provide the field, but can send null
315
+ text? name filters=trim
301
316
 
302
- // Optional, cannot be null (can omit, but if sent must have value)
303
- text optional_field?
317
+ // Optional, cannot be null — caller can omit, but if sent must have a value
318
+ text name? filters=trim
304
319
 
305
- // Optional, can be null (can omit or send null)
306
- text? nullable_optional?
320
+ // Optional, CAN be null — caller can omit or send null
321
+ text? name? filters=trim
307
322
 
308
- // Optional with default
309
- text with_default?="hello"
323
+ // Optional with default — if omitted, uses the default value
324
+ text name?="hello"
310
325
  }
311
326
  ```
312
327
 
@@ -55,6 +55,8 @@ addon.call "<addon_name>" as $result
55
55
 
56
56
  ### function.call
57
57
 
58
+ > **Important:** Always use `function.call` in workflow tests, not `function.run`. `function.call` handles errors internally, which is required for `expect` assertions (such as `expect.to_throw`) to work correctly. `function.run` is for calling functions from other primitives (APIs, functions, tasks, etc.) outside of workflow tests.
59
+
58
60
  ```xs
59
61
  function.call "<function_name>" {
60
62
  input = { key: "value" }
@@ -319,7 +321,8 @@ workflow_test "comprehensive_test" {
319
321
  2. **Tag for filtering** — Use tags like `critical`, `e2e`, `smoke` to organize test suites
320
322
  3. **Avoid `datasource = "live"`** — The entire datasource is cloned before each test run, which can be slow. Use no datasource or a smaller custom datasource instead
321
323
  4. **Keep tests independent** — Each workflow test should be self-contained and not depend on other tests
322
- 5. **Use assertions over preconditions**Prefer `expect.*` assertions for clearer test intent
324
+ 5. **Use `function.call`, not `function.run`**`function.call` handles errors so that `expect` assertions work correctly. `function.run` is for calling functions outside of workflow tests
325
+ 6. **Use assertions over preconditions** — Prefer `expect.*` assertions for clearer test intent
323
326
 
324
327
  ---
325
328
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
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",