@xano/developer-mcp 2.3.0-beta.1 → 2.3.0-beta.11
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 +4 -14
- package/dist/cli_docs/index.js +0 -4
- package/dist/cli_docs/topics/function.js +0 -2
- package/dist/cli_docs/topics/knowledge.js +1 -2
- package/dist/cli_docs/topics/workspace.js +23 -12
- package/dist/meta_api_docs/format.js +15 -2
- package/dist/meta_api_docs/index.js +0 -2
- package/dist/meta_api_docs/topics/agent.js +36 -24
- package/dist/meta_api_docs/topics/api.js +50 -43
- package/dist/meta_api_docs/topics/apigroup.js +2 -2
- package/dist/meta_api_docs/topics/authentication.js +1 -1
- package/dist/meta_api_docs/topics/function.js +26 -25
- package/dist/meta_api_docs/topics/history.js +42 -11
- package/dist/meta_api_docs/topics/mcp_server.js +23 -28
- package/dist/meta_api_docs/topics/middleware.js +36 -32
- package/dist/meta_api_docs/topics/table.js +43 -22
- package/dist/meta_api_docs/topics/task.js +40 -40
- package/dist/meta_api_docs/topics/tool.js +39 -26
- package/dist/meta_api_docs/topics/workflows.js +84 -28
- package/dist/meta_api_docs/topics/workspace.js +1 -1
- package/dist/tools/validate_xanoscript.js +6 -9
- package/dist/xanoscript.js +0 -1
- package/dist/xanoscript_docs/README.md +25 -8
- package/dist/xanoscript_docs/agents.md +14 -5
- package/dist/xanoscript_docs/ai.md +820 -0
- package/dist/xanoscript_docs/branch.md +109 -29
- package/dist/xanoscript_docs/database.md +7 -5
- package/dist/xanoscript_docs/docs_index.json +36 -22
- package/dist/xanoscript_docs/essentials.md +53 -19
- package/dist/xanoscript_docs/file-uploads.md +4 -4
- package/dist/xanoscript_docs/mcp-servers.md +2 -2
- package/dist/xanoscript_docs/prompts.md +4 -2
- package/dist/xanoscript_docs/realtime-v2.md +4 -2
- package/dist/xanoscript_docs/resources.md +3 -1
- package/dist/xanoscript_docs/survival.md +1 -5
- package/dist/xanoscript_docs/tables.md +58 -0
- package/dist/xanoscript_docs/tools.md +1 -1
- package/dist/xanoscript_docs/triggers.md +133 -3
- package/dist/xanoscript_docs/types.md +14 -1
- package/dist/xanoscript_docs/unit-testing.md +29 -2
- package/dist/xanoscript_docs/version.json +2 -2
- package/dist/xanoscript_docs/workflow-tests.md +18 -0
- package/dist/xanoscript_docs/working.md +39 -15
- package/package.json +2 -3
- package/dist/cli_docs/topics/policy.d.ts +0 -2
- package/dist/cli_docs/topics/policy.js +0 -91
- package/dist/cli_docs/topics/skills.d.ts +0 -2
- package/dist/cli_docs/topics/skills.js +0 -57
- package/dist/meta_api_docs/topics/policy.d.ts +0 -3
- package/dist/meta_api_docs/topics/policy.js +0 -135
- package/dist/xanoscript_docs/policies.md +0 -308
package/README.md
CHANGED
|
@@ -78,15 +78,12 @@ Add to your Claude Desktop configuration file:
|
|
|
78
78
|
|
|
79
79
|
## Xano Skills
|
|
80
80
|
|
|
81
|
-
This repo ships
|
|
81
|
+
This repo ships two agent skills under `skills/`:
|
|
82
82
|
|
|
83
83
|
- **`xano-init`** — guided setup that profiles a Xano workspace and builds a sandbox-first development playbook
|
|
84
84
|
- **`xanoscript-docs-expert`** — deep reference for working with XanoScript documentation and this MCP project's architecture
|
|
85
|
-
- **`xano-policies`** — stub for workspace policies: the authoring rules that never change, plus `xano skills pull` to install the live, catalogue-generated skill from your instance
|
|
86
85
|
|
|
87
|
-
**Using Claude Code inside this repo?** You already have
|
|
88
|
-
|
|
89
|
-
> Only the root `skills/` folder is published (skills.sh indexes it, and `npx skills add` installs from it); `.claude/skills/` is the copy this repo's own Claude Code sessions load. Edit `xano-policies` in both places: a test fails when its two copies differ.
|
|
86
|
+
**Using Claude Code inside this repo?** You already have both skills. They're committed to `.claude/skills/` and load automatically when Claude Code starts a session in this directory — no install step needed. Just invoke `xano-init` or `xanoscript-docs-expert` by name, or describe the task in natural language.
|
|
90
87
|
|
|
91
88
|
**Using a different agent, or want the skills available in other projects?** Skills are distributed via the open [Agent Skills standard](https://github.com/vercel-labs/skills) and install with a single `npx` command — no cloning or manual file copying.
|
|
92
89
|
|
|
@@ -103,7 +100,7 @@ npx skills add xano-inc/xano-developer-mcp -s xano-init \
|
|
|
103
100
|
-a claude-code -a codex -a cursor -a opencode -g
|
|
104
101
|
```
|
|
105
102
|
|
|
106
|
-
Drop `-s` to install every skill in the repo, or drop `-g` to scope the install to the current project instead of your user profile.
|
|
103
|
+
Drop `-s` to install every skill in the repo, or drop `-g` to scope the install to the current project instead of your user profile. Other supported agents include `gemini-cli`, `windsurf`, `continue`, `cline`, `github-copilot`, and more — see the [skills CLI](https://github.com/vercel-labs/skills) for the full list.
|
|
107
104
|
|
|
108
105
|
Start a new agent session after installing so the skill manifest is picked up.
|
|
109
106
|
|
|
@@ -328,7 +325,7 @@ import '@xano/developer-mcp/server';
|
|
|
328
325
|
|
|
329
326
|
### 1. `xano_validate_xanoscript`
|
|
330
327
|
|
|
331
|
-
Validates XanoScript code for syntax errors. Supports multiple input methods. The language server auto-detects the object type from the code syntax
|
|
328
|
+
Validates XanoScript code for syntax errors. Supports multiple input methods. The language server auto-detects the object type from the code syntax.
|
|
332
329
|
|
|
333
330
|
**Parameters:**
|
|
334
331
|
| Parameter | Type | Required | Description |
|
|
@@ -415,7 +412,6 @@ Retrieves XanoScript programming language documentation with context-aware suppo
|
|
|
415
412
|
| `middleware` | Request/response interceptors for functions, queries, tasks, and tools |
|
|
416
413
|
| `branch` | Branch-level settings: middleware, history retention, visual styling |
|
|
417
414
|
| `workspace` | Workspace-level settings: environment variables, preferences, realtime |
|
|
418
|
-
| `policies` | Workspace policy documents: syntax, the check catalogue, goals and authoring rules |
|
|
419
415
|
|
|
420
416
|
**Examples:**
|
|
421
417
|
```
|
|
@@ -497,7 +493,6 @@ Get documentation for Xano's Meta API. Use this to understand how to programmati
|
|
|
497
493
|
| `realtime` | Real-time channel operations |
|
|
498
494
|
| `file` | File management |
|
|
499
495
|
| `history` | Version history |
|
|
500
|
-
| `policy` | Workspace policies: check catalogue and goals, parse, save, object lookup, evaluate, runs (whole, summary and findings pages), agent skill |
|
|
501
496
|
| `workflows` | Step-by-step workflow guides |
|
|
502
497
|
|
|
503
498
|
**Examples:**
|
|
@@ -545,8 +540,6 @@ Use this tool to understand CLI commands for local development, code synchroniza
|
|
|
545
540
|
| `tenant` | Tenant management - CRUD, deployments, env vars, backups, clusters |
|
|
546
541
|
| `unit_test` | Unit test management - list and run unit tests |
|
|
547
542
|
| `workflow_test` | Workflow test management - list, run, and manage workflow tests |
|
|
548
|
-
| `policy` | Workspace policies - catalogue, parse, publish, evaluate, status, runs, delete |
|
|
549
|
-
| `skills` | Install the agent skill the instance generates (`skills pull`) |
|
|
550
543
|
| `platform` | Platform management - list and view platform versions |
|
|
551
544
|
| `static_host` | Static hosting - deploy frontend builds |
|
|
552
545
|
| `update` | Update the CLI to the latest version |
|
|
@@ -609,7 +602,6 @@ The server also exposes XanoScript documentation as MCP resources for direct acc
|
|
|
609
602
|
| `xanoscript://docs/middleware` | Request/response interceptors |
|
|
610
603
|
| `xanoscript://docs/branch` | Branch-level settings |
|
|
611
604
|
| `xanoscript://docs/workspace` | Workspace-level settings |
|
|
612
|
-
| `xanoscript://docs/policies` | Workspace policy documents |
|
|
613
605
|
|
|
614
606
|
## npm Scripts
|
|
615
607
|
|
|
@@ -621,7 +613,6 @@ The server also exposes XanoScript documentation as MCP resources for direct acc
|
|
|
621
613
|
| `test` | `vitest run` | Run unit tests |
|
|
622
614
|
| `test:watch` | `vitest` | Run tests in watch mode |
|
|
623
615
|
| `test:coverage` | `vitest run --coverage` | Run tests with coverage report |
|
|
624
|
-
| `gen:policy-docs` | `node scripts/gen-policy-check-docs.mjs` | Regenerate the check catalogue regions of `policies.md` from `scripts/policy-catalogue.json` |
|
|
625
616
|
|
|
626
617
|
## Project Structure
|
|
627
618
|
|
|
@@ -739,7 +730,6 @@ Compiles TypeScript to JavaScript in the `dist/` directory.
|
|
|
739
730
|
- **aliases**: Alternative names for topic lookup
|
|
740
731
|
- **priority**: Ordering weight for file_path matching
|
|
741
732
|
- **exclusive**: The topic alone documents the files its `applyTo` matches, so file_path mode returns only that topic
|
|
742
|
-
- The check catalogue in `policies.md` is generated between its `BEGIN GENERATED` and `END GENERATED` markers. To refresh it, save the catalogue the platform serves (`xano policy catalogue -o json`, from an instance running the matching platform version) to `scripts/policy-catalogue.json`, then run `npm run gen:policy-docs`; a test fails when the two disagree
|
|
743
733
|
|
|
744
734
|
**Meta API Documentation** (`src/meta_api_docs/`):
|
|
745
735
|
- TypeScript modules with structured documentation
|
package/dist/cli_docs/index.js
CHANGED
|
@@ -24,8 +24,6 @@ import { platformDoc } from "./topics/platform.js";
|
|
|
24
24
|
import { staticHostDoc } from "./topics/static_host.js";
|
|
25
25
|
import { updateDoc } from "./topics/update.js";
|
|
26
26
|
import { integrationDoc } from "./topics/integration.js";
|
|
27
|
-
import { policyDoc } from "./topics/policy.js";
|
|
28
|
-
import { skillsDoc } from "./topics/skills.js";
|
|
29
27
|
/**
|
|
30
28
|
* All available documentation topics
|
|
31
29
|
*/
|
|
@@ -46,8 +44,6 @@ export const topics = {
|
|
|
46
44
|
static_host: staticHostDoc,
|
|
47
45
|
update: updateDoc,
|
|
48
46
|
integration: integrationDoc,
|
|
49
|
-
policy: policyDoc,
|
|
50
|
-
skills: skillsDoc,
|
|
51
47
|
};
|
|
52
48
|
/**
|
|
53
49
|
* Get list of all available topic names
|
|
@@ -87,7 +87,6 @@ Xano CLI commands are SPACE-separated (e.g. \`xano function list\`), not colon-s
|
|
|
87
87
|
{ name: "file", short: "f", type: "string", required: false, description: "Path to file containing XanoScript code (mutually exclusive with --stdin)" },
|
|
88
88
|
{ name: "stdin", short: "s", type: "boolean", required: false, default: "false", description: "Read XanoScript code from stdin (mutually exclusive with --file)" },
|
|
89
89
|
{ name: "edit", short: "e", type: "boolean", required: false, default: "false", description: "Open the file in $EDITOR before creating (requires --file)" },
|
|
90
|
-
{ name: "policy-override", type: "string", required: false, description: "Create the function past a blocking live-branch publish policy gate with an audited reason (requires workspace:policy update). A refusal without it saves nothing and exits 2; pass only the user's own reason" },
|
|
91
90
|
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" },
|
|
92
91
|
{ name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
|
|
93
92
|
],
|
|
@@ -111,7 +110,6 @@ Xano CLI commands are SPACE-separated (e.g. \`xano function list\`), not colon-s
|
|
|
111
110
|
{ name: "stdin", short: "s", type: "boolean", required: false, default: "false", description: "Read updated XanoScript from stdin (mutually exclusive with --file)" },
|
|
112
111
|
{ name: "edit", short: "e", type: "boolean", required: false, default: "false", description: "Open the file in $EDITOR before updating (requires --file)" },
|
|
113
112
|
{ name: "publish", type: "boolean", required: false, default: "true", description: "Publish after editing (use --no-publish to save as draft only)" },
|
|
114
|
-
{ name: "policy-override", type: "string", required: false, description: "Publish past a blocking live-branch publish policy gate with an audited reason (requires workspace:policy update). A refusal without it saves nothing and exits 2; pass only the user's own reason" },
|
|
115
113
|
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "Output format: summary or json" },
|
|
116
114
|
{ name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
|
|
117
115
|
],
|
|
@@ -8,7 +8,6 @@ export const knowledgeDoc = {
|
|
|
8
8
|
- **Knowledge types**: \`agents.md\` (the workspace's AGENTS.md), \`doc\` (standalone markdown docs), and \`skill\` (a SKILL.md plus optional reference files).
|
|
9
9
|
- **Inclusion**: how an item is surfaced to AI — \`always\` (always-on context), \`on demand\` (auto-selected when relevant), or \`manual\` (only when explicitly referenced).
|
|
10
10
|
- **Read via \`knowledge list\`/\`knowledge get\`**; **write via workspace/sandbox push** — there is no \`knowledge push\`/\`knowledge pull\`. Knowledge is synced automatically as part of \`workspace pull/push\` and \`sandbox pull/push\` under the \`knowledge/\` directory.
|
|
11
|
-
- **Not every skill an agent gets is a knowledge record.** The platform's \`xano-policies\` skill never appears in \`knowledge list\` or under \`knowledge/\`; see the \`skills\` topic. A workspace knowledge record of the same name replaces it.
|
|
12
11
|
|
|
13
12
|
## On-Disk Layout (from workspace/sandbox pull)
|
|
14
13
|
|
|
@@ -57,7 +56,7 @@ guid: abc123...
|
|
|
57
56
|
**\`knowledge get\` matching:** the name match is case-insensitive; on a miss the error lists all available names. Use \`--file <path>\` to fetch a skill's reference file instead of its SKILL.md.
|
|
58
57
|
|
|
59
58
|
**Frontmatter caution:** write \`inclusion\` (not \`mode\`) in frontmatter — the CLI writes \`inclusion: always | on demand | manual\` on pull and normalizes those labels back to the backend enum on push.`,
|
|
60
|
-
related_topics: ["workspace", "sandbox"
|
|
59
|
+
related_topics: ["workspace", "sandbox"],
|
|
61
60
|
commands: [
|
|
62
61
|
{
|
|
63
62
|
name: "knowledge list",
|
|
@@ -56,11 +56,27 @@ After \`workspace pull\`, files are organized using snake_case naming:
|
|
|
56
56
|
│ │ └── on_connect.xs # MCP server triggers
|
|
57
57
|
│ └── tool/
|
|
58
58
|
│ └── my_tool.xs # AI tools
|
|
59
|
+
├── prompt/
|
|
60
|
+
│ └── code_review.xs # MCP prompts
|
|
61
|
+
├── resource/
|
|
62
|
+
│ └── order_docs.xs # MCP resources
|
|
59
63
|
├── realtime/
|
|
64
|
+
│ ├── server/
|
|
65
|
+
│ │ └── chat/ # Realtime V2 server folder
|
|
66
|
+
│ │ ├── chat.xs # Realtime V2 server
|
|
67
|
+
│ │ ├── trigger/
|
|
68
|
+
│ │ │ └── on_connect.xs # Server connect/disconnect triggers
|
|
69
|
+
│ │ └── channel/
|
|
70
|
+
│ │ └── rooms_room_id/
|
|
71
|
+
│ │ ├── rooms_room_id.xs # Channel "rooms/{room_id}"
|
|
72
|
+
│ │ ├── message/
|
|
73
|
+
│ │ │ └── send.xs # Channel messages
|
|
74
|
+
│ │ └── trigger/
|
|
75
|
+
│ │ └── on_join.xs # Channel join/leave/deliver triggers
|
|
60
76
|
│ ├── channel/
|
|
61
|
-
│ │ └── my_channel.xs #
|
|
77
|
+
│ │ └── my_channel.xs # Legacy V1 realtime channels
|
|
62
78
|
│ └── trigger/
|
|
63
|
-
│ └── on_connect.xs #
|
|
79
|
+
│ └── on_connect.xs # Legacy V1 realtime triggers
|
|
64
80
|
└── knowledge/ # Knowledge & skills (markdown, synced automatically)
|
|
65
81
|
├── agents.md # Workspace AGENTS.md
|
|
66
82
|
├── docs/
|
|
@@ -75,8 +91,6 @@ After \`workspace pull\`, files are organized using snake_case naming:
|
|
|
75
91
|
|
|
76
92
|
\`workspace pull\` and \`workspace push\` automatically sync knowledge and skills (markdown files under \`knowledge/\`) alongside XanoScript — no extra flag. Knowledge participates in push previews, \`--sync\`/\`--delete\`, and \`--include\`/\`--exclude\` globs. See the \`knowledge\` topic for the file layout and frontmatter format.
|
|
77
93
|
|
|
78
|
-
The platform's generated \`xano-policies\` skill is not workspace knowledge, so pull does not write it; see the \`skills\` topic.
|
|
79
|
-
|
|
80
94
|
## Syntax note
|
|
81
95
|
|
|
82
96
|
Xano CLI commands are SPACE-separated (e.g. \`xano workspace pull\`), not colon-separated.
|
|
@@ -118,7 +132,6 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
118
132
|
- \`--dry-run\`: Preview what would change without applying
|
|
119
133
|
- \`--include/-i\` and \`--exclude/-e\`: Glob patterns for selective push (repeatable)
|
|
120
134
|
- \`--no-transaction\` and \`--no-guids\` disable the default transaction wrapping and GUID write-back
|
|
121
|
-
- \`-m/--message\`: labels only the Version History entry of each policy the push changes; other objects get no message, and an unchanged policy gets no entry
|
|
122
135
|
|
|
123
136
|
**Knowledge sync (automatic):**
|
|
124
137
|
- \`pull\` writes knowledge/skills markdown under \`knowledge/\`; \`push\` sends it back — no flag needed
|
|
@@ -137,7 +150,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
137
150
|
**When to use sandbox instead:**
|
|
138
151
|
- \`sandbox\` is a lighter-weight alternative for ephemeral, isolated iteration
|
|
139
152
|
- Use workspace pull/push for canonical sync, version control, and CI/CD`,
|
|
140
|
-
related_topics: ["start", "branch", "function", "release", "sandbox", "knowledge", "
|
|
153
|
+
related_topics: ["start", "branch", "function", "release", "sandbox", "knowledge", "integration"],
|
|
141
154
|
commands: [
|
|
142
155
|
{
|
|
143
156
|
name: "workspace list",
|
|
@@ -222,7 +235,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
222
235
|
},
|
|
223
236
|
{
|
|
224
237
|
name: "workspace pull",
|
|
225
|
-
description: "Download workspace code to a local directory. Splits the multidoc response into individual .xs files organized by type, and also writes workspace knowledge/skills markdown under knowledge/. The target directory is the -d/--directory flag (default: current directory), not a positional argument.
|
|
238
|
+
description: "Download workspace code to a local directory. Splits the multidoc response into individual .xs files organized by type, and also writes workspace knowledge/skills markdown under knowledge/. The target directory is the -d/--directory flag (default: current directory), not a positional argument.",
|
|
226
239
|
usage: "xano workspace pull [options]",
|
|
227
240
|
flags: [
|
|
228
241
|
{ name: "directory", short: "d", type: "string", required: false, default: ".", description: "Output directory for pulled documents (defaults to current directory)" },
|
|
@@ -242,7 +255,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
242
255
|
},
|
|
243
256
|
{
|
|
244
257
|
name: "workspace push",
|
|
245
|
-
description: "Upload local XanoScript files to a workspace, including knowledge/skills markdown under knowledge/ (synced automatically, shown in the preview). Default mode is partial (only changed files). Use --sync for a full push. The source directory is the -d/--directory flag (default: current directory), not a positional argument. A partial push is additive, not declarative: it adds and updates but makes no destructive changes (it won't drop a removed column or relax a constraint), so local files and the live workspace can diverge. Use --sync for destructive changes; --dry-run to preview.
|
|
258
|
+
description: "Upload local XanoScript files to a workspace, including knowledge/skills markdown under knowledge/ (synced automatically, shown in the preview). Default mode is partial (only changed files). Use --sync for a full push. The source directory is the -d/--directory flag (default: current directory), not a positional argument. A partial push is additive, not declarative: it adds and updates but makes no destructive changes (it won't drop a removed column or relax a constraint), so local files and the live workspace can diverge. Use --sync for destructive changes; --dry-run to preview. If the knowledge sync fails after the import has landed, the import stands: the push exits 1, and -o json prints the import document with the failure as error ({exit, message}).",
|
|
246
259
|
usage: "xano workspace push [options]",
|
|
247
260
|
flags: [
|
|
248
261
|
{ name: "directory", short: "d", type: "string", required: false, default: ".", description: "Directory containing documents to push (defaults to current directory)" },
|
|
@@ -259,8 +272,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
259
272
|
{ name: "guids", type: "boolean", required: false, default: "true", description: "Write server-assigned GUIDs back to local files after push (--no-guids to disable)" },
|
|
260
273
|
{ name: "include", short: "i", type: "string", required: false, description: "Glob pattern to include files, matched against relative paths (repeatable)" },
|
|
261
274
|
{ name: "exclude", short: "e", type: "string", required: false, description: "Glob pattern to exclude files, matched against relative paths (repeatable)" },
|
|
262
|
-
{ name: "
|
|
263
|
-
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "summary or json; JSON retains the complete import response and policy_check feedback" },
|
|
275
|
+
{ name: "output", short: "o", type: "string", required: false, default: "summary", description: "summary or json; JSON retains the complete import response" },
|
|
264
276
|
{ name: "profile", short: "p", type: "string", required: false, description: "Profile name to use" }
|
|
265
277
|
],
|
|
266
278
|
examples: [
|
|
@@ -272,8 +284,7 @@ For lighter-weight iterative development without pulling the whole workspace, se
|
|
|
272
284
|
'xano workspace push -i "api/**" -i "function/**"',
|
|
273
285
|
'xano workspace push -e "table/**" --records --truncate',
|
|
274
286
|
"xano workspace push --no-transaction --no-guids",
|
|
275
|
-
"xano workspace push --force -o json"
|
|
276
|
-
'xano workspace push -m "Tightened the auth policies"'
|
|
287
|
+
"xano workspace push --force -o json"
|
|
277
288
|
]
|
|
278
289
|
},
|
|
279
290
|
{
|
|
@@ -43,6 +43,9 @@ function formatEndpoint(ep, detailLevel) {
|
|
|
43
43
|
if (ep.request_body) {
|
|
44
44
|
lines.push("");
|
|
45
45
|
lines.push(`**Request Body:** \`${ep.request_body.type}\``);
|
|
46
|
+
if (ep.request_body.description) {
|
|
47
|
+
lines.push(ep.request_body.description);
|
|
48
|
+
}
|
|
46
49
|
if (ep.request_body.properties) {
|
|
47
50
|
for (const [key, val] of Object.entries(ep.request_body.properties)) {
|
|
48
51
|
const req = val.required ? " (required)" : "";
|
|
@@ -56,13 +59,23 @@ function formatEndpoint(ep, detailLevel) {
|
|
|
56
59
|
lines.push("**Example:**");
|
|
57
60
|
lines.push("```");
|
|
58
61
|
lines.push(`${ep.example.method} ${ep.example.path}`);
|
|
62
|
+
if (ep.example.headers) {
|
|
63
|
+
for (const [key, val] of Object.entries(ep.example.headers)) {
|
|
64
|
+
lines.push(`${key}: ${val}`);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
59
67
|
if (ep.example.body) {
|
|
60
|
-
lines.push(
|
|
68
|
+
lines.push("");
|
|
69
|
+
lines.push(formatBody(ep.example.body));
|
|
61
70
|
}
|
|
62
71
|
lines.push("```");
|
|
63
72
|
}
|
|
64
73
|
return lines.join("\n");
|
|
65
74
|
}
|
|
75
|
+
// A string body (a XanoScript request) is printed as sent; anything else as JSON.
|
|
76
|
+
function formatBody(body) {
|
|
77
|
+
return typeof body === "string" ? body : JSON.stringify(body, null, 2);
|
|
78
|
+
}
|
|
66
79
|
function formatExample(ex) {
|
|
67
80
|
const lines = [];
|
|
68
81
|
lines.push(`### ${ex.title}`);
|
|
@@ -79,7 +92,7 @@ function formatExample(ex) {
|
|
|
79
92
|
}
|
|
80
93
|
if (ex.request.body) {
|
|
81
94
|
lines.push("");
|
|
82
|
-
lines.push(
|
|
95
|
+
lines.push(formatBody(ex.request.body));
|
|
83
96
|
}
|
|
84
97
|
lines.push("```");
|
|
85
98
|
if (ex.response !== undefined) {
|
|
@@ -27,7 +27,6 @@ import { realtimeDoc } from "./topics/realtime.js";
|
|
|
27
27
|
import { fileDoc } from "./topics/file.js";
|
|
28
28
|
import { historyDoc } from "./topics/history.js";
|
|
29
29
|
import { workflowsDoc } from "./topics/workflows.js";
|
|
30
|
-
import { policyDoc } from "./topics/policy.js";
|
|
31
30
|
/**
|
|
32
31
|
* All available documentation topics
|
|
33
32
|
*/
|
|
@@ -51,7 +50,6 @@ export const topics = {
|
|
|
51
50
|
file: fileDoc,
|
|
52
51
|
history: historyDoc,
|
|
53
52
|
workflows: workflowsDoc,
|
|
54
|
-
policy: policyDoc,
|
|
55
53
|
};
|
|
56
54
|
/**
|
|
57
55
|
* Get list of all available topic names
|
|
@@ -58,30 +58,27 @@ export const agentDoc = {
|
|
|
58
58
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
59
59
|
],
|
|
60
60
|
request_body: {
|
|
61
|
-
type: "
|
|
62
|
-
|
|
63
|
-
name: { type: "string", description: "Agent name", required: true },
|
|
64
|
-
description: { type: "string", description: "Agent description" },
|
|
65
|
-
xanoscript: { type: "string", description: "XanoScript agent definition", required: true }
|
|
66
|
-
}
|
|
61
|
+
type: "text/x-xanoscript",
|
|
62
|
+
description: "The agent as XanoScript, sent as the raw request body with `Content-Type: text/x-xanoscript`. Its name, LLM settings and tools come from the script. A JSON body's `xanoscript` field is not read: the route drops fields it does not declare, so a JSON request creates the agent without its code."
|
|
67
63
|
},
|
|
68
64
|
example: {
|
|
69
65
|
method: "POST",
|
|
70
66
|
path: "/workspace/1/agent",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
llm {
|
|
76
|
-
type
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
max_steps
|
|
80
|
-
temperature
|
|
67
|
+
headers: { "Content-Type": "text/x-xanoscript" },
|
|
68
|
+
body: `agent "Customer Support" {
|
|
69
|
+
canonical = "support-agent-v1"
|
|
70
|
+
description = "Handles customer inquiries"
|
|
71
|
+
llm = {
|
|
72
|
+
type: "xano-free"
|
|
73
|
+
system_prompt: "You are a helpful customer support agent."
|
|
74
|
+
prompt: "{{ $args.user_message }}"
|
|
75
|
+
max_steps: 5
|
|
76
|
+
temperature: 0.7
|
|
81
77
|
}
|
|
82
|
-
tools = [
|
|
78
|
+
tools = [
|
|
79
|
+
{ name: "get_order_status" }
|
|
80
|
+
]
|
|
83
81
|
}`
|
|
84
|
-
}
|
|
85
82
|
}
|
|
86
83
|
},
|
|
87
84
|
{
|
|
@@ -95,12 +92,27 @@ export const agentDoc = {
|
|
|
95
92
|
{ name: "publish", type: "boolean", default: true, description: "Publish changes immediately" }
|
|
96
93
|
],
|
|
97
94
|
request_body: {
|
|
98
|
-
type: "
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
95
|
+
type: "text/x-xanoscript",
|
|
96
|
+
description: "The whole agent as XanoScript, sent as the raw request body with `Content-Type: text/x-xanoscript`; it replaces the current definition. A JSON body's `xanoscript` field is not read: the route drops fields it does not declare, so a JSON request never changes the agent's code."
|
|
97
|
+
},
|
|
98
|
+
example: {
|
|
99
|
+
method: "PUT",
|
|
100
|
+
path: "/workspace/1/agent/2",
|
|
101
|
+
headers: { "Content-Type": "text/x-xanoscript" },
|
|
102
|
+
body: `agent "Customer Support" {
|
|
103
|
+
canonical = "support-agent-v1"
|
|
104
|
+
description = "Handles customer inquiries"
|
|
105
|
+
llm = {
|
|
106
|
+
type: "xano-free"
|
|
107
|
+
system_prompt: "You are a helpful customer support agent."
|
|
108
|
+
prompt: "{{ $args.user_message }}"
|
|
109
|
+
max_steps: 5
|
|
110
|
+
temperature: 0.7
|
|
111
|
+
}
|
|
112
|
+
tools = [
|
|
113
|
+
{ name: "get_order_status" }
|
|
114
|
+
]
|
|
115
|
+
}`
|
|
104
116
|
}
|
|
105
117
|
},
|
|
106
118
|
{
|
|
@@ -17,7 +17,7 @@ export const apiDoc = {
|
|
|
17
17
|
{
|
|
18
18
|
method: "GET",
|
|
19
19
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api",
|
|
20
|
-
tool_name: "
|
|
20
|
+
tool_name: "listAPIs",
|
|
21
21
|
description: "List all API endpoints in an API group.",
|
|
22
22
|
parameters: [
|
|
23
23
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -33,7 +33,7 @@ export const apiDoc = {
|
|
|
33
33
|
{
|
|
34
34
|
method: "GET",
|
|
35
35
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
36
|
-
tool_name: "
|
|
36
|
+
tool_name: "getAPI",
|
|
37
37
|
description: "Get details of a specific API endpoint.",
|
|
38
38
|
parameters: [
|
|
39
39
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -46,37 +46,38 @@ export const apiDoc = {
|
|
|
46
46
|
{
|
|
47
47
|
method: "POST",
|
|
48
48
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api",
|
|
49
|
-
tool_name: "
|
|
49
|
+
tool_name: "createAPI",
|
|
50
50
|
description: "Create a new API endpoint with XanoScript logic.",
|
|
51
51
|
parameters: [
|
|
52
52
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
53
53
|
{ name: "apigroup_id", type: "integer", required: true, in: "path", description: "API Group ID" }
|
|
54
54
|
],
|
|
55
55
|
request_body: {
|
|
56
|
-
type: "
|
|
57
|
-
|
|
58
|
-
name: { type: "string", description: "Endpoint name", required: true },
|
|
59
|
-
path: { type: "string", description: "URL path (e.g., /users/{id})", required: true },
|
|
60
|
-
verb: { type: "string", description: "HTTP method: GET, POST, PUT, DELETE", required: true },
|
|
61
|
-
description: { type: "string", description: "Endpoint description" },
|
|
62
|
-
xanoscript: { type: "string", description: "XanoScript code defining the endpoint logic" }
|
|
63
|
-
}
|
|
56
|
+
type: "text/x-xanoscript",
|
|
57
|
+
description: "The endpoint as XanoScript, sent as the raw request body with `Content-Type: text/x-xanoscript`. Its name, verb, path, inputs and response come from the script (`query \"<path>\" verb=<VERB> { ... }`). A JSON body's `xanoscript` field is not read: the route drops fields it does not declare, so a JSON request creates the endpoint without its code."
|
|
64
58
|
},
|
|
65
59
|
example: {
|
|
66
60
|
method: "POST",
|
|
67
61
|
path: "/workspace/1/apigroup/2/api",
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
62
|
+
headers: { "Content-Type": "text/x-xanoscript" },
|
|
63
|
+
body: `query "orders" verb=GET {
|
|
64
|
+
description = "List orders, 20 a page"
|
|
65
|
+
input {
|
|
66
|
+
int page?=1
|
|
67
|
+
}
|
|
68
|
+
stack {
|
|
69
|
+
db.query "order" {
|
|
70
|
+
return = {type: "list", paging: {page: $input.page, per_page: 20}}
|
|
71
|
+
} as $orders
|
|
72
|
+
}
|
|
73
|
+
response = $orders
|
|
74
|
+
}`
|
|
74
75
|
}
|
|
75
76
|
},
|
|
76
77
|
{
|
|
77
78
|
method: "PUT",
|
|
78
79
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
79
|
-
tool_name: "
|
|
80
|
+
tool_name: "updateAPI",
|
|
80
81
|
description: "Update an existing API endpoint.",
|
|
81
82
|
parameters: [
|
|
82
83
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -85,20 +86,31 @@ export const apiDoc = {
|
|
|
85
86
|
{ name: "publish", type: "boolean", default: true, description: "Publish changes immediately" }
|
|
86
87
|
],
|
|
87
88
|
request_body: {
|
|
88
|
-
type: "
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
type: "text/x-xanoscript",
|
|
90
|
+
description: "The whole endpoint as XanoScript, sent as the raw request body with `Content-Type: text/x-xanoscript`; it replaces the current definition. A JSON body's `xanoscript` field is not read: the route drops fields it does not declare, so a JSON request never changes the endpoint's code."
|
|
91
|
+
},
|
|
92
|
+
example: {
|
|
93
|
+
method: "PUT",
|
|
94
|
+
path: "/workspace/1/apigroup/2/api/7",
|
|
95
|
+
headers: { "Content-Type": "text/x-xanoscript" },
|
|
96
|
+
body: `query "orders" verb=GET {
|
|
97
|
+
description = "List orders, 20 a page"
|
|
98
|
+
input {
|
|
99
|
+
int page?=1
|
|
100
|
+
}
|
|
101
|
+
stack {
|
|
102
|
+
db.query "order" {
|
|
103
|
+
return = {type: "list", paging: {page: $input.page, per_page: 20}}
|
|
104
|
+
} as $orders
|
|
105
|
+
}
|
|
106
|
+
response = $orders
|
|
107
|
+
}`
|
|
96
108
|
}
|
|
97
109
|
},
|
|
98
110
|
{
|
|
99
111
|
method: "DELETE",
|
|
100
112
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
101
|
-
tool_name: "
|
|
113
|
+
tool_name: "deleteAPI",
|
|
102
114
|
description: "Delete an API endpoint.",
|
|
103
115
|
parameters: [
|
|
104
116
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -109,7 +121,7 @@ export const apiDoc = {
|
|
|
109
121
|
{
|
|
110
122
|
method: "PUT",
|
|
111
123
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/security",
|
|
112
|
-
tool_name: "
|
|
124
|
+
tool_name: "updateAPISecurity",
|
|
113
125
|
description: "Update security settings for a specific endpoint (overrides group settings).",
|
|
114
126
|
parameters: [
|
|
115
127
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -142,32 +154,27 @@ export const apiDoc = {
|
|
|
142
154
|
examples: [
|
|
143
155
|
{
|
|
144
156
|
title: "Create a GET endpoint",
|
|
145
|
-
description: "Create a
|
|
157
|
+
description: "Create an endpoint that lists orders, 20 a page. The endpoint is the request body, as XanoScript.",
|
|
146
158
|
request: {
|
|
147
159
|
method: "POST",
|
|
148
160
|
path: "/workspace/1/apigroup/2/api",
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
verb: "GET",
|
|
153
|
-
xanoscript: `query listUsers {
|
|
161
|
+
headers: { "Content-Type": "text/x-xanoscript" },
|
|
162
|
+
body: `query "orders" verb=GET {
|
|
163
|
+
description = "List orders, 20 a page"
|
|
154
164
|
input {
|
|
155
|
-
int page
|
|
156
|
-
int per_page = 20
|
|
165
|
+
int page?=1
|
|
157
166
|
}
|
|
158
167
|
stack {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
168
|
+
db.query "order" {
|
|
169
|
+
return = {type: "list", paging: {page: $input.page, per_page: 20}}
|
|
170
|
+
} as $orders
|
|
162
171
|
}
|
|
163
|
-
response = $
|
|
172
|
+
response = $orders
|
|
164
173
|
}`
|
|
165
|
-
}
|
|
166
174
|
},
|
|
167
175
|
response: {
|
|
168
176
|
id: 123,
|
|
169
|
-
name: "
|
|
170
|
-
path: "/users",
|
|
177
|
+
name: "orders",
|
|
171
178
|
verb: "GET"
|
|
172
179
|
}
|
|
173
180
|
}
|
|
@@ -16,7 +16,7 @@ export const apigroupDoc = {
|
|
|
16
16
|
{
|
|
17
17
|
method: "GET",
|
|
18
18
|
path: "/workspace/{workspace_id}/apigroup",
|
|
19
|
-
tool_name: "
|
|
19
|
+
tool_name: "listAPIGroups",
|
|
20
20
|
description: "List all API groups in a workspace with filtering and sorting.",
|
|
21
21
|
parameters: [
|
|
22
22
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -83,7 +83,7 @@ export const apigroupDoc = {
|
|
|
83
83
|
{
|
|
84
84
|
method: "GET",
|
|
85
85
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/openapi",
|
|
86
|
-
tool_name: "
|
|
86
|
+
tool_name: "getApiGroupSwagger",
|
|
87
87
|
description: "Get OpenAPI v3 specification for this API group's endpoints.",
|
|
88
88
|
parameters: [
|
|
89
89
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -41,7 +41,7 @@ Returns: id, name, email, and extras (including role and workspace access).`,
|
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
path: "/auth/me",
|
|
44
|
-
tool_name: "
|
|
44
|
+
tool_name: "getLoggedInUser",
|
|
45
45
|
description: "Get the authenticated user's information including ID, name, email, and role.",
|
|
46
46
|
response: {
|
|
47
47
|
type: "object",
|