Loading...
Loading...
Expert skill for understanding, using, and modifying the xanoscript_docs documentation system in the xano-developer-mcp project. Use this skill whenever working with XanoScript documentation files (.md files in src/xanoscript_docs/), modifying the xanoscript_docs MCP tool, adding new documentation topics, editing existing docs, updating the topic registry in xanoscript.ts, or changing how documentation is served. Also use when someone asks about the xano-developer-mcp project architecture, the MCP server setup, or how the documentation delivery system works. Trigger on any mention of xanoscript_docs, XanoScript documentation, Xano MCP tools, or documentation authoring for this project.
npx skill4agent add xano-inc/xano-developer-mcp xanoscript-docs-expertxanoscript_docs@xano/developer-mcpsrc/xanoscript_docs/xanoscript_docssrc/
├── index.ts # MCP server entry (stdio transport)
├── lib.ts # Library entry (standalone usage)
├── xanoscript.ts # Core doc logic: topic registry, file matching, content extraction
├── tools/
│ ├── index.ts # Tool registry + dispatch (6 tools total)
│ ├── xanoscript_docs.ts # xanoscript_docs tool: path resolution, MCP definition
│ ├── validate_xanoscript.ts # Code validation via language server parser
│ ├── meta_api_docs.ts # Meta API docs tool
│ ├── run_api_docs.ts # Run API docs tool
│ ├── cli_docs.ts # CLI docs tool
│ ├── mcp_version.ts # Version tool
│ └── types.ts # Shared ToolResult type
├── xanoscript_docs/ # 34 documentation topics (THE CONTENT)
│ ├── README.md # Overview (returned when no args)
│ ├── version.json # { "version": "2.0.0", "updated": "2025-02-06" }
│ ├── docs_index.json # Machine-readable index with aliases, filters, constructs
│ ├── cheatsheet.md, syntax.md, quickstart.md, types.md # Core language docs
│ ├── functions.md, database.md, tables.md, apis.md # Construct-specific docs
│ ├── agents.md, tools.md, mcp-servers.md, triggers.md # AI & event docs
│ ├── [16 more topic files...]
│ └── integrations/ # Sub-topic directory
│ ├── cloud-storage.md, search.md, redis.md
│ ├── external-apis.md, utilities.md
│ ...
├── meta_api_docs/ # Separate doc module for Meta API
├── run_api_docs/ # Separate doc module for Run API
└── cli_docs/ # Separate doc module for CLICaller provides { topic?, file_path?, mode? }
│
├── No args → Return README.md
├── topic="syntax" → Return syntax.md content
├── file_path="api/users/create.xs" → minimatch applyTo patterns → return all matching docs
└── mode="quick_reference" → Extract only "## Quick Reference" sections
│
└── All responses append: "---\nDocumentation version: X.X.X"src/xanoscript.tsXANOSCRIPT_DOCS_V2{ file, applyTo, description }getDocsForFilePath(filePath)minimatchapplyToextractQuickReference(content, topic)## readXanoscriptDocsV2(docsPath, args)src/tools/xanoscript_docs.tsgetXanoscriptDocsPath()dist/xanoscript_docs/src/xanoscript_docs/xanoscriptDocs(args){ documentation: string }xanoscriptDocsTool(args)ToolResult{ success, data?, error? }xanoscriptDocsToolDefinitionsrc/tools/index.tstoolDefinitionshandleTool(name, args)toMcpResponse(){ content: [{ type: "text", text }], isError? }tsc && cp -r src/xanoscript_docs dist/dist/.mdsrc/xanoscript_docs/integrations/---
applyTo: "function/*.xs, api/**/*.xs"
---applyTotopicsrc/xanoscript.tsXANOSCRIPT_DOCS_V2"my-new-topic": {
file: "my-new-topic.md", // Path relative to xanoscript_docs/
applyTo: ["function/**/*.xs"], // Glob patterns for context-aware matching
description: "One-line description of what this doc covers",
},"integrations/my-service": {
file: "integrations/my-service.md",
applyTo: [], // Sub-topics typically have empty applyTo
description: "Description here",
},docs_index.jsonsrc/xanoscript_docs/docs_index.json"my-new-topic": {
"file": "my-new-topic.md",
"purpose": "Brief purpose description",
"aliases": ["alias1", "alias2"]
}constructsoperationstaskssrc/xanoscript_docs/version.json{
"version": "2.1.0",
"updated": "2025-03-15"
}npm run build # tsc && cp -r src/xanoscript_docs dist/
npm test # vitest runreferences/doc-conventions.md---
applyTo: "pattern/**/*.xs"
---
# Topic Title
> **TL;DR:** One or two sentences summarizing the key concepts.
## Quick Reference
| Feature | Example | Notes |
|---------|---------|-------|
| ... | ... | ... |
## [Detailed Sections]
### Basic Structure
[Minimal working example]
### Common Patterns
[Real-world usage examples]
### Common Mistakes
❌ **Wrong:**
```xs
// incorrect code// correct code| Topic | Use For |
|---|---|
| [syntax](xanoscript_docs({ topic: "syntax" })) | Filters and operators |
### Code Examples
- Use `xs` language identifier for XanoScript code blocks
- Use `javascript` for frontend code, `json` for data
- Comments use `//` only (no `#` or `/* */` in XanoScript)
- Show both wrong and correct patterns with ❌/✅ markers
- Progress from simple to complex examples
### Cross-Referencing
Reference other topics using this pattern:
### File Naming
- Lowercase with hyphens: `unit-testing.md`, `cloud-storage.md`
- Integration sub-topics go in `integrations/` subdirectory
## XanoScript Language Reference
For quick reference when writing docs, see `references/xanoscript-language.md`. Key things to remember:
### Type Names (Common Mistake Area)
| Correct | WRONG |
|---------|-------|
| `text` | `string` |
| `int` | `integer` |
| `decimal` | `float`, `number` |
| `bool` | `boolean` |
### Filter Type Safety (Most Common Doc Error)
String filters and array filters are NOT interchangeable. This is the #1 source of mistakes in the docs:
| Task | String Filter | Array Filter |
|------|--------------|--------------|
| Get length | `strlen` | `count` |
| Get part | `substr` | `slice` |
| Reverse | `split:""\|reverse\|join:""` | `reverse` |
### Control Flow Keyword
Always `elseif` (one word), never `else if`.
### String Concatenation
Use `~` (tilde), not `+`. Parentheses required around filtered values in concatenation:
```xs
($count|to_text) ~ " items"xanoscriptDocsToolDefinitionsrc/tools/xanoscript_docs.tsinputSchemasrc/xanoscript.tsgetDocsForFilePath()extractQuickReference()readXanoscriptDocsV2()getXanoscriptDocsPath()src/tools/xanoscript_docs.tsdist/xanoscript_docs/src/xanoscript_docs/src/tools/my_tool.tssrc/tools/index.tstoolDefinitionshandleToolsrc/lib.tsnpm test # Run all tests
npm run test:watch # Watch mode
npm run test:coverage # With V8 coveragesrc/xanoscript.test.tsdescribeitexpectreadXanoscriptDocsV2({ topic: "new-topic" })applyTogetDocsForFilePath()## Quick Reference| Task | Files to Modify |
|---|---|
| Add new doc topic | New |
| Edit existing doc content | Just the |
| Change which files a doc applies to | |
| Add integration sub-topic | New file in |
| Change tool description/schema | |
| Change doc resolution logic | |
| Update version | |
| Add new MCP tool (non-docs) | New file in |