@xano/developer-mcp 1.0.54 → 1.0.56

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.
@@ -104,7 +104,7 @@ export const xanoscriptDocsToolDefinition = {
104
104
  description: "Get XanoScript programming language documentation for AI code generation. " +
105
105
  "Call without parameters for overview (README). " +
106
106
  "Use 'topic' for specific documentation, or 'file_path' for context-aware docs based on the file you're editing. " +
107
- "Use mode='quick_reference' for compact syntax cheatsheet (recommended for context efficiency). " +
107
+ "Use mode='quick_reference' for compact syntax reference (recommended for context efficiency). " +
108
108
  "file_path mode defaults to 'quick_reference' to reduce context size; use mode='full' to get complete docs.",
109
109
  annotations: {
110
110
  readOnlyHint: true,
@@ -133,7 +133,7 @@ export const xanoscriptDocsToolDefinition = {
133
133
  type: "string",
134
134
  enum: ["full", "quick_reference"],
135
135
  description: "'full' = complete documentation with explanations and examples. " +
136
- "'quick_reference' = compact cheatsheet with just syntax patterns and signatures. " +
136
+ "'quick_reference' = compact reference with just syntax patterns and signatures. " +
137
137
  "Use 'quick_reference' to save context window space when you just need a reminder. " +
138
138
  "Default: 'full' for topic mode, 'quick_reference' for file_path mode.",
139
139
  },
@@ -141,7 +141,7 @@ export const xanoscriptDocsToolDefinition = {
141
141
  type: "array",
142
142
  items: { type: "string" },
143
143
  description: "List of topic names to exclude from file_path results. " +
144
- "Use this to skip topics you've already loaded (e.g., exclude_topics: ['syntax', 'quickstart']). " +
144
+ "Use this to skip topics you've already loaded (e.g., exclude_topics: ['syntax', 'essentials']). " +
145
145
  "Only applies when using file_path parameter.",
146
146
  },
147
147
  },
@@ -16,20 +16,30 @@ export const XANOSCRIPT_DOCS_V2 = {
16
16
  applyTo: [],
17
17
  description: "XanoScript overview, workspace structure, and quick reference",
18
18
  },
19
- cheatsheet: {
20
- file: "cheatsheet.md",
19
+ essentials: {
20
+ file: "essentials.md",
21
21
  applyTo: ["**/*.xs"],
22
- description: "Quick reference for 20 most common XanoScript patterns",
22
+ description: "Common patterns, quick reference, and common mistakes to avoid",
23
23
  },
24
24
  syntax: {
25
25
  file: "syntax.md",
26
26
  applyTo: ["**/*.xs"],
27
27
  description: "Expressions, operators, and filters for all XanoScript code",
28
28
  },
29
- quickstart: {
30
- file: "quickstart.md",
31
- applyTo: ["**/*.xs"],
32
- description: "Common patterns, quick reference, and common mistakes to avoid",
29
+ "syntax/string-filters": {
30
+ file: "syntax/string-filters.md",
31
+ applyTo: [],
32
+ description: "String filters, regex, encoding, security filters, text functions",
33
+ },
34
+ "syntax/array-filters": {
35
+ file: "syntax/array-filters.md",
36
+ applyTo: [],
37
+ description: "Array filters, functional operations, and array functions",
38
+ },
39
+ "syntax/functions": {
40
+ file: "syntax/functions.md",
41
+ applyTo: [],
42
+ description: "Math filters/functions, object functions, bitwise operations",
33
43
  },
34
44
  types: {
35
45
  file: "types.md",
@@ -10,9 +10,11 @@ describe("xanoscript module", () => {
10
10
  it("should have all expected topics", () => {
11
11
  const expectedTopics = [
12
12
  "readme",
13
- "cheatsheet",
13
+ "essentials",
14
14
  "syntax",
15
- "quickstart",
15
+ "syntax/string-filters",
16
+ "syntax/array-filters",
17
+ "syntax/functions",
16
18
  "types",
17
19
  "tables",
18
20
  "functions",
@@ -155,10 +157,10 @@ describe("xanoscript module", () => {
155
157
  const result = getDocsForFilePath("apis/test.xs");
156
158
  expect(result).not.toContain("readme");
157
159
  });
158
- it("should include syntax and quickstart for .xs files", () => {
160
+ it("should include syntax and essentials for .xs files", () => {
159
161
  const result = getDocsForFilePath("some/random/file.xs");
160
162
  expect(result).toContain("syntax");
161
- expect(result).toContain("quickstart");
163
+ expect(result).toContain("essentials");
162
164
  });
163
165
  });
164
166
  describe("extractQuickReference", () => {
@@ -296,19 +298,19 @@ Even more content.
296
298
  it("should support exclude_topics with file_path", () => {
297
299
  const result = readXanoscriptDocsV2(DOCS_PATH, {
298
300
  file_path: "apis/users/create.xs",
299
- exclude_topics: ["syntax", "quickstart"],
301
+ exclude_topics: ["syntax", "essentials"],
300
302
  });
301
303
  expect(result).toContain("Matched topics:");
302
304
  expect(result).not.toContain("Matched topics: syntax");
303
305
  // Verify excluded topics are not in the matched list
304
306
  const matchLine = result.split("\n").find((l) => l.startsWith("Matched topics:"));
305
307
  expect(matchLine).not.toContain("syntax");
306
- expect(matchLine).not.toContain("quickstart");
308
+ expect(matchLine).not.toContain("essentials");
307
309
  });
308
310
  it("should throw when all topics are excluded via exclude_topics", () => {
309
311
  expect(() => readXanoscriptDocsV2(DOCS_PATH, {
310
312
  file_path: "branch.xs",
311
- exclude_topics: ["syntax", "cheatsheet", "quickstart", "debugging", "branch"],
313
+ exclude_topics: ["syntax", "essentials", "debugging", "branch"],
312
314
  })).toThrow("No documentation found");
313
315
  });
314
316
  it("should throw for invalid docs path", () => {
@@ -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`, `$index`.
114
+ **Reserved Variables:** The following cannot be used as variable names: `$response`, `$output`, `$input`, `$auth`, `$env`, `$db`, `$this`, `$result`, `$index`. See `xanoscript_docs({ topic: "essentials" })` for detailed variable access rules.
115
115
 
116
116
  ### Type Names
117
117
 
@@ -162,7 +162,7 @@ This helps AI tools apply the correct documentation based on the file being edit
162
162
 
163
163
  For common patterns and quick examples, use:
164
164
  ```
165
- xanoscript_docs({ topic: "quickstart" })
165
+ xanoscript_docs({ topic: "essentials" })
166
166
  ```
167
167
 
168
168
  This includes:
@@ -182,8 +182,8 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
182
182
 
183
183
  | Topic | Description | Key Sections |
184
184
  | ------------ | ---------------------------------------------------- | ------------ |
185
- | `quickstart` | Common patterns, quick examples, mistakes to avoid | Patterns, Common Mistakes |
186
- | `syntax` | Expressions, operators, filters, system variables | Filters (L179-275), Error Handling (L411-477) |
185
+ | `essentials` | Common patterns, quick examples, mistakes to avoid | Patterns, Common Mistakes |
186
+ | `syntax` | Expressions, operators, filters, system variables | Filters, Error Handling |
187
187
  | `types` | Data types, validation, input blocks | Validation Filters, Input Blocks |
188
188
  | `functions` | Reusable function stacks, async, loops | Loops, Async Patterns |
189
189
  | `schema` | Runtime schema parsing and validation | parse.object, parse.array |
@@ -193,7 +193,7 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
193
193
  | Topic | Description | Key Sections |
194
194
  | ----------- | ---------------------------------------------------------- | ------------ |
195
195
  | `tables` | Database schema definitions with indexes and relationships | Indexes, Foreign Keys |
196
- | `database` | All db.\* operations: query, get, add, edit, patch, delete | Decision Tree (L11), Bulk Ops (L450-529) |
196
+ | `database` | All db.\* operations: query, get, add, edit, patch, delete | Decision Tree, Bulk Ops |
197
197
  | `addons` | Reusable subqueries for fetching related data | Usage Patterns |
198
198
  | `streaming` | Streaming data from files, requests, and responses | File Streams, API Streams |
199
199
 
@@ -201,7 +201,7 @@ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
201
201
 
202
202
  | Topic | Description | Key Sections |
203
203
  | ---------- | --------------------------------------------------------------- | ------------ |
204
- | `apis` | HTTP endpoint definitions with authentication and CRUD patterns | Decision Tree (L9), CRUD Examples (L220-350) |
204
+ | `apis` | HTTP endpoint definitions with authentication and CRUD patterns | Decision Tree, CRUD Examples |
205
205
  | `tasks` | Scheduled and cron jobs | Cron Syntax, Input Handling |
206
206
  | `triggers` | Event-driven handlers (table, realtime, workspace, agent, MCP) | Predefined Inputs, Event Types |
207
207
  | `realtime` | Real-time channels and events for push updates | Channels, Events |
@@ -287,4 +287,4 @@ function "call_external_api" {
287
287
  }
288
288
  ```
289
289
 
290
- For more patterns, see `xanoscript_docs({ topic: "quickstart" })` or `xanoscript_docs({ topic: "integrations" })`.
290
+ For more patterns, see `xanoscript_docs({ topic: "essentials" })` or `xanoscript_docs({ topic: "integrations" })`.
@@ -112,7 +112,10 @@ db.edit "user" {
112
112
  }
113
113
 
114
114
  // Delete record
115
- db.del "user" { field_name = "id", field_value = $input.user_id }
115
+ db.del "user" {
116
+ field_name = "id"
117
+ field_value = $input.user_id
118
+ }
116
119
  ```
117
120
 
118
121
  ### API Requests
@@ -613,7 +613,7 @@ try_catch {
613
613
  conditional {
614
614
  if ($error.name == "DeadlockError") {
615
615
  // Retry logic
616
- util.sleep { value = 100 }
616
+ util.sleep { value = 1 } // value = seconds
617
617
  function.run "retry_transaction" { input = $input }
618
618
  }
619
619
  else {
@@ -646,6 +646,6 @@ Explore more with `xanoscript_docs({ topic: "<topic>" })`:
646
646
  |-------|-------------|
647
647
  | `tables` | Database schema definitions with indexes and relationships |
648
648
  | `syntax` | Query filters, operators, and expressions |
649
- | `quickstart` | Common CRUD patterns and examples |
649
+ | `essentials` | Common CRUD patterns and examples |
650
650
  | `addons` | Reusable subqueries for fetching related data |
651
651
  | `performance` | Query optimization best practices |
@@ -3,24 +3,33 @@
3
3
  "description": "Machine-readable index for XanoScript documentation",
4
4
 
5
5
  "topics": {
6
- "cheatsheet": {
7
- "file": "cheatsheet.md",
8
- "purpose": "Quick reference for 20 most common operations",
6
+ "essentials": {
7
+ "file": "essentials.md",
8
+ "purpose": "Common patterns, quick reference, and mistakes to avoid",
9
9
  "priority": 1,
10
- "aliases": ["quick", "common", "basics", "start"]
11
- },
12
- "quickstart": {
13
- "file": "quickstart.md",
14
- "purpose": "Common patterns and mistakes to avoid",
15
- "priority": 2,
16
- "aliases": ["start", "getting-started", "patterns", "mistakes"]
10
+ "aliases": ["quick", "common", "basics", "start", "cheatsheet", "quickstart", "patterns", "mistakes"]
17
11
  },
18
12
  "syntax": {
19
13
  "file": "syntax.md",
20
- "purpose": "Operators, filters, expressions, error handling",
21
- "priority": 3,
14
+ "purpose": "Operators, core filters, expressions, error handling",
15
+ "priority": 2,
22
16
  "aliases": ["filters", "operators", "expressions"]
23
17
  },
18
+ "syntax/string-filters": {
19
+ "file": "syntax/string-filters.md",
20
+ "purpose": "String filters, regex, encoding, security filters, text functions",
21
+ "aliases": ["string", "regex", "encoding", "security-filters"]
22
+ },
23
+ "syntax/array-filters": {
24
+ "file": "syntax/array-filters.md",
25
+ "purpose": "Array filters, functional operations, array functions",
26
+ "aliases": ["array", "map", "filter", "reduce", "sort"]
27
+ },
28
+ "syntax/functions": {
29
+ "file": "syntax/functions.md",
30
+ "purpose": "Math filters/functions, object functions, bitwise operations",
31
+ "aliases": ["math", "object", "bitwise"]
32
+ },
24
33
  "types": {
25
34
  "file": "types.md",
26
35
  "purpose": "Data types, validation, input blocks",
@@ -220,46 +229,44 @@
220
229
  "function.run": { "file": "functions.md" },
221
230
  "redis.get": { "file": "integrations/redis.md" },
222
231
  "redis.set": { "file": "integrations/redis.md" },
223
- "storage.s3_put": { "file": "integrations/cloud-storage.md" },
224
- "storage.s3_get": { "file": "integrations/cloud-storage.md" },
225
- "array.push": { "file": "syntax.md" },
226
- "array.pop": { "file": "syntax.md" },
227
- "array.shift": { "file": "syntax.md" },
228
- "array.unshift": { "file": "syntax.md" },
229
- "array.merge": { "file": "syntax.md" },
230
- "array.find": { "file": "syntax.md" },
231
- "array.find_index": { "file": "syntax.md" },
232
- "array.has": { "file": "syntax.md" },
233
- "array.every": { "file": "syntax.md" },
234
- "array.filter": { "file": "syntax.md" },
235
- "array.filter_count": { "file": "syntax.md" },
236
- "array.map": { "file": "syntax.md" },
237
- "array.partition": { "file": "syntax.md" },
238
- "array.group_by": { "file": "syntax.md" },
239
- "array.union": { "file": "syntax.md" },
240
- "array.difference": { "file": "syntax.md" },
241
- "array.intersection": { "file": "syntax.md" },
242
- "text.contains": { "file": "syntax.md" },
243
- "text.icontains": { "file": "syntax.md" },
244
- "text.starts_with": { "file": "syntax.md" },
245
- "text.istarts_with": { "file": "syntax.md" },
246
- "text.ends_with": { "file": "syntax.md" },
247
- "text.iends_with": { "file": "syntax.md" },
248
- "text.trim": { "file": "syntax.md" },
249
- "text.ltrim": { "file": "syntax.md" },
250
- "text.rtrim": { "file": "syntax.md" },
251
- "text.append": { "file": "syntax.md" },
252
- "text.prepend": { "file": "syntax.md" },
253
- "math.add": { "file": "syntax.md" },
254
- "math.sub": { "file": "syntax.md" },
255
- "math.mul": { "file": "syntax.md" },
256
- "math.div": { "file": "syntax.md" },
257
- "math.bitwise.and": { "file": "syntax.md" },
258
- "math.bitwise.or": { "file": "syntax.md" },
259
- "math.bitwise.xor": { "file": "syntax.md" },
260
- "object.keys": { "file": "syntax.md" },
261
- "object.values": { "file": "syntax.md" },
262
- "object.entries": { "file": "syntax.md" },
232
+ "array.push": { "file": "syntax/array-filters.md" },
233
+ "array.pop": { "file": "syntax/array-filters.md" },
234
+ "array.shift": { "file": "syntax/array-filters.md" },
235
+ "array.unshift": { "file": "syntax/array-filters.md" },
236
+ "array.merge": { "file": "syntax/array-filters.md" },
237
+ "array.find": { "file": "syntax/array-filters.md" },
238
+ "array.find_index": { "file": "syntax/array-filters.md" },
239
+ "array.has": { "file": "syntax/array-filters.md" },
240
+ "array.every": { "file": "syntax/array-filters.md" },
241
+ "array.filter": { "file": "syntax/array-filters.md" },
242
+ "array.filter_count": { "file": "syntax/array-filters.md" },
243
+ "array.map": { "file": "syntax/array-filters.md" },
244
+ "array.partition": { "file": "syntax/array-filters.md" },
245
+ "array.group_by": { "file": "syntax/array-filters.md" },
246
+ "array.union": { "file": "syntax/array-filters.md" },
247
+ "array.difference": { "file": "syntax/array-filters.md" },
248
+ "array.intersection": { "file": "syntax/array-filters.md" },
249
+ "text.contains": { "file": "syntax/string-filters.md" },
250
+ "text.icontains": { "file": "syntax/string-filters.md" },
251
+ "text.starts_with": { "file": "syntax/string-filters.md" },
252
+ "text.istarts_with": { "file": "syntax/string-filters.md" },
253
+ "text.ends_with": { "file": "syntax/string-filters.md" },
254
+ "text.iends_with": { "file": "syntax/string-filters.md" },
255
+ "text.trim": { "file": "syntax/string-filters.md" },
256
+ "text.ltrim": { "file": "syntax/string-filters.md" },
257
+ "text.rtrim": { "file": "syntax/string-filters.md" },
258
+ "text.append": { "file": "syntax/string-filters.md" },
259
+ "text.prepend": { "file": "syntax/string-filters.md" },
260
+ "math.add": { "file": "syntax/functions.md" },
261
+ "math.sub": { "file": "syntax/functions.md" },
262
+ "math.mul": { "file": "syntax/functions.md" },
263
+ "math.div": { "file": "syntax/functions.md" },
264
+ "math.bitwise.and": { "file": "syntax/functions.md" },
265
+ "math.bitwise.or": { "file": "syntax/functions.md" },
266
+ "math.bitwise.xor": { "file": "syntax/functions.md" },
267
+ "object.keys": { "file": "syntax/functions.md" },
268
+ "object.values": { "file": "syntax/functions.md" },
269
+ "object.entries": { "file": "syntax/functions.md" },
263
270
  "redis.remove": { "file": "integrations/redis.md" },
264
271
  "redis.keys": { "file": "integrations/redis.md" },
265
272
  "security.jwe_encode": { "file": "security.md" },
@@ -297,7 +304,7 @@
297
304
  "authentication": ["security.md", "apis.md"],
298
305
  "authorization": ["security.md"],
299
306
  "rate_limiting": ["security.md", "integrations/redis.md"],
300
- "error_handling": ["syntax.md", "quickstart.md"],
307
+ "error_handling": ["syntax.md", "essentials.md"],
301
308
  "pagination": ["database.md", "apis.md"],
302
309
  "file_upload": ["integrations/cloud-storage.md", "streaming.md"],
303
310
  "caching": ["performance.md", "integrations/redis.md"],