@xano/developer-mcp 2.0.3 → 2.0.4

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.
@@ -44,11 +44,11 @@ project/
44
44
  ├── api/
45
45
  │ └── users/ # API group folder
46
46
  │ ├── api_group.xs # API group definition
47
- │ ├── get_all_get.xs # GET /users
48
- │ ├── get_one_get.xs # GET /users/:id
49
- │ ├── create_post.xs # POST /users
47
+ │ ├── get_all_get.xs # GET /api:users/get_all
48
+ │ ├── get_one_get.xs # GET /api:users/get_one/{id} (query name "get_one/{id}" — static prefix avoids collisions with other path-param queries in the group)
49
+ │ ├── create_post.xs # POST /api:users/create
50
50
  │ └── nested/
51
- │ └── profile_get.xs # Nested endpoint: GET /users/nested/profile
51
+ │ └── profile_get.xs # Nested endpoint: GET /api:users/nested/profile
52
52
  ├── function/
53
53
  │ └── validate_token.xs # Reusable functions
54
54
  ├── task/
@@ -47,17 +47,31 @@ query "endpoint-path" verb=<METHOD> {
47
47
 
48
48
  The query name is **required** and **must be a non-empty string**. Empty names (`query "" verb=...`) are invalid. The name defines the endpoint path after the API group canonical.
49
49
 
50
- **Full URL path structure:**
50
+ **Full public URL:**
51
51
 
52
52
  ```
53
- /<api_group canonical>/<query name>
53
+ <api_baseurl>/api:<canonical>[:<branch>]/<query_name>
54
54
  ```
55
55
 
56
+ Where:
57
+ - `<api_baseurl>` — instance base URL (value of `$env.$api_baseurl` at runtime)
58
+ - `<canonical>` — the `canonical` property of the API group
59
+ - `<branch>` — **optional** branch name (value of `$env.$branch` at runtime). Omit the entire `:<branch>` segment (including the colon) to target the live branch.
60
+ - `<query_name>` — the query's `name` (may contain slashes for nested paths)
61
+
62
+ Example: `https://example.xano.io/api:blog-api:v2/categories`
63
+ - `<api_baseurl>` → `https://example.xano.io`
64
+ - `<canonical>` → `blog-api`
65
+ - `<branch>` → `v2`
66
+ - `<query_name>` → `categories`
67
+
68
+ Live-branch example (no branch segment): `https://example.xano.io/api:blog-api/categories`
69
+
56
70
  The query name can include slashes for nested paths:
57
71
 
58
- - `query "list" verb=GET` → `/<canonical>/list`
59
- - `query "users/{id}" verb=GET` → `/<canonical>/users/{id}`
60
- - `query "admin/reports/daily" verb=GET` → `/<canonical>/admin/reports/daily`
72
+ - `query "list" verb=GET` → `/api:<canonical>/list`
73
+ - `query "users/{id}" verb=GET` → `/api:<canonical>/users/{id}`
74
+ - `query "admin/reports/daily" verb=GET` → `/api:<canonical>/admin/reports/daily`
61
75
 
62
76
  ### HTTP Methods
63
77
 
@@ -104,16 +118,16 @@ api_group Authentication {
104
118
  api/
105
119
  ├── users/
106
120
  │ ├── api_group.xs # Defines group (canonical = "myapp-users")
107
- │ ├── list_get.xs # GET /myapp-users/list
108
- │ └── by_id_get.xs # GET /myapp-users/{id}
121
+ │ ├── list_get.xs # GET /api:myapp-users/list
122
+ │ └── by_id_get.xs # GET /api:myapp-users/by_id/{id} (query name "by_id/{id}" — static prefix avoids collisions)
109
123
  └── products/
110
124
  ├── api_group.xs # Defines group (canonical = "myapp-products")
111
- └── search_get.xs # GET /myapp-products/search
125
+ └── search_get.xs # GET /api:myapp-products/search
112
126
  ```
113
127
 
114
128
  **Naming convention:** Endpoint files use `{name}_{verb}.xs` format (e.g., `list_get.xs`, `create_post.xs`).
115
129
 
116
- Full URL: `/<canonical>/<query name>` (e.g., `/myapp-users/profile`)
130
+ Public URL: `<api_baseurl>/api:<canonical>[:<branch>]/<query_name>` (e.g., `https://example.xano.io/api:myapp-users/profile`, or `https://example.xano.io/api:myapp-users:v2/profile` to target branch `v2`). See [Query Name](#query-name-required-non-empty) above for the full placeholder legend.
117
131
 
118
132
  ---
119
133
 
@@ -456,26 +456,26 @@ Built-in variables available in the execution context.
456
456
 
457
457
  ### Request Context
458
458
 
459
- | Variable | Description |
460
- |----------|-------------|
461
- | `$remote_ip` | Client IP address |
462
- | `$remote_port` | Client port number |
463
- | `$remote_host` | Remote hostname |
464
- | `$request_method` | HTTP method (GET, POST, etc.) |
465
- | `$request_uri` | Full request URI |
466
- | `$request_querystring` | Query string portion |
467
- | `$http_headers` | Request headers object |
468
- | `$request_auth_token` | Authorization token (if present) |
459
+ | Variable | Type | Description |
460
+ |----------|------|-------------|
461
+ | `$remote_ip` | text | Client IP address |
462
+ | `$request_method` | text | HTTP method (GET, POST, etc.) |
463
+ | `$request_uri` | text | Full request URI |
464
+ | `$request_querystring` | text | Query string portion |
465
+ | `$http_headers` | object | Request headers object |
466
+ | `$request_auth_token` | text | Authorization token (if present) |
469
467
 
470
468
  ### System Context
471
469
 
472
- | Variable | Description |
473
- |----------|-------------|
474
- | `$datasource` | Current data source name |
475
- | `$branch` | Current branch name |
476
- | `$tenant` | Tenant ID (multi-tenant apps) |
477
- | `$api_baseurl` | API base URL |
478
- | `$webflow` | Webflow context (if applicable) |
470
+ | Variable | Type | Description |
471
+ |----------|------|-------------|
472
+ | `$datasource` | text | Current data source name |
473
+ | `$branch` | text | Current branch name |
474
+ | `$tenant` | text | Tenant ID (multi-tenant apps) |
475
+ | `$api_baseurl` | text | API base URL |
476
+ | `$release` | int | Current release number |
477
+ | `$platform` | int | Platform identifier |
478
+ | `$debugger` | bool | True when running under the debugger |
479
479
 
480
480
  ### Access via $env
481
481
 
@@ -487,6 +487,8 @@ var $headers { value = $env.$http_headers }
487
487
  var $current_branch { value = $env.$branch }
488
488
 
489
489
  // Custom environment variables (set in Xano dashboard)
490
+ // Note: user-defined env var names have no `$` prefix — only built-in
491
+ // system vars use `$`. Access them as `$env.<name>`, not `$env.$<name>`.
490
492
  var $api_key { value = $env.MY_API_KEY }
491
493
  ```
492
494
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
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",