@xano/developer-mcp 1.0.40 → 1.0.42

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.
Files changed (43) hide show
  1. package/README.md +47 -84
  2. package/dist/cli_docs/index.js +7 -2
  3. package/dist/lib.d.ts +1 -3
  4. package/dist/lib.js +1 -4
  5. package/dist/meta_api_docs/format.d.ts +0 -4
  6. package/dist/meta_api_docs/format.js +0 -15
  7. package/dist/meta_api_docs/format.test.js +7 -9
  8. package/dist/meta_api_docs/index.js +10 -3
  9. package/dist/tools/index.d.ts +3 -5
  10. package/dist/tools/index.js +2 -9
  11. package/dist/tools/validate_xanoscript.js +10 -5
  12. package/dist/tools/xanoscript_docs.js +11 -5
  13. package/dist/xanoscript_docs/docs_index.json +70 -1
  14. package/dist/xanoscript_docs/integrations/cloud-storage.md +59 -3
  15. package/dist/xanoscript_docs/integrations/redis.md +28 -8
  16. package/dist/xanoscript_docs/integrations/search.md +39 -3
  17. package/dist/xanoscript_docs/integrations/utilities.md +25 -0
  18. package/dist/xanoscript_docs/security.md +39 -0
  19. package/dist/xanoscript_docs/syntax.md +411 -4
  20. package/dist/xanoscript_docs/version.json +2 -2
  21. package/package.json +1 -1
  22. package/dist/run_api_docs/format.d.ts +0 -6
  23. package/dist/run_api_docs/format.js +0 -8
  24. package/dist/run_api_docs/format.test.d.ts +0 -1
  25. package/dist/run_api_docs/format.test.js +0 -86
  26. package/dist/run_api_docs/index.d.ts +0 -52
  27. package/dist/run_api_docs/index.js +0 -90
  28. package/dist/run_api_docs/index.test.d.ts +0 -1
  29. package/dist/run_api_docs/index.test.js +0 -127
  30. package/dist/run_api_docs/topics/data.d.ts +0 -2
  31. package/dist/run_api_docs/topics/data.js +0 -104
  32. package/dist/run_api_docs/topics/history.d.ts +0 -2
  33. package/dist/run_api_docs/topics/history.js +0 -93
  34. package/dist/run_api_docs/topics/run.d.ts +0 -2
  35. package/dist/run_api_docs/topics/run.js +0 -110
  36. package/dist/run_api_docs/topics/session.d.ts +0 -2
  37. package/dist/run_api_docs/topics/session.js +0 -166
  38. package/dist/run_api_docs/topics/start.d.ts +0 -2
  39. package/dist/run_api_docs/topics/start.js +0 -97
  40. package/dist/run_api_docs/topics/workflows.d.ts +0 -2
  41. package/dist/run_api_docs/topics/workflows.js +0 -140
  42. package/dist/tools/run_api_docs.d.ts +0 -46
  43. package/dist/tools/run_api_docs.js +0 -69
@@ -221,7 +221,76 @@
221
221
  "redis.get": { "file": "integrations/redis.md" },
222
222
  "redis.set": { "file": "integrations/redis.md" },
223
223
  "storage.s3_put": { "file": "integrations/cloud-storage.md" },
224
- "storage.s3_get": { "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" },
263
+ "redis.remove": { "file": "integrations/redis.md" },
264
+ "redis.keys": { "file": "integrations/redis.md" },
265
+ "security.jwe_encode": { "file": "security.md" },
266
+ "security.jwe_decode": { "file": "security.md" },
267
+ "security.create_curve_key": { "file": "security.md" },
268
+ "security.create_secret_key": { "file": "security.md" },
269
+ "util.set_header": { "file": "integrations/utilities.md" },
270
+ "util.get_env": { "file": "integrations/utilities.md" },
271
+ "util.get_all_input": { "file": "integrations/utilities.md" },
272
+ "util.get_input": { "file": "integrations/utilities.md" },
273
+ "cloud.aws.s3.upload_file": { "file": "integrations/cloud-storage.md" },
274
+ "cloud.aws.s3.read_file": { "file": "integrations/cloud-storage.md" },
275
+ "cloud.aws.s3.sign_url": { "file": "integrations/cloud-storage.md" },
276
+ "cloud.aws.s3.list_directory": { "file": "integrations/cloud-storage.md" },
277
+ "cloud.aws.s3.delete_file": { "file": "integrations/cloud-storage.md" },
278
+ "cloud.aws.s3.get_file_info": { "file": "integrations/cloud-storage.md" },
279
+ "cloud.azure.storage.upload_file": { "file": "integrations/cloud-storage.md" },
280
+ "cloud.azure.storage.read_file": { "file": "integrations/cloud-storage.md" },
281
+ "cloud.azure.storage.sign_url": { "file": "integrations/cloud-storage.md" },
282
+ "cloud.azure.storage.list_directory": { "file": "integrations/cloud-storage.md" },
283
+ "cloud.azure.storage.delete_file": { "file": "integrations/cloud-storage.md" },
284
+ "cloud.azure.storage.get_file_info": { "file": "integrations/cloud-storage.md" },
285
+ "cloud.google.storage.upload_file": { "file": "integrations/cloud-storage.md" },
286
+ "cloud.google.storage.read_file": { "file": "integrations/cloud-storage.md" },
287
+ "cloud.google.storage.sign_url": { "file": "integrations/cloud-storage.md" },
288
+ "cloud.google.storage.list_directory": { "file": "integrations/cloud-storage.md" },
289
+ "cloud.google.storage.delete_file": { "file": "integrations/cloud-storage.md" },
290
+ "cloud.google.storage.get_file_info": { "file": "integrations/cloud-storage.md" },
291
+ "cloud.elasticsearch.request": { "file": "integrations/search.md" },
292
+ "cloud.aws.opensearch.request": { "file": "integrations/search.md" },
293
+ "cloud.algolia.request": { "file": "integrations/search.md" }
225
294
  },
226
295
 
227
296
  "tasks": {
@@ -10,9 +10,9 @@ applyTo: "function/**/*.xs, api/**/*.xs, task/**/*.xs"
10
10
 
11
11
  | Provider | Prefix | Operations |
12
12
  |----------|--------|------------|
13
- | AWS S3 | `cloud.aws.s3.*` | upload_file, read_file, sign_url, list_directory, delete_file |
14
- | Azure Blob | `cloud.azure.storage.*` | upload_file, read_file, sign_url |
15
- | Google Cloud | `cloud.google.storage.*` | upload_file, read_file, sign_url |
13
+ | AWS S3 | `cloud.aws.s3.*` | upload_file, read_file, sign_url, list_directory, delete_file, get_file_info |
14
+ | Azure Blob | `cloud.azure.storage.*` | upload_file, read_file, sign_url, list_directory, delete_file, get_file_info |
15
+ | Google Cloud | `cloud.google.storage.*` | upload_file, read_file, sign_url, list_directory, delete_file, get_file_info |
16
16
 
17
17
  ---
18
18
 
@@ -75,6 +75,17 @@ cloud.aws.s3.delete_file {
75
75
  }
76
76
  ```
77
77
 
78
+ ### Get File Info
79
+ ```xs
80
+ cloud.aws.s3.get_file_info {
81
+ bucket = "my-bucket"
82
+ region = "us-east-1"
83
+ key = $env.AWS_ACCESS_KEY
84
+ secret = $env.AWS_SECRET_KEY
85
+ file_key = "items/photo.jpg"
86
+ } as $file_metadata
87
+ ```
88
+
78
89
  ---
79
90
 
80
91
  ## Azure Blob Storage
@@ -102,6 +113,30 @@ cloud.azure.storage.sign_url {
102
113
  path = "document.pdf"
103
114
  ttl = 300
104
115
  } as $url
116
+
117
+ // List directory
118
+ cloud.azure.storage.list_directory {
119
+ account_name = $env.AZURE_ACCOUNT
120
+ account_key = $env.AZURE_KEY
121
+ container_name = "archives"
122
+ path = "2023/"
123
+ } as $yearly_archives
124
+
125
+ // Delete file
126
+ cloud.azure.storage.delete_file {
127
+ account_name = $env.AZURE_ACCOUNT
128
+ account_key = $env.AZURE_KEY
129
+ container_name = "temp_files"
130
+ filePath = "drafts/old_draft.docx"
131
+ }
132
+
133
+ // Get file info
134
+ cloud.azure.storage.get_file_info {
135
+ account_name = $env.AZURE_ACCOUNT
136
+ account_key = $env.AZURE_KEY
137
+ container_name = "media"
138
+ filePath = "videos/intro.mp4"
139
+ } as $video_metadata
105
140
  ```
106
141
 
107
142
  ---
@@ -129,6 +164,27 @@ cloud.google.storage.sign_url {
129
164
  method = "GET"
130
165
  ttl = 300
131
166
  } as $url
167
+
168
+ // List directory
169
+ cloud.google.storage.list_directory {
170
+ service_account = $env.GCP_SERVICE_ACCOUNT
171
+ bucket = "my-bucket"
172
+ path = "designs/"
173
+ } as $design_files
174
+
175
+ // Delete file
176
+ cloud.google.storage.delete_file {
177
+ service_account = $env.GCP_SERVICE_ACCOUNT
178
+ bucket = "my-bucket"
179
+ filePath = "old/temp_data.csv"
180
+ }
181
+
182
+ // Get file info
183
+ cloud.google.storage.get_file_info {
184
+ service_account = $env.GCP_SERVICE_ACCOUNT
185
+ bucket = "my-bucket"
186
+ filePath = "icons/app_icon.png"
187
+ } as $icon_details
132
188
  ```
133
189
 
134
190
  ---
@@ -20,6 +20,8 @@ applyTo: "function/**/*.xs, api/**/*.xs, task/**/*.xs"
20
20
  | `redis.range` | Get list range |
21
21
  | `redis.count` | Get list length |
22
22
  | `redis.ratelimit` | Rate limiting |
23
+ | `redis.remove` | Remove elements from list |
24
+ | `redis.keys` | Search keys by pattern |
23
25
 
24
26
  ---
25
27
 
@@ -48,13 +50,13 @@ redis.del { key = "user:123:session" }
48
50
  ## Counters
49
51
 
50
52
  ```xs
51
- # Increment
53
+ // Increment
52
54
  redis.incr {
53
55
  key = "page_views"
54
56
  by = 1
55
57
  } as $new_count
56
58
 
57
- # Decrement
59
+ // Decrement
58
60
  redis.decr {
59
61
  key = "inventory:item-123"
60
62
  by = 1
@@ -66,33 +68,51 @@ redis.decr {
66
68
  ## Lists
67
69
 
68
70
  ```xs
69
- # Push to end
71
+ // Push to end
70
72
  redis.push {
71
73
  key = "queue:tasks"
72
74
  value = $task
73
75
  } as $length
74
76
 
75
- # Push to front
77
+ // Push to front
76
78
  redis.unshift {
77
79
  key = "queue:priority"
78
80
  value = $urgent_task
79
81
  }
80
82
 
81
- # Pop from end
83
+ // Pop from end
82
84
  redis.pop { key = "queue:tasks" } as $task
83
85
 
84
- # Pop from front
86
+ // Pop from front
85
87
  redis.shift { key = "queue:tasks" } as $task
86
88
 
87
- # Get range
89
+ // Get range
88
90
  redis.range {
89
91
  key = "recent:logs"
90
92
  start = 0
91
93
  stop = 9
92
94
  } as $logs
93
95
 
94
- # Count
96
+ // Count
95
97
  redis.count { key = "queue:tasks" } as $count
98
+
99
+ // Remove specific elements from list
100
+ redis.remove {
101
+ key = "user_list"
102
+ value = "inactive_user"
103
+ count = 1
104
+ }
105
+ ```
106
+
107
+ ---
108
+
109
+ ## Key Management
110
+
111
+ ```xs
112
+ // Search keys by pattern
113
+ redis.keys {
114
+ search = "user_*"
115
+ } as $user_keys
96
116
  ```
97
117
 
98
118
  ---
@@ -10,9 +10,9 @@ applyTo: "function/**/*.xs, api/**/*.xs, task/**/*.xs"
10
10
 
11
11
  | Provider | Prefix | Operations |
12
12
  |----------|--------|------------|
13
- | Elasticsearch | `cloud.elasticsearch.*` | query, document, bulk |
14
- | AWS OpenSearch | `cloud.aws.opensearch.*` | query, document |
15
- | Algolia | `cloud.algolia.*` | search, save_object, save_objects, delete_object, set_settings |
13
+ | Elasticsearch | `cloud.elasticsearch.*` | query, document, request, bulk |
14
+ | AWS OpenSearch | `cloud.aws.opensearch.*` | query, document, request |
15
+ | Algolia | `cloud.algolia.*` | search, request, save_object, save_objects, delete_object, set_settings |
16
16
 
17
17
  ---
18
18
 
@@ -93,6 +93,19 @@ cloud.elasticsearch.bulk {
93
93
  } as $result
94
94
  ```
95
95
 
96
+ ### Raw Request
97
+
98
+ ```xs
99
+ cloud.elasticsearch.request {
100
+ auth_type = "API Key"
101
+ key_id = $env.ES_KEY_ID
102
+ access_key = $env.ES_ACCESS_KEY
103
+ method = "GET"
104
+ url = "https://my-cluster.es.io/posts/_search"
105
+ query = { query: { match: { category: "tech" } } }
106
+ } as $search_results
107
+ ```
108
+
96
109
  ### Advanced Search
97
110
 
98
111
  ```xs
@@ -147,6 +160,17 @@ cloud.aws.opensearch.query {
147
160
  size = 100
148
161
  } as $logs
149
162
 
163
+ // Raw request
164
+ cloud.aws.opensearch.request {
165
+ auth_type = "IAM"
166
+ key_id = $env.AWS_ACCESS_KEY
167
+ access_key = $env.AWS_SECRET_KEY
168
+ region = "us-east-1"
169
+ method = "POST"
170
+ url = "https://search-domain.us-east-1.es.amazonaws.com/_search"
171
+ query = { query: { term: { status: "active" } } }
172
+ } as $active_items
173
+
150
174
  // Index document
151
175
  cloud.aws.opensearch.document {
152
176
  region = "us-east-1"
@@ -164,6 +188,18 @@ cloud.aws.opensearch.document {
164
188
 
165
189
  ## Algolia
166
190
 
191
+ ### Raw Request
192
+
193
+ ```xs
194
+ cloud.algolia.request {
195
+ application_id = $env.ALGOLIA_APP_ID
196
+ api_key = $env.ALGOLIA_API_KEY
197
+ url = "https://my-algolia-app.algolia.net/1/indexes/posts/query"
198
+ method = "POST"
199
+ payload = { query: "tech" }
200
+ } as $tech_posts
201
+ ```
202
+
167
203
  ### Search
168
204
 
169
205
  ```xs
@@ -294,6 +294,31 @@ api.lambda {
294
294
 
295
295
  ## Utilities
296
296
 
297
+ ### Headers
298
+
299
+ ```xs
300
+ // Set a response header
301
+ util.set_header {
302
+ value = "Set-Cookie: sessionId=e8bb43229de9; HttpOnly; Secure; Domain=foo.example.com"
303
+ duplicates = "replace"
304
+ }
305
+ ```
306
+
307
+ ### Request Introspection
308
+
309
+ ```xs
310
+ // Get all environment variables
311
+ util.get_env as $environment_vars
312
+
313
+ // Get all parsed input data
314
+ util.get_all_input as $input_data
315
+
316
+ // Get raw, unparsed input data
317
+ util.get_input as $raw_input
318
+ ```
319
+
320
+ ### Template Engine, IP Lookup, Geo & Sleep
321
+
297
322
  ```xs
298
323
  // Template engine (Twig)
299
324
  util.template_engine {
@@ -410,6 +410,45 @@ input {
410
410
  }
411
411
  ```
412
412
 
413
+ ### Key Generation
414
+
415
+ ```xs
416
+ // Generate elliptic curve key
417
+ security.create_curve_key {
418
+ curve = "P-256"
419
+ format = "object"
420
+ } as $crypto_key
421
+
422
+ // Generate secret key for symmetric encryption
423
+ security.create_secret_key {
424
+ bits = 2048
425
+ format = "object"
426
+ } as $secret_key
427
+ ```
428
+
429
+ ### JWE (Encrypted JWT)
430
+
431
+ ```xs
432
+ // Encrypt JWT payload
433
+ security.jwe_encode {
434
+ headers = { "alg": "A256KW" }
435
+ claims = { data: "secret" }
436
+ key = $env.JWE_KEY
437
+ key_algorithm = "A256KW"
438
+ content_algorithm = "A256GCM"
439
+ ttl = 3600
440
+ } as $encrypted_token
441
+
442
+ // Decrypt JWE token
443
+ security.jwe_decode {
444
+ token = $encrypted_token
445
+ key = $env.JWE_KEY
446
+ key_algorithm = "A256KW"
447
+ content_algorithm = "A256GCM"
448
+ check_claims = { "iss": "my_app" }
449
+ } as $decoded_payload
450
+ ```
451
+
413
452
  ### JWT Security
414
453
 
415
454
  ```xs