@xano/developer-mcp 1.0.41 → 1.0.43

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 (38) 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/README.md +1 -1
  14. package/dist/xanoscript_docs/quickstart.md +1 -1
  15. package/dist/xanoscript_docs/streaming.md +1 -1
  16. package/package.json +1 -1
  17. package/dist/run_api_docs/format.d.ts +0 -6
  18. package/dist/run_api_docs/format.js +0 -8
  19. package/dist/run_api_docs/format.test.d.ts +0 -1
  20. package/dist/run_api_docs/format.test.js +0 -86
  21. package/dist/run_api_docs/index.d.ts +0 -52
  22. package/dist/run_api_docs/index.js +0 -90
  23. package/dist/run_api_docs/index.test.d.ts +0 -1
  24. package/dist/run_api_docs/index.test.js +0 -127
  25. package/dist/run_api_docs/topics/data.d.ts +0 -2
  26. package/dist/run_api_docs/topics/data.js +0 -104
  27. package/dist/run_api_docs/topics/history.d.ts +0 -2
  28. package/dist/run_api_docs/topics/history.js +0 -93
  29. package/dist/run_api_docs/topics/run.d.ts +0 -2
  30. package/dist/run_api_docs/topics/run.js +0 -110
  31. package/dist/run_api_docs/topics/session.d.ts +0 -2
  32. package/dist/run_api_docs/topics/session.js +0 -166
  33. package/dist/run_api_docs/topics/start.d.ts +0 -2
  34. package/dist/run_api_docs/topics/start.js +0 -97
  35. package/dist/run_api_docs/topics/workflows.d.ts +0 -2
  36. package/dist/run_api_docs/topics/workflows.js +0 -140
  37. package/dist/tools/run_api_docs.d.ts +0 -46
  38. package/dist/tools/run_api_docs.js +0 -69
package/README.md CHANGED
@@ -29,7 +29,6 @@ An MCP server and standalone library that gives AI assistants superpowers for de
29
29
  This MCP server acts as a bridge between AI models and Xano's developer ecosystem, offering:
30
30
 
31
31
  - **Meta API Documentation** - Programmatically manage Xano workspaces, databases, APIs, functions, and more
32
- - **Run API Documentation** - Runtime execution, session management, and XanoScript execution
33
32
  - **CLI Documentation** - Command-line interface for local development, code sync, and execution
34
33
  - **XanoScript Documentation** - Language reference with context-aware docs based on file type
35
34
  - **Code Validation** - Syntax checking with the official XanoScript language server
@@ -162,7 +161,6 @@ import {
162
161
  validateXanoscript,
163
162
  xanoscriptDocs,
164
163
  metaApiDocs,
165
- runApiDocs,
166
164
  cliDocs,
167
165
  mcpVersion
168
166
  } from '@xano/developer-mcp';
@@ -173,6 +171,7 @@ import {
173
171
  ```typescript
174
172
  import { validateXanoscript } from '@xano/developer-mcp';
175
173
 
174
+ // Validate code directly
176
175
  const result = validateXanoscript({ code: 'var:result = 1 + 2' });
177
176
 
178
177
  if (result.valid) {
@@ -183,6 +182,13 @@ if (result.valid) {
183
182
  console.log(` Line ${error.range.start.line + 1}: ${error.message}`);
184
183
  });
185
184
  }
185
+
186
+ // Validate a file
187
+ const fileResult = validateXanoscript({ file_path: './functions/utils.xs' });
188
+
189
+ // Batch validate a directory
190
+ const dirResult = validateXanoscript({ directory: './apis', pattern: '**/*.xs' });
191
+ console.log(`${dirResult.valid_files}/${dirResult.total_files} files valid`);
186
192
  ```
187
193
 
188
194
  ### Get XanoScript Documentation
@@ -222,19 +228,6 @@ const workspaceDocs = metaApiDocs({
222
228
  console.log(workspaceDocs.documentation);
223
229
  ```
224
230
 
225
- ### Get Run API Documentation
226
-
227
- ```typescript
228
- import { runApiDocs } from '@xano/developer-mcp';
229
-
230
- const sessionDocs = runApiDocs({
231
- topic: 'session',
232
- detail_level: 'detailed'
233
- });
234
-
235
- console.log(sessionDocs.documentation);
236
- ```
237
-
238
231
  ### Get CLI Documentation
239
232
 
240
233
  ```typescript
@@ -260,7 +253,6 @@ console.log(`Using version ${version}`);
260
253
  | `validateXanoscript` | Validate XanoScript code and get detailed error information |
261
254
  | `xanoscriptDocs` | Get XanoScript language documentation |
262
255
  | `metaApiDocs` | Get Meta API documentation |
263
- | `runApiDocs` | Get Run API documentation |
264
256
  | `cliDocs` | Get CLI documentation |
265
257
  | `mcpVersion` | Get the package version |
266
258
  | `toolDefinitions` | MCP tool definitions (for building custom MCP servers) |
@@ -277,7 +269,6 @@ import type {
277
269
  ParserDiagnostic,
278
270
  XanoscriptDocsArgs,
279
271
  MetaApiDocsArgs,
280
- RunApiDocsArgs,
281
272
  CliDocsArgs,
282
273
  ToolResult
283
274
  } from '@xano/developer-mcp';
@@ -302,21 +293,38 @@ import '@xano/developer-mcp/server';
302
293
 
303
294
  ### 1. `validate_xanoscript`
304
295
 
305
- Validates XanoScript code for syntax errors. The language server auto-detects the object type from the code syntax.
296
+ Validates XanoScript code for syntax errors. Supports multiple input methods. The language server auto-detects the object type from the code syntax.
306
297
 
307
298
  **Parameters:**
308
299
  | Parameter | Type | Required | Description |
309
300
  |-----------|------|----------|-------------|
310
- | `code` | string | Yes | The XanoScript code to validate |
301
+ | `code` | string | No | The XanoScript code to validate as a string |
302
+ | `file_path` | string | No | Path to a single `.xs` file to validate |
303
+ | `file_paths` | string[] | No | Array of file paths for batch validation |
304
+ | `directory` | string | No | Directory path to validate all `.xs` files recursively |
305
+ | `pattern` | string | No | Glob pattern to filter files when using `directory` (default: `**/*.xs`) |
311
306
 
312
- **Example:**
307
+ > One of `code`, `file_path`, `file_paths`, or `directory` is required.
308
+
309
+ **Examples:**
313
310
  ```
314
- validate_xanoscript({
315
- code: "var:result = 1 + 2"
316
- })
311
+ // Validate code directly
312
+ validate_xanoscript({ code: "var:result = 1 + 2" })
313
+
314
+ // Validate a single file
315
+ validate_xanoscript({ file_path: "functions/utils/format.xs" })
316
+
317
+ // Validate multiple files
318
+ validate_xanoscript({ file_paths: ["apis/users/get.xs", "apis/users/create.xs"] })
319
+
320
+ // Validate all .xs files in a directory
321
+ validate_xanoscript({ directory: "apis/users" })
322
+
323
+ // Validate with a specific pattern
324
+ validate_xanoscript({ directory: "src", pattern: "apis/**/*.xs" })
317
325
  ```
318
326
 
319
- **Returns:** List of errors with line/column positions, or confirmation of validity.
327
+ **Returns:** List of errors with line/column positions and helpful suggestions, or confirmation of validity.
320
328
 
321
329
  ### 2. `xanoscript_docs`
322
330
 
@@ -336,6 +344,7 @@ Retrieves XanoScript programming language documentation with context-aware suppo
336
344
  | `readme` | XanoScript overview, workspace structure, and quick reference |
337
345
  | `cheatsheet` | Quick reference for 20 most common XanoScript patterns (recommended first stop) |
338
346
  | `syntax` | Expressions, operators, and filters for all XanoScript code |
347
+ | `quickstart` | Common patterns, quick reference, and common mistakes to avoid |
339
348
  | `types` | Data types, input blocks, and validation |
340
349
  | `tables` | Database schema definitions with indexes and relationships |
341
350
  | `functions` | Reusable function stacks with inputs and responses |
@@ -363,6 +372,9 @@ Retrieves XanoScript programming language documentation with context-aware suppo
363
372
  | `schema` | Runtime schema parsing and validation |
364
373
  | `security` | Security best practices for authentication and authorization |
365
374
  | `streaming` | Streaming data from files, requests, and responses |
375
+ | `middleware` | Request/response interceptors for functions, queries, tasks, and tools |
376
+ | `branch` | Branch-level settings: middleware, history retention, visual styling |
377
+ | `workspace` | Workspace-level settings: environment variables, preferences, realtime |
366
378
 
367
379
  **Examples:**
368
380
  ```
@@ -382,46 +394,7 @@ xanoscript_docs({ file_path: "api/users/create_post.xs" })
382
394
  xanoscript_docs({ topic: "database", mode: "quick_reference" })
383
395
  ```
384
396
 
385
- ### 3. `run_api_docs`
386
-
387
- Get documentation for Xano's Run API. Use this to understand runtime execution, session management, and XanoScript execution.
388
-
389
- **Important:** The Run API uses a fixed base URL: `https://app.dev.xano.com/api:run/<endpoint>` (NOT your Xano instance URL)
390
-
391
- **Parameters:**
392
- | Parameter | Type | Required | Description |
393
- |-----------|------|----------|-------------|
394
- | `topic` | string | Yes | Documentation topic to retrieve |
395
- | `detail_level` | string | No | `overview`, `detailed` (default), or `examples` |
396
- | `include_schemas` | boolean | No | Include JSON schemas for requests/responses (default: true) |
397
-
398
- **Available Topics:**
399
-
400
- | Topic | Description |
401
- |-------|-------------|
402
- | `start` | Getting started with the Run API |
403
- | `run` | Execute XanoScript code and API endpoints |
404
- | `session` | Session management for stateful execution |
405
- | `history` | Execution history and debugging |
406
- | `data` | Data operations and variable management |
407
- | `workflows` | Step-by-step workflow guides |
408
-
409
- **Examples:**
410
- ```
411
- // Get overview of Run API
412
- run_api_docs({ topic: "start" })
413
-
414
- // Get detailed run endpoint documentation
415
- run_api_docs({ topic: "run", detail_level: "detailed" })
416
-
417
- // Get examples without schemas (smaller context)
418
- run_api_docs({ topic: "session", detail_level: "examples", include_schemas: false })
419
-
420
- // Step-by-step workflow guides
421
- run_api_docs({ topic: "workflows" })
422
- ```
423
-
424
- ### 4. `mcp_version`
397
+ ### 3. `mcp_version`
425
398
 
426
399
  Get the current version of the Xano Developer MCP server.
427
400
 
@@ -434,7 +407,7 @@ Get the current version of the Xano Developer MCP server.
434
407
  mcp_version()
435
408
  ```
436
409
 
437
- ### 5. `meta_api_docs`
410
+ ### 4. `meta_api_docs`
438
411
 
439
412
  Get documentation for Xano's Meta API. Use this to understand how to programmatically manage Xano workspaces, databases, APIs, functions, agents, and more.
440
413
 
@@ -482,7 +455,7 @@ meta_api_docs({ topic: "api", detail_level: "examples", include_schemas: false }
482
455
  meta_api_docs({ topic: "workflows" })
483
456
  ```
484
457
 
485
- ### 6. `cli_docs`
458
+ ### 5. `cli_docs`
486
459
 
487
460
  Get documentation for the Xano CLI. The CLI is **optional but recommended** for local development workflows. Not all users will have it installed.
488
461
 
@@ -504,6 +477,7 @@ Use this tool to understand CLI commands for local development, code synchroniza
504
477
  | `start` | Getting started with the CLI - installation and setup |
505
478
  | `profile` | Profile management - credentials and multi-environment setup |
506
479
  | `workspace` | Workspace operations - pull/push code sync |
480
+ | `branch` | Branch management - list, switch, create, and delete branches |
507
481
  | `function` | Function management - list, get, create, edit |
508
482
  | `run` | Run API commands - execute code, manage projects/sessions |
509
483
  | `static_host` | Static hosting - deploy frontend builds |
@@ -533,6 +507,7 @@ The server also exposes XanoScript documentation as MCP resources for direct acc
533
507
  | `xanoscript://docs/readme` | Overview and quick reference |
534
508
  | `xanoscript://docs/cheatsheet` | Quick reference for 20 most common patterns |
535
509
  | `xanoscript://docs/syntax` | Expressions, operators, and filters |
510
+ | `xanoscript://docs/quickstart` | Common patterns and common mistakes to avoid |
536
511
  | `xanoscript://docs/types` | Data types and validation |
537
512
  | `xanoscript://docs/tables` | Database schema definitions |
538
513
  | `xanoscript://docs/functions` | Reusable function stacks |
@@ -560,12 +535,15 @@ The server also exposes XanoScript documentation as MCP resources for direct acc
560
535
  | `xanoscript://docs/schema` | Runtime schema parsing |
561
536
  | `xanoscript://docs/security` | Security best practices |
562
537
  | `xanoscript://docs/streaming` | Data streaming operations |
538
+ | `xanoscript://docs/middleware` | Request/response interceptors |
539
+ | `xanoscript://docs/branch` | Branch-level settings |
540
+ | `xanoscript://docs/workspace` | Workspace-level settings |
563
541
 
564
542
  ## npm Scripts
565
543
 
566
544
  | Script | Command | Description |
567
545
  |--------|---------|-------------|
568
- | `build` | `tsc` | Compile TypeScript to JavaScript |
546
+ | `build` | `tsc && cp -r src/xanoscript_docs dist/` | Compile TypeScript and copy docs |
569
547
  | `start` | `node dist/index.js` | Run the MCP server |
570
548
  | `dev` | `tsc && node dist/index.js` | Build and run in development |
571
549
  | `test` | `vitest run` | Run unit tests |
@@ -589,7 +567,6 @@ xano-developer-mcp/
589
567
  │ │ ├── xanoscript_docs.ts # XanoScript docs tool
590
568
  │ │ ├── mcp_version.ts # Version tool
591
569
  │ │ ├── meta_api_docs.ts # Meta API docs tool wrapper
592
- │ │ ├── run_api_docs.ts # Run API docs tool wrapper
593
570
  │ │ └── cli_docs.ts # CLI docs tool wrapper
594
571
  │ ├── meta_api_docs/ # Meta API documentation
595
572
  │ │ ├── index.ts # API docs handler
@@ -599,12 +576,6 @@ xano-developer-mcp/
599
576
  │ │ ├── format.ts # Documentation formatter
600
577
  │ │ ├── format.test.ts # Tests for formatter
601
578
  │ │ └── topics/ # Individual topic modules
602
- │ ├── run_api_docs/ # Run API documentation
603
- │ │ ├── index.ts # Run API handler
604
- │ │ ├── index.test.ts # Tests for index
605
- │ │ ├── format.ts # Documentation formatter
606
- │ │ ├── format.test.ts # Tests for formatter
607
- │ │ └── topics/ # Individual topic modules
608
579
  │ ├── cli_docs/ # Xano CLI documentation
609
580
  │ │ ├── index.ts # CLI docs handler
610
581
  │ │ ├── types.ts # Type definitions
@@ -626,7 +597,7 @@ xano-developer-mcp/
626
597
  | Package | Version | Purpose |
627
598
  |---------|---------|---------|
628
599
  | `@modelcontextprotocol/sdk` | ^1.26.0 | Official MCP SDK |
629
- | `@xano/xanoscript-language-server` | ^11.6.3 | XanoScript parser and validation |
600
+ | `@xano/xanoscript-language-server` | ^11.6.5 | XanoScript parser and validation |
630
601
  | `minimatch` | ^10.1.2 | Glob pattern matching for context-aware docs |
631
602
 
632
603
  ### Dev Dependencies
@@ -655,8 +626,6 @@ Xano Developer MCP Server
655
626
 
656
627
  ├─► meta_api_docs → Meta API documentation with detail levels
657
628
 
658
- ├─► run_api_docs → Run API documentation for runtime execution
659
-
660
629
  ├─► cli_docs → CLI documentation for local development workflows
661
630
 
662
631
  ├─► mcp_version → Returns server version from package.json
@@ -666,7 +635,7 @@ Xano Developer MCP Server
666
635
 
667
636
  ## Authentication
668
637
 
669
- The MCP server and library functions do not require authentication. However, when using the documented APIs (Meta API, Run API) to interact with actual Xano services, you will need appropriate Xano API credentials. See the `meta_api_docs` and `run_api_docs` tools for authentication details.
638
+ The MCP server and library functions do not require authentication. However, when using the documented APIs (Meta API) to interact with actual Xano services, you will need appropriate Xano API credentials. See the `meta_api_docs` tool for authentication details.
670
639
 
671
640
  ## Development
672
641
 
@@ -717,8 +686,6 @@ npm run test:coverage
717
686
  | `meta_api_docs/index.ts` | `meta_api_docs/index.test.ts` | Meta API documentation handler and topic management |
718
687
  | `meta_api_docs/format.ts` | `meta_api_docs/format.test.ts` | Documentation formatting for endpoints, examples, and patterns |
719
688
  | `meta_api_docs/types.ts` | `meta_api_docs/types.test.ts` | Type structure validation |
720
- | `run_api_docs/index.ts` | `run_api_docs/index.test.ts` | Run API documentation handler |
721
- | `run_api_docs/format.ts` | `run_api_docs/format.test.ts` | Run API formatting with correct base URL |
722
689
 
723
690
  ### Test Structure
724
691
 
@@ -734,10 +701,6 @@ src/
734
701
  │ ├── format.ts
735
702
  │ ├── format.test.ts # Tests for format.ts
736
703
  │ └── ...
737
- └── run_api_docs/
738
- ├── index.ts
739
- ├── index.test.ts # Tests for index.ts
740
- └── ...
741
704
  ```
742
705
 
743
706
  ### Writing Tests
@@ -74,13 +74,18 @@ ${getTopicDescriptions()}
74
74
  topic: {
75
75
  type: "string",
76
76
  enum: getTopicNames(),
77
- description: "Documentation topic to retrieve",
77
+ description: "Documentation topic to retrieve. Start with 'start' for installation and setup. " +
78
+ "Example: topic='function' for function management commands, topic='run' for running XanoScript locally.",
78
79
  },
79
80
  detail_level: {
80
81
  type: "string",
81
82
  enum: ["overview", "detailed", "examples"],
82
83
  default: "detailed",
83
- description: "Level of detail: overview (brief), detailed (full docs), examples (with examples)",
84
+ description: "Level of detail to return. " +
85
+ "'overview' = brief summary of commands and their purpose. " +
86
+ "'detailed' = full command reference with flags and arguments. " +
87
+ "'examples' = includes usage examples for each command. " +
88
+ "Default: 'detailed'.",
84
89
  },
85
90
  },
86
91
  required: ["topic"],
package/dist/lib.d.ts CHANGED
@@ -10,7 +10,6 @@
10
10
  * validateXanoscript,
11
11
  * xanoscriptDocs,
12
12
  * metaApiDocs,
13
- * runApiDocs,
14
13
  * cliDocs,
15
14
  * mcpVersion
16
15
  * } from '@xano/developer-mcp';
@@ -46,8 +45,7 @@ export { validateXanoscript, type ValidateXanoscriptArgs, type ValidationResult,
46
45
  export { xanoscriptDocs, getXanoscriptDocsPath, setXanoscriptDocsPath, type XanoscriptDocsArgs, type XanoscriptDocsResult, } from "./tools/xanoscript_docs.js";
47
46
  export { mcpVersion, getServerVersion, setServerVersion, type McpVersionResult, } from "./tools/mcp_version.js";
48
47
  export { metaApiDocs, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, type MetaApiDocsArgs, type MetaApiDocsResult, } from "./tools/meta_api_docs.js";
49
- export { runApiDocs, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions, type RunApiDocsArgs, type RunApiDocsResult, } from "./tools/run_api_docs.js";
50
48
  export { cliDocs, cliTopics, getCliTopicNames, getCliTopicDescriptions, type CliDocsArgs, type CliDocsResult, } from "./tools/cli_docs.js";
51
49
  export { type ToolResult, toMcpResponse } from "./tools/types.js";
52
50
  export { XANOSCRIPT_DOCS_V2, readXanoscriptDocsV2, getDocsForFilePath, extractQuickReference, getXanoscriptDocsVersion, getTopicNames as getXanoscriptTopicNames, getTopicDescriptions as getXanoscriptTopicDescriptions, type DocConfig, } from "./xanoscript.js";
53
- export { toolDefinitions, handleTool, validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, runApiDocsToolDefinition, cliDocsToolDefinition, } from "./tools/index.js";
51
+ export { toolDefinitions, handleTool, validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, cliDocsToolDefinition, } from "./tools/index.js";
package/dist/lib.js CHANGED
@@ -10,7 +10,6 @@
10
10
  * validateXanoscript,
11
11
  * xanoscriptDocs,
12
12
  * metaApiDocs,
13
- * runApiDocs,
14
13
  * cliDocs,
15
14
  * mcpVersion
16
15
  * } from '@xano/developer-mcp';
@@ -53,8 +52,6 @@ export { xanoscriptDocs, getXanoscriptDocsPath, setXanoscriptDocsPath, } from ".
53
52
  export { mcpVersion, getServerVersion, setServerVersion, } from "./tools/mcp_version.js";
54
53
  // Meta API Documentation
55
54
  export { metaApiDocs, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, } from "./tools/meta_api_docs.js";
56
- // Run API Documentation
57
- export { runApiDocs, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions, } from "./tools/run_api_docs.js";
58
55
  // CLI Documentation
59
56
  export { cliDocs, cliTopics, getCliTopicNames, getCliTopicDescriptions, } from "./tools/cli_docs.js";
60
57
  // =============================================================================
@@ -68,4 +65,4 @@ export { XANOSCRIPT_DOCS_V2, readXanoscriptDocsV2, getDocsForFilePath, extractQu
68
65
  // =============================================================================
69
66
  // MCP Tool Definitions (for building custom MCP servers)
70
67
  // =============================================================================
71
- export { toolDefinitions, handleTool, validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, runApiDocsToolDefinition, cliDocsToolDefinition, } from "./tools/index.js";
68
+ export { toolDefinitions, handleTool, validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, cliDocsToolDefinition, } from "./tools/index.js";
@@ -13,8 +13,4 @@ export interface FormatConfig {
13
13
  * Default config for Meta API
14
14
  */
15
15
  export declare const META_API_CONFIG: FormatConfig;
16
- /**
17
- * Config for Run API
18
- */
19
- export declare const RUN_API_CONFIG: FormatConfig;
20
16
  export declare function formatDocumentation(doc: TopicDoc, detailLevel?: DetailLevel, includeSchemas?: boolean, config?: FormatConfig): string;
@@ -13,21 +13,6 @@ Authorization: \`Bearer <your-access-token>\`
13
13
  `,
14
14
  toolName: "meta_api_docs",
15
15
  };
16
- /**
17
- * Config for Run API
18
- */
19
- export const RUN_API_CONFIG = {
20
- baseUrlInfo: `## Base URL
21
- \`\`\`
22
- https://app.dev.xano.com/api:run/<endpoint>
23
- \`\`\`
24
-
25
- **Important:** This is a fixed URL - NOT your Xano instance URL. All Run API requests go to this central endpoint.
26
-
27
- Authorization: \`Bearer <your-access-token>\`
28
- `,
29
- toolName: "run_api_docs",
30
- };
31
16
  function formatParameter(param) {
32
17
  const required = param.required ? " (required)" : "";
33
18
  const defaultVal = param.default !== undefined ? ` [default: ${param.default}]` : "";
@@ -1,5 +1,5 @@
1
1
  import { describe, it, expect } from "vitest";
2
- import { formatDocumentation, META_API_CONFIG, RUN_API_CONFIG, } from "./format.js";
2
+ import { formatDocumentation, META_API_CONFIG, } from "./format.js";
3
3
  describe("meta_api_docs/format", () => {
4
4
  describe("META_API_CONFIG", () => {
5
5
  it("should have correct base URL info", () => {
@@ -7,12 +7,6 @@ describe("meta_api_docs/format", () => {
7
7
  expect(META_API_CONFIG.toolName).toBe("meta_api_docs");
8
8
  });
9
9
  });
10
- describe("RUN_API_CONFIG", () => {
11
- it("should have correct base URL info", () => {
12
- expect(RUN_API_CONFIG.baseUrlInfo).toContain("https://app.dev.xano.com/api:run/");
13
- expect(RUN_API_CONFIG.toolName).toBe("run_api_docs");
14
- });
15
- });
16
10
  describe("formatDocumentation", () => {
17
11
  const minimalDoc = {
18
12
  topic: "test",
@@ -225,8 +219,12 @@ describe("meta_api_docs/format", () => {
225
219
  expect(result).toContain("meta_api_docs");
226
220
  });
227
221
  it("should use custom config", () => {
228
- const result = formatDocumentation({ ...minimalDoc, patterns: [{ name: "Test", steps: ["step"] }] }, "detailed", true, RUN_API_CONFIG);
229
- expect(result).toContain("https://app.dev.xano.com/api:run/");
222
+ const customConfig = {
223
+ baseUrlInfo: "## Base URL\nhttps://custom.example.com/api/",
224
+ toolName: "custom_docs",
225
+ };
226
+ const result = formatDocumentation({ ...minimalDoc, patterns: [{ name: "Test", steps: ["step"] }] }, "detailed", true, customConfig);
227
+ expect(result).toContain("https://custom.example.com/api/");
230
228
  });
231
229
  describe("detail levels", () => {
232
230
  const docWithAll = {
@@ -92,18 +92,25 @@ ${getTopicDescriptions()}
92
92
  topic: {
93
93
  type: "string",
94
94
  enum: getTopicNames(),
95
- description: "Documentation topic to retrieve",
95
+ description: "Documentation topic to retrieve. Start with 'start' for an overview of the Meta API. " +
96
+ "Example: topic='workspace' for workspace management endpoints, topic='table' for database table operations.",
96
97
  },
97
98
  detail_level: {
98
99
  type: "string",
99
100
  enum: ["overview", "detailed", "examples"],
100
101
  default: "detailed",
101
- description: "Level of detail: overview (brief), detailed (full docs), examples (with code examples)",
102
+ description: "Level of detail to return. " +
103
+ "'overview' = brief summary of endpoints and their purpose. " +
104
+ "'detailed' = full API reference with parameters, headers, and response formats. " +
105
+ "'examples' = includes curl and fetch code examples for each endpoint. " +
106
+ "Default: 'detailed'.",
102
107
  },
103
108
  include_schemas: {
104
109
  type: "boolean",
105
110
  default: true,
106
- description: "Include JSON schemas for requests/responses",
111
+ description: "Include JSON schemas for request bodies and response payloads. " +
112
+ "Useful for understanding the expected data format. Set to false to reduce response size. " +
113
+ "Default: true.",
107
114
  },
108
115
  },
109
116
  required: ["topic"],
@@ -19,7 +19,6 @@
19
19
  * validateXanoscript,
20
20
  * xanoscriptDocs,
21
21
  * metaApiDocs,
22
- * runApiDocs,
23
22
  * cliDocs,
24
23
  * mcpVersion
25
24
  * } from '@xano/developer-mcp';
@@ -33,12 +32,11 @@ import { validateXanoscript, validateXanoscriptTool, validateXanoscriptToolDefin
33
32
  import { xanoscriptDocs, xanoscriptDocsTool, xanoscriptDocsToolDefinition, getXanoscriptDocsPath, setXanoscriptDocsPath, type XanoscriptDocsArgs, type XanoscriptDocsResult } from "./xanoscript_docs.js";
34
33
  import { mcpVersion, mcpVersionTool, mcpVersionToolDefinition, getServerVersion, setServerVersion, type McpVersionResult } from "./mcp_version.js";
35
34
  import { metaApiDocs, metaApiDocsTool, metaApiDocsToolDefinition, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, type MetaApiDocsArgs, type MetaApiDocsResult } from "./meta_api_docs.js";
36
- import { runApiDocs, runApiDocsTool, runApiDocsToolDefinition, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions, type RunApiDocsArgs, type RunApiDocsResult } from "./run_api_docs.js";
37
35
  import { cliDocs, cliDocsTool, cliDocsToolDefinition, cliTopics, getCliTopicNames, getCliTopicDescriptions, type CliDocsArgs, type CliDocsResult } from "./cli_docs.js";
38
36
  import { type ToolResult, toMcpResponse } from "./types.js";
39
- export { validateXanoscript, TYPE_ALIASES, RESERVED_VARIABLES, type ValidateXanoscriptArgs, type ValidationResult, type BatchValidationResult, type SingleFileValidationResult, type ParserDiagnostic, xanoscriptDocs, getXanoscriptDocsPath, setXanoscriptDocsPath, type XanoscriptDocsArgs, type XanoscriptDocsResult, mcpVersion, getServerVersion, setServerVersion, type McpVersionResult, metaApiDocs, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, type MetaApiDocsArgs, type MetaApiDocsResult, runApiDocs, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions, type RunApiDocsArgs, type RunApiDocsResult, cliDocs, cliTopics, getCliTopicNames, getCliTopicDescriptions, type CliDocsArgs, type CliDocsResult, type ToolResult, toMcpResponse, };
40
- export { validateXanoscriptTool, xanoscriptDocsTool, mcpVersionTool, metaApiDocsTool, runApiDocsTool, cliDocsTool, };
41
- export { validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, runApiDocsToolDefinition, cliDocsToolDefinition, };
37
+ export { validateXanoscript, TYPE_ALIASES, RESERVED_VARIABLES, type ValidateXanoscriptArgs, type ValidationResult, type BatchValidationResult, type SingleFileValidationResult, type ParserDiagnostic, xanoscriptDocs, getXanoscriptDocsPath, setXanoscriptDocsPath, type XanoscriptDocsArgs, type XanoscriptDocsResult, mcpVersion, getServerVersion, setServerVersion, type McpVersionResult, metaApiDocs, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, type MetaApiDocsArgs, type MetaApiDocsResult, cliDocs, cliTopics, getCliTopicNames, getCliTopicDescriptions, type CliDocsArgs, type CliDocsResult, type ToolResult, toMcpResponse, };
38
+ export { validateXanoscriptTool, xanoscriptDocsTool, mcpVersionTool, metaApiDocsTool, cliDocsTool, };
39
+ export { validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, cliDocsToolDefinition, };
42
40
  /**
43
41
  * All tool definitions for MCP server registration
44
42
  */
@@ -19,7 +19,6 @@
19
19
  * validateXanoscript,
20
20
  * xanoscriptDocs,
21
21
  * metaApiDocs,
22
- * runApiDocs,
23
22
  * cliDocs,
24
23
  * mcpVersion
25
24
  * } from '@xano/developer-mcp';
@@ -36,7 +35,6 @@ import { validateXanoscript, validateXanoscriptTool, validateXanoscriptToolDefin
36
35
  import { xanoscriptDocs, xanoscriptDocsTool, xanoscriptDocsToolDefinition, getXanoscriptDocsPath, setXanoscriptDocsPath, } from "./xanoscript_docs.js";
37
36
  import { mcpVersion, mcpVersionTool, mcpVersionToolDefinition, getServerVersion, setServerVersion, } from "./mcp_version.js";
38
37
  import { metaApiDocs, metaApiDocsTool, metaApiDocsToolDefinition, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions, } from "./meta_api_docs.js";
39
- import { runApiDocs, runApiDocsTool, runApiDocsToolDefinition, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions, } from "./run_api_docs.js";
40
38
  import { cliDocs, cliDocsTool, cliDocsToolDefinition, cliTopics, getCliTopicNames, getCliTopicDescriptions, } from "./cli_docs.js";
41
39
  import { toMcpResponse } from "./types.js";
42
40
  // =============================================================================
@@ -51,18 +49,16 @@ xanoscriptDocs, getXanoscriptDocsPath, setXanoscriptDocsPath,
51
49
  mcpVersion, getServerVersion, setServerVersion,
52
50
  // Meta API Documentation
53
51
  metaApiDocs, metaApiTopics, getMetaApiTopicNames, getMetaApiTopicDescriptions,
54
- // Run API Documentation
55
- runApiDocs, runApiTopics, getRunApiTopicNames, getRunApiTopicDescriptions,
56
52
  // CLI Documentation
57
53
  cliDocs, cliTopics, getCliTopicNames, getCliTopicDescriptions, toMcpResponse, };
58
54
  // =============================================================================
59
55
  // Tool Result Functions (for internal MCP usage)
60
56
  // =============================================================================
61
- export { validateXanoscriptTool, xanoscriptDocsTool, mcpVersionTool, metaApiDocsTool, runApiDocsTool, cliDocsTool, };
57
+ export { validateXanoscriptTool, xanoscriptDocsTool, mcpVersionTool, metaApiDocsTool, cliDocsTool, };
62
58
  // =============================================================================
63
59
  // MCP Tool Definitions
64
60
  // =============================================================================
65
- export { validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, runApiDocsToolDefinition, cliDocsToolDefinition, };
61
+ export { validateXanoscriptToolDefinition, xanoscriptDocsToolDefinition, mcpVersionToolDefinition, metaApiDocsToolDefinition, cliDocsToolDefinition, };
66
62
  /**
67
63
  * All tool definitions for MCP server registration
68
64
  */
@@ -71,7 +67,6 @@ export const toolDefinitions = [
71
67
  xanoscriptDocsToolDefinition,
72
68
  mcpVersionToolDefinition,
73
69
  metaApiDocsToolDefinition,
74
- runApiDocsToolDefinition,
75
70
  cliDocsToolDefinition,
76
71
  ];
77
72
  // =============================================================================
@@ -91,8 +86,6 @@ export function handleTool(name, args) {
91
86
  return mcpVersionTool();
92
87
  case "meta_api_docs":
93
88
  return metaApiDocsTool(args);
94
- case "run_api_docs":
95
- return runApiDocsTool(args);
96
89
  case "cli_docs":
97
90
  return cliDocsTool(args);
98
91
  default:
@@ -399,24 +399,29 @@ export const validateXanoscriptToolDefinition = {
399
399
  properties: {
400
400
  code: {
401
401
  type: "string",
402
- description: "The XanoScript code to validate as a string. Use file_path instead if the code contains special characters that are hard to escape.",
402
+ description: "The XanoScript code to validate as a string. Use file_path instead if the code contains special characters that are hard to escape. " +
403
+ "Example: \"var $name:text = 'hello'\\nreturn $name\"",
403
404
  },
404
405
  file_path: {
405
406
  type: "string",
406
- description: "Path to a single XanoScript file to validate. Easier than passing code directly - avoids escaping issues.",
407
+ description: "Path to a single XanoScript file to validate. Easier than passing code directly - avoids escaping issues. " +
408
+ "Example: \"functions/utils/format.xs\"",
407
409
  },
408
410
  file_paths: {
409
411
  type: "array",
410
412
  items: { type: "string" },
411
- description: "Array of file paths for batch validation. Returns a summary with per-file results.",
413
+ description: "Array of file paths for batch validation. Returns a summary with per-file results. " +
414
+ "Example: [\"apis/users/get.xs\", \"apis/users/create.xs\", \"functions/utils/format.xs\"]",
412
415
  },
413
416
  directory: {
414
417
  type: "string",
415
- description: "Directory path to validate. Validates all .xs files recursively. Use with 'pattern' to filter.",
418
+ description: "Directory path to validate. Validates all .xs files recursively. Use with 'pattern' to filter specific subdirectories or files. " +
419
+ "Example: \"apis/users\"",
416
420
  },
417
421
  pattern: {
418
422
  type: "string",
419
- description: 'Glob pattern to filter files when using directory (default: "**/*.xs"). Example: "apis/**/*.xs"',
423
+ description: "Glob pattern to filter files when using 'directory' (default: \"**/*.xs\"). " +
424
+ "Examples: \"apis/**/*.xs\" to match only API files, \"**/create.xs\" to match all create files.",
420
425
  },
421
426
  },
422
427
  required: [],
@@ -110,18 +110,24 @@ export const xanoscriptDocsToolDefinition = {
110
110
  properties: {
111
111
  topic: {
112
112
  type: "string",
113
- description: "Documentation topic. Available: " + getTopicDescriptions(),
113
+ description: "Documentation topic to retrieve. Call without any parameters to get the README overview. " +
114
+ "Example: topic='syntax' for language syntax, topic='database' for database operations, topic='types' for type system.\n\n" +
115
+ "Available topics:\n" + getTopicDescriptions(),
114
116
  },
115
117
  file_path: {
116
118
  type: "string",
117
- description: "File path being edited (e.g., 'apis/users/create.xs', 'functions/utils/format.xs'). " +
118
- "Returns all relevant docs based on file type using applyTo pattern matching.",
119
+ description: "File path being edited. Returns all relevant docs automatically based on the file type and location. " +
120
+ "Uses applyTo pattern matching to select applicable topics. " +
121
+ "Example: 'apis/users/create.xs' returns API, database, and syntax docs. " +
122
+ "'functions/utils/format.xs' returns function and syntax docs.",
119
123
  },
120
124
  mode: {
121
125
  type: "string",
122
126
  enum: ["full", "quick_reference"],
123
- description: "full = complete documentation, quick_reference = compact Quick Reference sections only. " +
124
- "Use quick_reference for smaller context window usage.",
127
+ description: "'full' = complete documentation with explanations and examples. " +
128
+ "'quick_reference' = compact cheatsheet with just syntax patterns and signatures. " +
129
+ "Use 'quick_reference' to save context window space when you just need a reminder. " +
130
+ "Default: 'full'.",
125
131
  },
126
132
  },
127
133
  required: [],
@@ -140,7 +140,7 @@ var $total {
140
140
  ### Filters (Pipe Syntax)
141
141
 
142
142
  ```xs
143
- $value|trim|lower // Chain filters
143
+ $value|trim|to_lower // Chain filters
144
144
  $input.name|strlen // Get length
145
145
  $array|first // First element
146
146
  ($a + $b)|round:2 // Math with precision
@@ -221,7 +221,7 @@ The most common filters at a glance:
221
221
  | Filter | Example | Result |
222
222
  |--------|---------|--------|
223
223
  | `trim` | `" hello "|trim` | `"hello"` |
224
- | `lower` | `"HELLO"|lower` | `"hello"` |
224
+ | `to_lower` | `"HELLO"|to_lower` | `"hello"` |
225
225
  | `first` | `[1,2,3]|first` | `1` |
226
226
  | `count` | `[1,2,3]|count` | `3` |
227
227
  | `to_int` | `"42"|to_int` | `42` |
@@ -257,7 +257,7 @@ function "import_large_csv" {
257
257
  db.add "record" {
258
258
  data = {
259
259
  name: $row.name|trim,
260
- email: $row.email|trim|lower,
260
+ email: $row.email|trim|to_lower,
261
261
  created_at: now
262
262
  }
263
263
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xano/developer-mcp",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
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",