xano_xanoscript_docs
Retrieve XanoScript documentation by topic or file path to generate accurate AI code. Use quick reference or tiered summaries to fit context limits.
Instructions
Get XanoScript programming language documentation for AI code generation. Call without parameters for a compact index of all topics (~4KB, ~1K tokens); then drill in with topic= or file_path=. Use topic='readme' for the full prose overview (previously the no-arg default). For context-limited models: use tier='survival' (~1.2K tokens) or tier='working' (~4.5K tokens). Use 'topic' for specific documentation, or 'file_path' for context-aware docs based on the file you're editing. Use mode='quick_reference' for compact syntax reference (recommended for context efficiency). Use max_tokens to limit documentation size to fit your context budget. file_path mode defaults to 'quick_reference' to reduce context size; use mode='full' to get complete docs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'full' = complete documentation with explanations and examples. 'quick_reference' = compact reference with just syntax patterns and signatures. 'index' = compact topic listing with descriptions and byte sizes (~4KB, ~1K tokens). When set, 'index' takes precedence over topic and file_path. Use 'index' to discover available topics before loading them. Use 'quick_reference' to save context window space when you just need a reminder. Default: 'full' for topic mode, 'quick_reference' for file_path mode. | |
| tier | No | Pre-packaged documentation tier for context-limited models. 'survival' (~5KB, ~1.2K tokens): minimum syntax to write valid XanoScript. 'working' (~18KB, ~4.5K tokens): complete reference for common tasks. Overrides topic/file_path/mode when set. Use 'survival' for models with <16K context, 'working' for 16-64K context. | |
| topic | No | Documentation topic to retrieve. Call without any parameters to get the compact topic index; use topic='readme' for the full prose overview. Example: topic='syntax' for language syntax, topic='database' for database operations, topic='types' for type system. Common synonyms are accepted and resolved automatically (e.g. 'upload'/'storage' -> 'file-uploads'); an unrecognized topic returns the list of valid topics. Available topics: survival (Minimal syntax survival kit for writing valid XanoScript), working (Complete working reference for common XanoScript tasks), readme (XanoScript overview, workspace structure, and quick reference), essentials (Common patterns, quick reference, and common mistakes to avoid), syntax (Expressions, operators, and filters for all XanoScript code), syntax/string-filters (String filters, regex, encoding, security filters, text functions), syntax/array-filters (Array filters, expression-based higher-order filters (map/filter/reduce), JS lambda filters (lambda_map/lambda_reduce), and array functions), syntax/functions (Math filters/functions, object functions, bitwise operations), types (Data types, input blocks, and validation), tables (Database schema definitions with indexes and relationships), functions (Reusable function stacks with inputs and responses), apis (HTTP endpoint definitions with authentication and CRUD patterns), tasks (Scheduled and cron jobs), triggers (Event-driven handlers (table, realtime, workspace, agent, MCP)), database (All db), agents (AI agent configuration with LLM providers and tools), tools (AI tools for agents and MCP servers), mcp-servers (MCP server definitions exposing tools), unit-testing (Unit tests, mocks, and assertions within functions, APIs, and middleware), workflow-tests (End-to-end workflow tests with data source selection and tags), integrations (External service integrations index - see sub-topics for details), integrations/cloud-storage (AWS S3, Azure Blob, and GCP Storage operations (external buckets, not native Xano storage)), integrations/search (Elasticsearch, OpenSearch, and Algolia search operations), integrations/redis (Redis caching, rate limiting, and queue operations), integrations/external-apis (HTTP requests with api), integrations/utilities (Local storage, email, zip, and Lambda utilities), file-uploads (Uploading files to native Xano storage: file? input, create_attachment, sign_private_url), frontend (Static frontend development and deployment (static hosting)), addons (Reusable subqueries for fetching related data), debugging (Logging, inspecting, and debugging XanoScript execution), performance (Performance optimization best practices), realtime (Real-time channels and events for push updates), security (Security best practices for authentication and authorization), streaming (Streaming data from files, requests, and responses), middleware (Request/response interceptors for functions, queries, tasks, and tools), branch (Branch-level settings: middleware, history retention, visual styling), workspace (Workspace-level settings: environment variables, preferences, realtime) | |
| file_path | No | File path being edited. Returns all relevant docs automatically based on the file type and location. Uses applyTo pattern matching to select applicable topics. Example: 'api/users/create.xs' returns API, database, and syntax docs. 'function/format.xs' returns function and syntax docs. | |
| max_tokens | No | Maximum estimated token budget for documentation. When used with file_path, loads topics in priority order until budget is reached. Helps prevent context overflow for small-window models. Estimate: 1KB of docs ≈ 250 tokens. | |
| exclude_topics | No | List of topic names to exclude from file_path results. Use this to skip topics you've already loaded (e.g., exclude_topics: ['syntax', 'essentials']). Only applies when using file_path parameter. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | The documentation mode used. | |
| tier | No | The pre-packaged tier used, if any. | |
| topics | No | List of matched topic names (file_path mode only). | |
| version | No | The XanoScript documentation version. | |
| file_path | No | The file path that was matched (file_path mode only). | |
| documentation | No | The documentation content (index, topic, tier, or file_path mode). |