@xano/developer-mcp 1.0.19 โ†’ 1.0.21

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.
package/README.md CHANGED
@@ -1,6 +1,28 @@
1
- # Xano Developer MCP
1
+ <div align="center">
2
2
 
3
- A Model Context Protocol (MCP) server that provides AI assistants with comprehensive documentation and tools for developing applications on the Xano Headless API platform.
3
+ # ๐Ÿš€ Xano Developer MCP
4
+
5
+ **Supercharge your AI with the power of Xano**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/@xano/developer-mcp.svg)](https://www.npmjs.com/package/@xano/developer-mcp)
8
+ [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
9
+
10
+ ---
11
+
12
+ ๐Ÿค– **AI-Powered** ยท ๐Ÿ“š **Comprehensive Docs** ยท โšก **Instant Setup** ยท ๐Ÿ”ง **Built-in Tools**
13
+
14
+ ---
15
+
16
+ </div>
17
+
18
+ An MCP server that gives AI assistants superpowers for developing on [Xano](https://xano.com) โ€” complete with documentation, code validation, and workflow guides.
19
+
20
+ > ๐Ÿ’ก **What's Xano?** The fastest way to build a scalable backend for your app โ€” no code required. Build APIs, manage databases, and deploy instantly.
21
+
22
+ ### ๐Ÿ”— Quick Links
23
+
24
+ | ๐ŸŒ [Website](https://xano.com) | ๐Ÿ“– [Docs](https://docs.xano.com/) | ๐Ÿ“ [Blog](https://www.xano.com/blog/) | ๐Ÿ’ฌ [Community](https://community.xano.com/) | ๐Ÿ“ฆ [npm](https://www.npmjs.com/package/@xano/developer-mcp) |
25
+ |:---:|:---:|:---:|:---:|:---:|
4
26
 
5
27
  ## Overview
6
28
 
@@ -22,6 +44,20 @@ claude mcp add xano-developer -- npx -y @xano/developer-mcp
22
44
 
23
45
  That's it! The MCP server will be automatically installed and configured.
24
46
 
47
+ ### Install via npm
48
+
49
+ You can also install the package globally from npm:
50
+
51
+ ```bash
52
+ npm install -g @xano/developer-mcp
53
+ ```
54
+
55
+ Then add to Claude Code:
56
+
57
+ ```bash
58
+ claude mcp add xano-developer -- xano-developer-mcp
59
+ ```
60
+
25
61
  ### Claude Desktop
26
62
 
27
63
  Add to your Claude Desktop configuration file:
package/dist/index.js CHANGED
@@ -134,6 +134,21 @@ const XANOSCRIPT_DOCS_V2 = {
134
134
  applyTo: ["functions/**/*.xs", "apis/**/*.xs"],
135
135
  description: "Streaming data from files, requests, and responses",
136
136
  },
137
+ middleware: {
138
+ file: "middleware.md",
139
+ applyTo: ["middleware/**/*.xs"],
140
+ description: "Request/response interceptors for functions, queries, tasks, and tools",
141
+ },
142
+ branch: {
143
+ file: "branch.md",
144
+ applyTo: ["branch.xs"],
145
+ description: "Branch-level settings: middleware, history retention, visual styling",
146
+ },
147
+ workspace: {
148
+ file: "workspace.md",
149
+ applyTo: ["workspace.xs"],
150
+ description: "Workspace-level settings: environment variables, preferences, realtime",
151
+ },
137
152
  };
138
153
  // =============================================================================
139
154
  // Path Resolution
@@ -260,10 +260,10 @@ const response = await fetch(
260
260
  For writing XanoScript code, use:
261
261
 
262
262
  - \`xanoscript_docs()\` - Full documentation index
263
- - \`xanoscript_docs({ keyword: "function" })\` - Function syntax
264
- - \`xanoscript_docs({ keyword: "table" })\` - Table schema syntax
265
- - \`xanoscript_docs({ keyword: "api_query" })\` - API endpoint syntax
266
- - \`xanoscript_docs({ keyword: "syntax" })\` - Language reference
263
+ - \`xanoscript_docs({ topic: "functions" })\` - Function syntax
264
+ - \`xanoscript_docs({ topic: "tables" })\` - Table schema syntax
265
+ - \`xanoscript_docs({ topic: "apis" })\` - API endpoint syntax
266
+ - \`xanoscript_docs({ topic: "syntax" })\` - Language reference
267
267
 
268
268
  ## Validating XanoScript
269
269
 
@@ -1,9 +1,11 @@
1
1
  /**
2
2
  * Template for xanoscript_docs index documentation
3
3
  * Edit this file to update the XanoScript documentation index
4
+ *
5
+ * NOTE: This template is currently unused. The actual documentation is served
6
+ * directly from the XANOSCRIPT_DOCS_V2 config in index.ts.
4
7
  */
5
8
  export interface XanoscriptIndexParams {
6
9
  version: string;
7
- aliasLookup: Record<string, string[]>;
8
10
  }
9
11
  export declare function generateXanoscriptIndexTemplate(params: XanoscriptIndexParams): string;
@@ -1,69 +1,72 @@
1
1
  /**
2
2
  * Template for xanoscript_docs index documentation
3
3
  * Edit this file to update the XanoScript documentation index
4
+ *
5
+ * NOTE: This template is currently unused. The actual documentation is served
6
+ * directly from the XANOSCRIPT_DOCS_V2 config in index.ts.
4
7
  */
5
8
  export function generateXanoscriptIndexTemplate(params) {
6
- const { version, aliasLookup } = params;
7
- const formatRow = (keyword, description) => {
8
- const aliases = aliasLookup[keyword]?.slice(0, 3).join(", ") || "";
9
- return `| \`${keyword}\` | ${aliases ? aliases : "-"} | ${description} |`;
10
- };
9
+ const { version } = params;
11
10
  return `# XanoScript Documentation Index
12
11
  Version: ${version}
13
12
 
14
- Use \`xanoscript_docs\` with a keyword to retrieve documentation.
13
+ Use \`xanoscript_docs({ topic: "<topic>" })\` to retrieve documentation.
15
14
 
16
- ## Core Concepts
17
- These return guidelines + examples for writing XanoScript code.
15
+ ## Core Language
16
+ | Topic | Description |
17
+ |-------|-------------|
18
+ | \`syntax\` | Expressions, operators, filters, system variables |
19
+ | \`types\` | Data types, validation, input blocks |
20
+ | \`functions\` | Reusable function stacks, async, loops |
21
+ | \`schema\` | Runtime schema parsing and validation |
18
22
 
19
- | Keyword | Aliases | Description |
20
- |---------|---------|-------------|
21
- ${formatRow("function", "Custom reusable functions in `functions/`")}
22
- ${formatRow("api_query", "HTTP API endpoints in `apis/`")}
23
- ${formatRow("table", "Database table schemas in `tables/`")}
24
- ${formatRow("task", "Scheduled background tasks in `tasks/`")}
25
- ${formatRow("triggers", "Event-driven handlers in `triggers/`")}
26
- ${formatRow("tool", "AI-callable tools in `tools/`")}
27
- ${formatRow("agent", "AI agents in `agents/`")}
28
- ${formatRow("mcp_server", "MCP servers in `mcp_servers/`")}
23
+ ## Data
24
+ | Topic | Description |
25
+ |-------|-------------|
26
+ | \`tables\` | Database schema definitions with indexes and relationships |
27
+ | \`database\` | All db.* operations: query, get, add, edit, patch, delete |
28
+ | \`addons\` | Reusable subqueries for fetching related data |
29
+ | \`streaming\` | Streaming data from files, requests, and responses |
29
30
 
30
- ## Language Reference
31
- Core syntax and operators.
31
+ ## APIs & Endpoints
32
+ | Topic | Description |
33
+ |-------|-------------|
34
+ | \`apis\` | HTTP endpoint definitions with authentication and CRUD patterns |
35
+ | \`tasks\` | Scheduled and cron jobs |
36
+ | \`triggers\` | Event-driven handlers (table, realtime, workspace, agent, MCP) |
37
+ | \`realtime\` | Real-time channels and events for push updates |
32
38
 
33
- | Keyword | Aliases | Description |
34
- |---------|---------|-------------|
35
- ${formatRow("syntax", "Complete XanoScript syntax (stack, var, conditional, foreach, etc.)")}
36
- ${formatRow("expressions", "Pipe operators and filters (string, math, array, date)")}
37
- ${formatRow("input", "Input definition syntax (types, filters, validation)")}
38
- ${formatRow("db_query", "Database query patterns (query, add, edit, delete)")}
39
- ${formatRow("query_filter", "WHERE clause and filter syntax")}
39
+ ## AI & Agents
40
+ | Topic | Description |
41
+ |-------|-------------|
42
+ | \`agents\` | AI agent configuration with LLM providers and tools |
43
+ | \`tools\` | AI tools for agents and MCP servers |
44
+ | \`mcp-servers\` | MCP server definitions exposing tools |
40
45
 
41
- ## Development Workflows
42
- AI agent development strategies and phases.
46
+ ## Integrations
47
+ | Topic | Description |
48
+ |-------|-------------|
49
+ | \`integrations\` | Cloud storage, Redis, security, and external APIs |
43
50
 
44
- | Keyword | Aliases | Description |
45
- |---------|---------|-------------|
46
- ${formatRow("workflow", "Overall XanoScript development workflow")}
47
- ${formatRow("function_workflow", "AI workflow for creating functions")}
48
- ${formatRow("api_workflow", "AI workflow for creating API endpoints")}
49
- ${formatRow("table_workflow", "AI workflow for creating tables")}
50
- ${formatRow("task_workflow", "AI workflow for creating tasks")}
51
+ ## Configuration
52
+ | Topic | Description |
53
+ |-------|-------------|
54
+ | \`workspace\` | Workspace-level settings: environment variables, preferences, realtime |
55
+ | \`branch\` | Branch-level settings: middleware, history retention, visual styling |
56
+ | \`middleware\` | Request/response interceptors for functions, queries, tasks, and tools |
51
57
 
52
- ## Specialized Topics
58
+ ## Development
59
+ | Topic | Description |
60
+ |-------|-------------|
61
+ | \`testing\` | Unit tests, mocks, and assertions |
62
+ | \`debugging\` | Logging, inspecting, and debugging XanoScript execution |
63
+ | \`frontend\` | Static frontend development and deployment |
64
+ | \`run\` | Run job and service configurations for the Xano Job Runner |
53
65
 
54
- | Keyword | Aliases | Description |
55
- |---------|---------|-------------|
56
- ${formatRow("addons", "Reusable subqueries for related data")}
57
- ${formatRow("debugging", "Logging and debugging tools")}
58
- ${formatRow("frontend", "Frontend development with Xano")}
59
- ${formatRow("lovable", "Building from Lovable-generated websites")}
60
- ${formatRow("performance", "Performance optimization best practices")}
61
- ${formatRow("realtime", "Real-time channels and events")}
62
- ${formatRow("schema", "Runtime schema parsing and validation")}
63
- ${formatRow("security", "Security best practices")}
64
- ${formatRow("streaming", "Streaming data from files and responses")}
65
- ${formatRow("testing", "Unit testing XanoScript code")}
66
- ${formatRow("tips", "Tips and tricks")}
67
- ${formatRow("run", "Run job and service configurations")}
66
+ ## Best Practices
67
+ | Topic | Description |
68
+ |-------|-------------|
69
+ | \`performance\` | Performance optimization best practices |
70
+ | \`security\` | Security best practices for authentication and authorization |
68
71
  `;
69
72
  }
@@ -15,6 +15,10 @@ XanoScript is the declarative scripting language for [Xano](https://xano.com), a
15
15
  | `tool` | `tools/**/*.xs` | Tools for AI agents |
16
16
  | `mcp_server` | `mcp_servers/**/*.xs` | MCP server definitions |
17
17
  | `addon` | `addons/*.xs` | Subqueries for related data |
18
+ | `middleware` | `middleware/**/*.xs` | Request/response interceptors |
19
+ | `branch` | `branch.xs` | Branch-level configuration |
20
+ | `workspace` | `workspace.xs` | Workspace-level configuration |
21
+ | `realtime_channel` | Configuration | Realtime channel settings |
18
22
 
19
23
  **Important:** Each `.xs` file must contain exactly one definition. You cannot define multiple tables, functions, queries, or other constructs in a single file.
20
24
 
@@ -22,6 +26,8 @@ XanoScript is the declarative scripting language for [Xano](https://xano.com), a
22
26
 
23
27
  ```
24
28
  project/
29
+ โ”œโ”€โ”€ workspace.xs // Workspace configuration (env vars, preferences)
30
+ โ”œโ”€โ”€ branch.xs // Branch configuration (middleware, history)
25
31
  โ”œโ”€โ”€ tables/ // Database table schemas
26
32
  โ”œโ”€โ”€ functions/ // Reusable functions (supports subfolders)
27
33
  โ”œโ”€โ”€ apis/
@@ -31,6 +37,7 @@ project/
31
37
  โ”œโ”€โ”€ agents/ // AI agents
32
38
  โ”œโ”€โ”€ tools/ // AI tools
33
39
  โ”œโ”€โ”€ mcp_servers/ // MCP server definitions
40
+ โ”œโ”€โ”€ middleware/ // Request/response interceptors
34
41
  โ”œโ”€โ”€ addons/ // Query addons
35
42
  โ”œโ”€โ”€ static/ // Frontend files (HTML, CSS, JS)
36
43
  โ””โ”€โ”€ run/ // Job and service configurations
@@ -103,54 +110,61 @@ This helps AI tools apply the correct documentation based on the file being edit
103
110
 
104
111
  ## Documentation Index
105
112
 
106
- Use `xanoscript_docs({ keyword: "<keyword>" })` to retrieve documentation.
113
+ Use `xanoscript_docs({ topic: "<topic>" })` to retrieve documentation.
107
114
 
108
115
  ### Core Language
109
- | Topic | Keyword | Description |
110
- |-------|---------|-------------|
111
- | Syntax Reference | `syntax` | Expressions, operators, filters, system variables |
112
- | Types & Inputs | `input` | Data types, validation, input blocks |
113
- | Functions | `function` | Reusable function stacks, async, loops |
114
- | Schema | `schema` | Runtime schema parsing and validation |
116
+ | Topic | Description |
117
+ |-------|-------------|
118
+ | `syntax` | Expressions, operators, filters, system variables |
119
+ | `types` | Data types, validation, input blocks |
120
+ | `functions` | Reusable function stacks, async, loops |
121
+ | `schema` | Runtime schema parsing and validation |
115
122
 
116
123
  ### Data
117
- | Topic | Keyword | Description |
118
- |-------|---------|-------------|
119
- | Tables | `table` | Database schema definitions |
120
- | Database Operations | `db_query` | Query, add, edit, delete, bulk operations |
121
- | Addons | `addon` | Reusable subqueries for related data |
122
- | Streaming | `streaming` | Stream processing for large files |
124
+ | Topic | Description |
125
+ |-------|-------------|
126
+ | `tables` | Database schema definitions with indexes and relationships |
127
+ | `database` | All db.* operations: query, get, add, edit, patch, delete |
128
+ | `addons` | Reusable subqueries for fetching related data |
129
+ | `streaming` | Streaming data from files, requests, and responses |
123
130
 
124
131
  ### APIs & Endpoints
125
- | Topic | Keyword | Description |
126
- |-------|---------|-------------|
127
- | APIs | `api_query` | HTTP endpoint definitions |
128
- | Tasks | `task` | Scheduled jobs |
129
- | Triggers | `trigger` | Event-driven handlers |
130
- | Realtime | `realtime` | Push events and channels |
132
+ | Topic | Description |
133
+ |-------|-------------|
134
+ | `apis` | HTTP endpoint definitions with authentication and CRUD patterns |
135
+ | `tasks` | Scheduled and cron jobs |
136
+ | `triggers` | Event-driven handlers (table, realtime, workspace, agent, MCP) |
137
+ | `realtime` | Real-time channels and events for push updates |
131
138
 
132
139
  ### AI & Agents
133
- | Topic | Keyword | Description |
134
- |-------|---------|-------------|
135
- | Agents | `agent` | AI agent configuration |
136
- | Tools | `tool` | AI tools for agents |
137
- | MCP Servers | `mcp_server` | Model Context Protocol servers |
140
+ | Topic | Description |
141
+ |-------|-------------|
142
+ | `agents` | AI agent configuration with LLM providers and tools |
143
+ | `tools` | AI tools for agents and MCP servers |
144
+ | `mcp-servers` | MCP server definitions exposing tools |
138
145
 
139
146
  ### Integrations
140
- | Topic | Keyword | Description |
141
- |-------|---------|-------------|
142
- | Integrations | `integrations` | Cloud storage, search, Redis, zip, Lambda |
147
+ | Topic | Description |
148
+ |-------|-------------|
149
+ | `integrations` | Cloud storage, Redis, security, and external APIs |
150
+
151
+ ### Configuration
152
+ | Topic | Description |
153
+ |-------|-------------|
154
+ | `workspace` | Workspace-level settings: environment variables, preferences, realtime |
155
+ | `branch` | Branch-level settings: middleware, history retention, visual styling |
156
+ | `middleware` | Request/response interceptors for functions, queries, tasks, and tools |
143
157
 
144
158
  ### Development
145
- | Topic | Keyword | Description |
146
- |-------|---------|-------------|
147
- | Testing | `testing` | Unit tests and mocking |
148
- | Debugging | `debugging` | Logging and inspection tools |
149
- | Frontend | `frontend` | Static frontend development |
150
- | Run | `run` | Job and service configurations |
159
+ | Topic | Description |
160
+ |-------|-------------|
161
+ | `testing` | Unit tests, mocks, and assertions |
162
+ | `debugging` | Logging, inspecting, and debugging XanoScript execution |
163
+ | `frontend` | Static frontend development and deployment |
164
+ | `run` | Run job and service configurations for the Xano Job Runner |
151
165
 
152
166
  ### Best Practices
153
- | Topic | Keyword | Description |
154
- |-------|---------|-------------|
155
- | Performance | `performance` | Query optimization, caching, parallelism |
156
- | Security | `security` | Authentication, authorization, encryption |
167
+ | Topic | Description |
168
+ |-------|-------------|
169
+ | `performance` | Performance optimization best practices |
170
+ | `security` | Security best practices for authentication and authorization |
@@ -86,7 +86,7 @@ query "products" verb=GET {
86
86
 
87
87
  ## Input Block
88
88
 
89
- For complete type and filter reference, use `xanoscript_docs({ keyword: "input" })`.
89
+ For complete type and filter reference, use `xanoscript_docs({ topic: "types" })`.
90
90
 
91
91
  ### Empty Input Blocks
92
92
 
@@ -345,11 +345,14 @@ stack {
345
345
 
346
346
  ## Error Handling
347
347
 
348
- For complete error handling reference, use `xanoscript_docs({ keyword: "syntax" })`.
348
+ For complete error handling reference, use `xanoscript_docs({ topic: "syntax" })`.
349
349
 
350
350
  | Type | HTTP Status |
351
351
  |------|-------------|
352
- | `inputerror` | 400 | `accessdenied` | 403 | `notfound` | 404 | `standard` | 500 |
352
+ | `inputerror` | 400 |
353
+ | `accessdenied` | 403 |
354
+ | `notfound` | 404 |
355
+ | `standard` | 500 |
353
356
 
354
357
  ---
355
358
 
@@ -0,0 +1,239 @@
1
+ ---
2
+ applyTo: "branch.xs"
3
+ ---
4
+
5
+ # Branch Configuration
6
+
7
+ Configure branch-level settings including middleware, history retention, and visual styling.
8
+
9
+ ## Quick Reference
10
+
11
+ ```xs
12
+ branch "<name>" {
13
+ color = "#hex"
14
+ description = "Branch description"
15
+ middleware = { ... }
16
+ history = { ... }
17
+ }
18
+ ```
19
+
20
+ ### Attributes
21
+ | Attribute | Type | Required | Description |
22
+ |-----------|------|----------|-------------|
23
+ | `color` | text | Yes | Hex color code for branch identification |
24
+ | `description` | text | No | Human-readable branch description |
25
+ | `middleware` | object | No | Pre/post middleware configuration |
26
+ | `history` | object | No | Request history retention settings |
27
+
28
+ ---
29
+
30
+ ## Basic Structure
31
+
32
+ ```xs
33
+ branch "production" {
34
+ color = "#22c55e"
35
+ description = "Production environment"
36
+ }
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Middleware Configuration
42
+
43
+ Configure middleware to run before (pre) and after (post) different construct types.
44
+
45
+ ### Syntax
46
+
47
+ ```xs
48
+ branch "production" {
49
+ color = "#22c55e"
50
+
51
+ middleware = {
52
+ function: {
53
+ pre: ["auth_check", "rate_limit"],
54
+ post: ["audit_log"]
55
+ },
56
+ query: {
57
+ pre: ["auth_check", "rate_limit"],
58
+ post: ["audit_log", "cache_response"]
59
+ },
60
+ task: {
61
+ pre: ["task_lock"],
62
+ post: ["task_cleanup"]
63
+ },
64
+ tool: {
65
+ pre: ["tool_auth"],
66
+ post: ["tool_log"]
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### Middleware Targets
73
+
74
+ | Target | Description |
75
+ |--------|-------------|
76
+ | `function` | Applies to all function calls |
77
+ | `query` | Applies to all API endpoints |
78
+ | `task` | Applies to scheduled tasks |
79
+ | `tool` | Applies to AI agent tools |
80
+
81
+ ### Pre vs Post Middleware
82
+
83
+ | Type | Execution | Use Cases |
84
+ |------|-----------|-----------|
85
+ | `pre` | Before main logic | Authentication, rate limiting, validation |
86
+ | `post` | After main logic | Logging, caching, response transformation |
87
+
88
+ ---
89
+
90
+ ## History Configuration
91
+
92
+ Control how many historical executions are retained for debugging and auditing.
93
+
94
+ ### Syntax
95
+
96
+ ```xs
97
+ branch "production" {
98
+ color = "#22c55e"
99
+
100
+ history = {
101
+ function: 100,
102
+ query: 1000,
103
+ task: 100,
104
+ tool: 100,
105
+ trigger: 100,
106
+ middleware: 10
107
+ }
108
+ }
109
+ ```
110
+
111
+ ### History Values
112
+
113
+ | Value | Description |
114
+ |-------|-------------|
115
+ | `false` | Disable history (no retention) |
116
+ | `10` | Keep last 10 executions |
117
+ | `100` | Keep last 100 executions |
118
+ | `1000` | Keep last 1000 executions |
119
+ | `10000` | Keep last 10000 executions |
120
+ | `"all"` | Keep all executions (use with caution) |
121
+
122
+ ### History Targets
123
+
124
+ | Target | Description |
125
+ |--------|-------------|
126
+ | `function` | Function execution history |
127
+ | `query` | API endpoint request history |
128
+ | `task` | Scheduled task execution history |
129
+ | `tool` | AI tool invocation history |
130
+ | `trigger` | Trigger execution history |
131
+ | `middleware` | Middleware execution history |
132
+
133
+ ---
134
+
135
+ ## Common Patterns
136
+
137
+ ### Development Branch
138
+
139
+ ```xs
140
+ branch "development" {
141
+ color = "#3b82f6"
142
+ description = "Development environment with full debugging"
143
+
144
+ history = {
145
+ function: "all",
146
+ query: "all",
147
+ task: "all",
148
+ tool: "all",
149
+ trigger: "all",
150
+ middleware: "all"
151
+ }
152
+ }
153
+ ```
154
+
155
+ ### Staging Branch
156
+
157
+ ```xs
158
+ branch "staging" {
159
+ color = "#f59e0b"
160
+ description = "Staging environment for testing"
161
+
162
+ middleware = {
163
+ query: {
164
+ pre: ["auth_check"],
165
+ post: ["audit_log"]
166
+ }
167
+ }
168
+
169
+ history = {
170
+ function: 1000,
171
+ query: 1000,
172
+ task: 100,
173
+ tool: 100,
174
+ trigger: 100,
175
+ middleware: 100
176
+ }
177
+ }
178
+ ```
179
+
180
+ ### Production Branch
181
+
182
+ ```xs
183
+ branch "production" {
184
+ color = "#22c55e"
185
+ description = "Production environment"
186
+
187
+ middleware = {
188
+ function: {
189
+ pre: ["auth_check", "rate_limit"],
190
+ post: ["audit_log"]
191
+ },
192
+ query: {
193
+ pre: ["auth_check", "rate_limit", "security_check"],
194
+ post: ["audit_log", "cache_response"]
195
+ },
196
+ task: {
197
+ pre: ["task_lock"],
198
+ post: ["audit_log"]
199
+ },
200
+ tool: {
201
+ pre: ["auth_check"],
202
+ post: ["audit_log"]
203
+ }
204
+ }
205
+
206
+ history = {
207
+ function: 100,
208
+ query: 100,
209
+ task: 100,
210
+ tool: 100,
211
+ trigger: 100,
212
+ middleware: false
213
+ }
214
+ }
215
+ ```
216
+
217
+ ---
218
+
219
+ ## File Location
220
+
221
+ Branch configuration files are typically named `branch.xs` and placed at the workspace root or in a dedicated configuration directory.
222
+
223
+ ```
224
+ project/
225
+ โ”œโ”€โ”€ branch.xs // Branch configuration
226
+ โ”œโ”€โ”€ tables/
227
+ โ”œโ”€โ”€ functions/
228
+ โ””โ”€โ”€ apis/
229
+ ```
230
+
231
+ ---
232
+
233
+ ## Best Practices
234
+
235
+ 1. **Use descriptive colors** - Green for production, blue for development, yellow for staging
236
+ 2. **Limit production history** - Excessive history impacts performance and storage
237
+ 3. **Apply security middleware in production** - Rate limiting, auth checks, audit logging
238
+ 4. **Disable middleware history in production** - Reduces noise and storage
239
+ 5. **Enable full history in development** - Aids debugging and testing
@@ -72,7 +72,7 @@ Reference with path: `function.run "math/add" { ... }`
72
72
 
73
73
  ## Input Block
74
74
 
75
- For complete type and filter reference, use `xanoscript_docs({ keyword: "input" })`.
75
+ For complete type and filter reference, use `xanoscript_docs({ topic: "types" })`.
76
76
 
77
77
  ```xs
78
78
  input {
@@ -188,7 +188,7 @@ stack {
188
188
 
189
189
  ### Error Handling
190
190
 
191
- For complete error handling reference (preconditions, try-catch, throw, early return), use `xanoscript_docs({ keyword: "syntax" })`.
191
+ For complete error handling reference (preconditions, try-catch, throw, early return), use `xanoscript_docs({ topic: "syntax" })`.
192
192
 
193
193
  ---
194
194