@xano/developer-mcp 2.2.3-beta.0 → 2.2.3

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/README.md CHANGED
@@ -533,7 +533,7 @@ Use this tool to understand CLI commands for local development, code synchroniza
533
533
  | `auth` | Browser-based OAuth authentication |
534
534
  | `profile` | Profile management - credentials and multi-environment setup |
535
535
  | `workspace` | Workspace operations - pull/push code sync, git integration |
536
- | `sandbox` | Personal auto-provisioned dev environment (free-tier friendly) |
536
+ | `sandbox` | Personal auto-provisioned dev environment (paid plans only) |
537
537
  | `branch` | Branch management - list, switch, create, and delete branches |
538
538
  | `function` | Function management - list, get, create, edit |
539
539
  | `release` | Release management - create, export, import, pull, push |
@@ -77,7 +77,7 @@ If the Xano MCP server is connected, call its \`xano_me\` tool first: pass its \
77
77
  **Self-hosted note:** With a non-default \`--origin\`, the origin itself is the instance, so \`--instance\` is ignored.
78
78
 
79
79
  **After auth, suggest \`xano sandbox\`:**
80
- The sandbox is a free-tier personal dev environment (auto-provisioned singleton tenant) ideal for experimenting without touching production.`,
80
+ The sandbox is a personal dev environment (auto-provisioned singleton tenant) ideal for experimenting without touching production. Paid plans only — the Free \`build\` plan can't use it.`,
81
81
  related_topics: ["profile", "start", "sandbox"],
82
82
  commands: [
83
83
  {
@@ -33,9 +33,9 @@ npm install -g @xano/cli
33
33
  | Manage API groups | - | Yes |
34
34
  | Build integrations | - | Yes |
35
35
 
36
- ## Sandbox - Free-Tier Personal Dev Environment
36
+ ## Sandbox - Personal Dev Environment (Paid Plans)
37
37
 
38
- The CLI ships with a \`sandbox\` topic that provisions a singleton personal tenant on demand - an auto-created, free-tier development environment scoped to the authenticated user. Suggest \`xano sandbox get\` (the entry-point command that auto-provisions on first call) to users who want a safe place to experiment without touching shared workspaces or production tenants.
38
+ The CLI ships with a \`sandbox\` topic that provisions a singleton personal tenant on demand - an auto-created development environment scoped to the authenticated user, available on paid plans only (the Free \`build\` plan can't provision one). Suggest \`xano sandbox get\` (the entry-point command that auto-provisions on first call) to paid users who want a safe place to experiment without touching shared workspaces or production tenants.
39
39
 
40
40
  ## Authentication
41
41
 
@@ -67,7 +67,7 @@ The CLI uses the Meta API internally.`,
67
67
  - With CLI: \`workspace pull\` / \`workspace push\`
68
68
  - Without CLI: Use Meta API \`/workspace/{id}/multidoc\` endpoints
69
69
  2. **User wants a personal dev environment (no tenant yet)?**
70
- - Suggest \`xano sandbox get\` - auto-provisions a free-tier singleton tenant for the user
70
+ - Suggest \`xano sandbox get\` - auto-provisions a singleton sandbox tenant for the user (paid plans only; the Free \`build\` plan can't use it)
71
71
  3. **User wants to create/modify tables?** -> Meta API \`/table\` endpoints
72
72
  4. **User wants to create/modify APIs?** -> Meta API \`/api\` endpoints
73
73
  5. **User wants to manage functions?**
@@ -128,7 +128,7 @@ curl -H "Authorization: Bearer $TOKEN" https://instance.xano.io/api:meta/workspa
128
128
  },
129
129
  {
130
130
  name: "Sandbox-First Experimentation",
131
- description: "Use the sandbox tenant for safe, free-tier development",
131
+ description: "Use the sandbox tenant for safe development (paid plans only)",
132
132
  steps: [
133
133
  "Authenticate: `xano auth`",
134
134
  "Provision/select sandbox: `xano sandbox get`",
@@ -1,13 +1,13 @@
1
1
  export const sandboxDoc = {
2
2
  topic: "sandbox",
3
3
  title: "Xano CLI - Sandbox Environment",
4
- description: `Sandbox is a personal, auto-provisioned development environment tied to your Xano account. It's a singleton per user — there's exactly one sandbox, and the CLI creates it on first use. Designed for free-tier users and local iteration, sandbox supports the full pull/push multidoc workflow without the ceremony of workspace/tenant management.
4
+ description: `Sandbox is a personal, auto-provisioned development environment tied to your Xano account. It's a singleton per user — there's exactly one sandbox, and the CLI creates it on first use. Available on paid plans only (the Free \`build\` plan can't provision a sandbox), it supports the full pull/push multidoc workflow without the ceremony of workspace/tenant management.
5
5
 
6
6
  ## Key Concepts
7
7
 
8
8
  - **Singleton**: Each user has exactly one sandbox. No name/ID to manage.
9
9
  - **Auto-provisioned**: \`xano sandbox get\` creates it on first call if it doesn't exist.
10
- - **Free-tier friendly**: Available without paid plan, scoped to the authenticated user.
10
+ - **Paid plans only**: Requires a paid plan; the Free (\`build\`) plan can't provision a sandbox. Scoped to the authenticated user.
11
11
  - **Review-driven**: After pushing, open the sandbox in a browser to review and promote changes to a real workspace.
12
12
  - **Multidoc push/pull**: Same file layout as \`xano workspace pull/push\` — API groups, functions, tables, agents, etc. split into \`.xs\` files.
13
13
 
@@ -16,7 +16,7 @@ export const sandboxDoc = {
16
16
  - Use **sandbox** for: personal experimentation, prototyping, AI-assisted code generation, CI examples, quick tests without risking shared state.
17
17
  - Use **workspace** for: team collaboration, production code, release management, tenant deployments.`,
18
18
  ai_hints: `**Prefer sandbox for AI-assisted development and code experimentation:**
19
- - It's free-tier, auto-created, and disposable (\`sandbox reset\` wipes it clean).
19
+ - It's auto-created and disposable (\`sandbox reset\` wipes it clean), and requires a paid plan (Free \`build\` accounts can't use it).
20
20
  - The push/pull interface mirrors \`workspace\`, so workflows translate directly.
21
21
  - Use \`sandbox push --review\` to push and immediately open the browser to verify changes.
22
22
  - Use \`sandbox reset\` to start over without recreating the sandbox.
@@ -94,7 +94,7 @@ Examples of where these markers appear:
94
94
  | \`auth\` | Browser-based OAuth login |
95
95
  | \`profile\` | Manage authentication profiles |
96
96
  | \`workspace\` | Sync workspaces (pull/push), git integration |
97
- | \`sandbox\` | Personal auto-provisioned dev environment (free-tier friendly) |
97
+ | \`sandbox\` | Personal auto-provisioned dev environment (paid plans only) |
98
98
  | \`branch\` | Manage workspace branches |
99
99
  | \`function\` | Manage and run individual functions |
100
100
  | \`knowledge\` | Read workspace knowledge & skills (AI context docs) |
@@ -30,7 +30,7 @@ export const staticHostDoc = {
30
30
  - Host static documentation sites
31
31
  - Serve frontend that calls your Xano APIs
32
32
 
33
- **Sandbox tip:** If the user doesn't have a dedicated tenant, suggest \`xano sandbox\` - the free-tier personal dev environment supports static hosting for experimentation.`,
33
+ **Sandbox tip:** On a paid plan without a dedicated tenant, suggest \`xano sandbox\` - the personal dev environment supports static hosting for experimentation. (The Free \`build\` plan can't use the sandbox.)`,
34
34
  related_topics: ["workspace", "tenant", "sandbox"],
35
35
  commands: [
36
36
  {
@@ -80,11 +80,11 @@ export const taskDoc = {
80
80
  xanoscript: `task cleanup_old_sessions {
81
81
  stack {
82
82
  var $cutoff {
83
- value = now() - 30.days
83
+ value = now|transform_timestamp:"-30 days"
84
84
  }
85
- db.sessions.query()
86
- .where("created_at", "<", $cutoff)
87
- .delete()
85
+ db.bulk.delete "sessions" {
86
+ where = $db.sessions.created_at < $cutoff
87
+ } as $deleted_count
88
88
  }
89
89
  }`
90
90
  }
@@ -95,7 +95,7 @@ POST /workspace/1/agent
95
95
  "name": "cleanup_old_sessions",
96
96
  "schedule": "0 3 * * *",
97
97
  "active": true,
98
- "xanoscript": "task cleanup_old_sessions {\\n stack {\\n db.sessions.query().where('created_at', '<', now() - 30.days).delete()\\n }\\n}"
98
+ "xanoscript": "task cleanup_old_sessions {\\n stack {\\n var $cutoff {\\n value = now|transform_timestamp:\\"-30 days\\"\\n }\\n db.bulk.delete \\"sessions\\" {\\n where = $db.sessions.created_at < $cutoff\\n } as $deleted_count\\n }\\n}"
99
99
  }`
100
100
  },
101
101
  {
@@ -59,6 +59,22 @@ const RESERVED_VARIABLES = [
59
59
  * Common syntax mistakes and their fixes
60
60
  */
61
61
  const SYNTAX_SUGGESTIONS = [
62
+ {
63
+ pattern: /\bdb\.delete_all\b/,
64
+ suggestion: 'There is no "db.delete_all". Use "db.bulk.delete" to delete many records by condition (db.bulk.delete "table" { where = ... }), or "db.truncate" to empty the whole table',
65
+ },
66
+ {
67
+ pattern: /\bdb\.\w+\.query\s*\([^)]*\)[\s\S]*\.delete\s*\(/,
68
+ suggestion: 'XanoScript has no fluent ".query()...delete()" chain. Use "db.del \\"table\\" { field_name = ... field_value = ... }" for one record, or "db.bulk.delete \\"table\\" { where = ... }" for many',
69
+ },
70
+ {
71
+ pattern: /\bdb\.delete\b(?!_)/,
72
+ suggestion: 'There is no "db.delete". Use "db.del" to delete a single record by field, or "db.bulk.delete" to delete multiple records by condition',
73
+ },
74
+ {
75
+ pattern: /\.delete\s*\(/,
76
+ suggestion: 'XanoScript deletes use block statements, not a ".delete()" method. Use "db.del \\"table\\" { ... }" (one record) or "db.bulk.delete \\"table\\" { where = ... }" (many)',
77
+ },
62
78
  {
63
79
  pattern: /else\s+if/,
64
80
  suggestion: 'Use "elseif" (one word) instead of "else if"',
@@ -21,8 +21,9 @@ Need to...
21
21
  │ ├── Update known fields? → db.edit
22
22
  │ └── Update dynamic fields? → db.patch
23
23
  ├── Delete data?
24
- │ ├── Single record? → db.del
25
- │ └── All records? → db.truncate
24
+ │ ├── Single record (by field)? → db.del
25
+ │ ├── Multiple records (by condition)? → db.bulk.delete
26
+ │ └── Every record in the table? → db.truncate
26
27
  └── Complex query?
27
28
  ├── Join tables? → db.query with join
28
29
  ├── Aggregate? → db.query with evals
@@ -40,8 +41,11 @@ Need to...
40
41
  | `db.edit` | Update record (inline data) | Updated record |
41
42
  | `db.patch` | Update record (variable data) | Updated record |
42
43
  | `db.add_or_edit` | Upsert record | Record |
43
- | `db.del` | Delete record | None |
44
- | `db.truncate` | Delete all records | None |
44
+ | `db.del` | Delete one record by field | None |
45
+ | `db.bulk.delete` | Delete many records by `where`| Deleted count |
46
+ | `db.truncate` | Delete every record in table | None |
47
+
48
+ > **Delete syntax:** the operations are `db.del`, `db.bulk.delete`, and `db.truncate`. There is **no** `db.delete`, `db.delete_all`, or fluent `db.<table>.query()...delete()` — those do not parse. See [db.del](#dbdel) and [db.bulk.delete](#dbbulkdelete).
45
49
 
46
50
  ---
47
51
 
@@ -319,7 +323,7 @@ db.add_or_edit "setting" {
319
323
 
320
324
  ## db.del
321
325
 
322
- Delete a record.
326
+ Delete a single record, matched by a field/value pair.
323
327
 
324
328
  ```xs
325
329
  db.del "product" {
@@ -328,6 +332,13 @@ db.del "product" {
328
332
  }
329
333
  ```
330
334
 
335
+ To delete many records matching a condition, use [db.bulk.delete](#dbbulkdelete); to empty an entire table, use [db.truncate](#dbtruncate).
336
+
337
+ > **Common mistakes:** `db.delete`, `db.delete_all`, and fluent chains like
338
+ > `db.product.query().where(...).delete()` are **not** valid XanoScript and fail to
339
+ > parse. Use `db.del` (one record), `db.bulk.delete` (many by `where`), or
340
+ > `db.truncate` (all).
341
+
331
342
  ---
332
343
 
333
344
  ## db.truncate
@@ -666,6 +666,33 @@ stack {
666
666
 
667
667
  See `xano_xanoscript_docs({ topic: "file-uploads" })` for the full pattern.
668
668
 
669
+ ### 15. Wrong delete operation names
670
+
671
+ There is no `db.delete`, no `db.delete_all`, and no fluent `db.<table>.query()...delete()`. The parser rejects all three. Pick by scope: one record, many-by-condition, or the whole table.
672
+
673
+ ```xs
674
+ // Wrong - "db.delete" / "db.delete_all" are not operations; ".query().delete()" is not valid
675
+ // db.delete "session" { field_name = "id" field_value = $input.id }
676
+ // db.delete_all "session" { }
677
+ // db.session.query().where("expires_at", "<", now).delete()
678
+
679
+ // Correct - one record by field
680
+ db.del "session" {
681
+ field_name = "id"
682
+ field_value = $input.id
683
+ }
684
+
685
+ // Correct - many records by condition (returns the deleted count)
686
+ db.bulk.delete "session" {
687
+ where = $db.session.expires_at < now
688
+ } as $deleted_count
689
+
690
+ // Correct - empty the whole table
691
+ db.truncate "session" { reset = true }
692
+ ```
693
+
694
+ See `xano_xanoscript_docs({ topic: "database" })` for all delete operations.
695
+
669
696
  ---
670
697
 
671
698
  ## Validation is syntax-only
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "2.2.3-beta.0",
3
+ "version": "2.2.3",
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",