@xano/developer-mcp 2.0.5 → 2.2.0

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.
@@ -1,19 +1,19 @@
1
1
  {
2
- "version": "1.0.0",
3
- "description": "Machine-readable index for XanoScript documentation",
2
+ "version": "2.3.0",
3
+ "description": "Machine-readable index for XanoScript documentation (version mirrors version.json)",
4
4
 
5
5
  "topics": {
6
6
  "survival": {
7
7
  "file": "survival.md",
8
- "description": "Minimal syntax survival kit for writing valid XanoScript (~3KB)",
9
- "applyTo": ["**/*.xs"],
8
+ "description": "Minimal syntax survival kit for writing valid XanoScript",
9
+ "applyTo": [],
10
10
  "priority": 0,
11
11
  "aliases": ["minimal", "tiny", "nano", "small"]
12
12
  },
13
13
  "working": {
14
14
  "file": "working.md",
15
- "description": "Complete working reference for common XanoScript tasks (~12KB)",
16
- "applyTo": ["**/*.xs"],
15
+ "description": "Complete working reference for common XanoScript tasks",
16
+ "applyTo": [],
17
17
  "priority": 0,
18
18
  "aliases": ["compact", "reference", "medium"]
19
19
  },
@@ -27,14 +27,14 @@
27
27
  "file": "essentials.md",
28
28
  "description": "Common patterns, quick reference, and common mistakes to avoid",
29
29
  "applyTo": ["**/*.xs"],
30
- "priority": 1,
30
+ "priority": 2,
31
31
  "aliases": ["quick", "common", "basics", "start", "cheatsheet", "quickstart", "patterns", "mistakes"]
32
32
  },
33
33
  "syntax": {
34
34
  "file": "syntax.md",
35
35
  "description": "Expressions, operators, and filters for all XanoScript code",
36
36
  "applyTo": ["**/*.xs"],
37
- "priority": 2,
37
+ "priority": 1,
38
38
  "aliases": ["filters", "operators", "expressions"]
39
39
  },
40
40
  "syntax/string-filters": {
@@ -59,42 +59,42 @@
59
59
  "file": "types.md",
60
60
  "description": "Data types, input blocks, and validation",
61
61
  "applyTo": ["function/**/*.xs", "api/**/*.xs", "ai/tool/*.xs", "ai/agent/*.xs"],
62
- "priority": 4,
62
+ "priority": 5,
63
63
  "aliases": ["validation", "input", "data-types"]
64
64
  },
65
65
  "tables": {
66
66
  "file": "tables.md",
67
67
  "description": "Database schema definitions with indexes and relationships",
68
68
  "applyTo": ["table/*.xs"],
69
- "priority": 8,
69
+ "priority": 3,
70
70
  "aliases": ["schema", "fields", "indexes"]
71
71
  },
72
72
  "functions": {
73
73
  "file": "functions.md",
74
74
  "description": "Reusable function stacks with inputs and responses",
75
75
  "applyTo": ["function/**/*.xs"],
76
- "priority": 6,
76
+ "priority": 3,
77
77
  "aliases": ["fn", "reusable", "stack"]
78
78
  },
79
79
  "apis": {
80
80
  "file": "apis.md",
81
81
  "description": "HTTP endpoint definitions with authentication and CRUD patterns",
82
82
  "applyTo": ["api/**/*.xs"],
83
- "priority": 7,
83
+ "priority": 3,
84
84
  "aliases": ["endpoints", "http", "rest", "query"]
85
85
  },
86
86
  "tasks": {
87
87
  "file": "tasks.md",
88
88
  "description": "Scheduled and cron jobs",
89
89
  "applyTo": ["task/*.xs"],
90
- "priority": 10,
90
+ "priority": 3,
91
91
  "aliases": ["scheduled", "jobs", "cron"]
92
92
  },
93
93
  "triggers": {
94
94
  "file": "triggers.md",
95
95
  "description": "Event-driven handlers (table, realtime, workspace, agent, MCP)",
96
96
  "applyTo": ["*/trigger/*.xs", "ai/*/trigger/*.xs", "realtime/trigger/*.xs"],
97
- "priority": 10,
97
+ "priority": 3,
98
98
  "aliases": ["events", "hooks", "handlers"]
99
99
  },
100
100
  "database": {
@@ -108,33 +108,35 @@
108
108
  "file": "agents.md",
109
109
  "description": "AI agent configuration with LLM providers and tools",
110
110
  "applyTo": ["ai/agent/*.xs"],
111
- "priority": 12,
111
+ "priority": 3,
112
112
  "aliases": ["ai", "llm", "chatbot"]
113
113
  },
114
114
  "tools": {
115
115
  "file": "tools.md",
116
116
  "description": "AI tools for agents and MCP servers",
117
117
  "applyTo": ["ai/tool/*.xs"],
118
- "priority": 12,
118
+ "priority": 3,
119
119
  "aliases": ["ai-tools", "agent-tools"]
120
120
  },
121
121
  "mcp-servers": {
122
122
  "file": "mcp-servers.md",
123
123
  "description": "MCP server definitions exposing tools",
124
124
  "applyTo": ["ai/mcp_server/*.xs"],
125
- "priority": 15,
125
+ "priority": 3,
126
126
  "aliases": ["mcp", "model-context-protocol"]
127
127
  },
128
128
  "unit-testing": {
129
129
  "file": "unit-testing.md",
130
130
  "description": "Unit tests, mocks, and assertions within functions, APIs, and middleware",
131
131
  "applyTo": ["function/**/*.xs", "api/**/*.xs", "middleware/*.xs"],
132
+ "priority": 7,
132
133
  "aliases": ["tests", "unit-tests", "mocks", "assertions"]
133
134
  },
134
135
  "workflow-tests": {
135
136
  "file": "workflow-tests.md",
136
137
  "description": "End-to-end workflow tests with data source selection and tags",
137
138
  "applyTo": ["workflow_test/*.xs"],
139
+ "priority": 3,
138
140
  "aliases": ["e2e", "workflow", "integration-tests"]
139
141
  },
140
142
  "integrations": {
@@ -145,9 +147,9 @@
145
147
  },
146
148
  "integrations/cloud-storage": {
147
149
  "file": "integrations/cloud-storage.md",
148
- "description": "AWS S3, Azure Blob, and GCP Storage operations",
150
+ "description": "AWS S3, Azure Blob, and GCP Storage operations (external buckets, not native Xano storage)",
149
151
  "applyTo": [],
150
- "aliases": ["s3", "azure", "gcp", "files", "upload"]
152
+ "aliases": ["s3", "azure", "gcp", "external-storage", "bucket"]
151
153
  },
152
154
  "integrations/search": {
153
155
  "file": "integrations/search.md",
@@ -173,40 +175,53 @@
173
175
  "applyTo": [],
174
176
  "aliases": ["email", "zip", "lambda", "archive"]
175
177
  },
178
+ "file-uploads": {
179
+ "file": "file-uploads.md",
180
+ "description": "Uploading files to native Xano storage: file? input, create_attachment, sign_private_url",
181
+ "applyTo": [],
182
+ "priority": 9,
183
+ "aliases": ["file-upload", "upload", "uploads", "attachment", "attachments", "file", "files", "private-storage", "storage", "multipart"]
184
+ },
176
185
  "frontend": {
177
186
  "file": "frontend.md",
178
187
  "description": "Static frontend development and deployment",
179
188
  "applyTo": ["static/**/*"],
189
+ "priority": 3,
180
190
  "aliases": ["static", "html", "css", "web"]
181
191
  },
182
192
  "addons": {
183
193
  "file": "addons.md",
184
194
  "description": "Reusable subqueries for fetching related data",
185
195
  "applyTo": ["addon/*.xs"],
196
+ "priority": 3,
186
197
  "aliases": ["subqueries", "relations"]
187
198
  },
188
199
  "debugging": {
189
200
  "file": "debugging.md",
190
201
  "description": "Logging, inspecting, and debugging XanoScript execution",
191
202
  "applyTo": ["**/*.xs"],
203
+ "priority": 8,
192
204
  "aliases": ["logs", "debug", "trace"]
193
205
  },
194
206
  "performance": {
195
207
  "file": "performance.md",
196
208
  "description": "Performance optimization best practices",
197
209
  "applyTo": ["function/**/*.xs", "api/**/*.xs"],
210
+ "priority": 7,
198
211
  "aliases": ["optimization", "speed", "caching"]
199
212
  },
200
213
  "realtime": {
201
214
  "file": "realtime.md",
202
215
  "description": "Real-time channels and events for push updates",
203
216
  "applyTo": ["realtime/channel/*.xs", "realtime/trigger/*.xs"],
217
+ "priority": 3,
204
218
  "aliases": ["websocket", "channels", "pubsub"]
205
219
  },
206
220
  "security": {
207
221
  "file": "security.md",
208
222
  "description": "Security best practices for authentication and authorization",
209
223
  "applyTo": ["function/**/*.xs", "api/**/*.xs"],
224
+ "priority": 6,
210
225
  "aliases": ["auth", "authorization", "permissions"]
211
226
  },
212
227
  "streaming": {
@@ -219,18 +234,21 @@
219
234
  "file": "middleware.md",
220
235
  "description": "Request/response interceptors for functions, queries, tasks, and tools",
221
236
  "applyTo": ["middleware/*.xs"],
237
+ "priority": 3,
222
238
  "aliases": ["interceptors", "hooks"]
223
239
  },
224
240
  "branch": {
225
241
  "file": "branch.md",
226
242
  "description": "Branch-level settings: middleware, history retention, visual styling",
227
243
  "applyTo": ["branch.xs"],
244
+ "priority": 3,
228
245
  "aliases": ["settings", "config"]
229
246
  },
230
247
  "workspace": {
231
248
  "file": "workspace.md",
232
249
  "description": "Workspace-level settings: environment variables, preferences, realtime",
233
250
  "applyTo": ["workspace/**/*.xs"],
251
+ "priority": 3,
234
252
  "aliases": ["env", "environment", "preferences"]
235
253
  }
236
254
  },
@@ -358,6 +376,12 @@
358
376
  "util.get_env": { "file": "integrations/utilities.md" },
359
377
  "util.get_all_input": { "file": "integrations/utilities.md" },
360
378
  "util.get_input": { "file": "integrations/utilities.md" },
379
+ "storage.create_attachment": { "file": "file-uploads.md" },
380
+ "storage.create_image": { "file": "file-uploads.md" },
381
+ "storage.sign_private_url": { "file": "file-uploads.md" },
382
+ "storage.create_file_resource": { "file": "integrations/utilities.md" },
383
+ "storage.read_file_resource": { "file": "integrations/utilities.md" },
384
+ "storage.delete_file": { "file": "integrations/utilities.md" },
361
385
  "cloud.aws.s3.upload_file": { "file": "integrations/cloud-storage.md" },
362
386
  "cloud.aws.s3.read_file": { "file": "integrations/cloud-storage.md" },
363
387
  "cloud.aws.s3.sign_url": { "file": "integrations/cloud-storage.md" },
@@ -387,7 +411,7 @@
387
411
  "rate_limiting": ["security.md", "integrations/redis.md"],
388
412
  "error_handling": ["syntax.md", "essentials.md"],
389
413
  "pagination": ["database.md", "apis.md"],
390
- "file_upload": ["integrations/cloud-storage.md", "streaming.md"],
414
+ "file_upload": ["file-uploads.md", "integrations/cloud-storage.md", "streaming.md"],
391
415
  "caching": ["performance.md", "integrations/redis.md"],
392
416
  "search": ["integrations/search.md"],
393
417
  "email": ["integrations/utilities.md"],
@@ -640,6 +640,32 @@ Each `.xs` file must contain exactly **one** construct. Placing two constructs i
640
640
  // function/helper_b.xs -> contains only "helper_b"
641
641
  ```
642
642
 
643
+ ### 14. Using `image?` for file uploads (the `.path` footgun)
644
+
645
+ Upload inputs **must** be typed `file?`. `image?`/`attachment?`/`video?`/`audio?` pass the raw upload object (which has `tmp_name` but no `.path`), so `storage.*` fails at runtime with `Missing param: path`. The validator does **not** catch this — it is syntactically valid.
646
+
647
+ ```xs
648
+ // Wrong - image? input; storage op fails with "Missing param: path"
649
+ // input { image? photo }
650
+ // storage.create_image { value = $input.photo } as $f
651
+
652
+ // Also wrong - hand-setting .path from a hallucinated .tmp_name property
653
+ // |set:"path":$input.photo.tmp_name
654
+
655
+ // Correct - file? input populates .path; create_attachment accepts any type
656
+ // (value, access, and filename are all required on storage.create_attachment)
657
+ stack {
658
+ storage.create_attachment {
659
+ value = $input.photo
660
+ access = "private"
661
+ filename = $input.photo.name
662
+ } as $f
663
+ }
664
+ // input { file? photo }
665
+ ```
666
+
667
+ See `xano_xanoscript_docs({ topic: "file-uploads" })` for the full pattern.
668
+
643
669
  ---
644
670
 
645
671
  ## Related Topics
@@ -653,5 +679,6 @@ Explore more with `xano_xanoscript_docs({ topic: "<topic>" })`:
653
679
  | `database` | All db.* operations: query, get, add, edit, delete |
654
680
  | `functions` | Reusable function stacks, async patterns, loops |
655
681
  | `apis` | HTTP endpoints, authentication, CRUD patterns |
682
+ | `file-uploads` | Uploading files to Xano storage (`file?`, create_attachment, signed URLs) |
656
683
  | `security` | Security best practices and authentication |
657
684
  | `integrations` | External API patterns (OpenAI, Stripe, etc.) |