@xano/developer-mcp 2.3.0-beta.1 → 2.3.0-beta.10
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/index.js +0 -2
- package/dist/meta_api_docs/topics/api.js +6 -6
- 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/history.js +42 -11
- package/dist/meta_api_docs/topics/mcp_server.js +6 -6
- package/dist/meta_api_docs/topics/middleware.js +1 -1
- package/dist/meta_api_docs/topics/table.js +2 -2
- package/dist/meta_api_docs/topics/workflows.js +1 -1
- 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
|
{
|
|
@@ -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
|
|
@@ -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,7 +46,7 @@ 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" },
|
|
@@ -76,7 +76,7 @@ export const apiDoc = {
|
|
|
76
76
|
{
|
|
77
77
|
method: "PUT",
|
|
78
78
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
79
|
-
tool_name: "
|
|
79
|
+
tool_name: "updateAPI",
|
|
80
80
|
description: "Update an existing API endpoint.",
|
|
81
81
|
parameters: [
|
|
82
82
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -98,7 +98,7 @@ export const apiDoc = {
|
|
|
98
98
|
{
|
|
99
99
|
method: "DELETE",
|
|
100
100
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}",
|
|
101
|
-
tool_name: "
|
|
101
|
+
tool_name: "deleteAPI",
|
|
102
102
|
description: "Delete an API endpoint.",
|
|
103
103
|
parameters: [
|
|
104
104
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -109,7 +109,7 @@ export const apiDoc = {
|
|
|
109
109
|
{
|
|
110
110
|
method: "PUT",
|
|
111
111
|
path: "/workspace/{workspace_id}/apigroup/{apigroup_id}/api/{api_id}/security",
|
|
112
|
-
tool_name: "
|
|
112
|
+
tool_name: "updateAPISecurity",
|
|
113
113
|
description: "Update security settings for a specific endpoint (overrides group settings).",
|
|
114
114
|
parameters: [
|
|
115
115
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -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",
|
|
@@ -9,6 +9,8 @@ export const historyDoc = {
|
|
|
9
9
|
- **Task History**: Scheduled task execution logs
|
|
10
10
|
- **Middleware History**: Middleware execution logs
|
|
11
11
|
- **Tool History**: Agent tool execution logs
|
|
12
|
+
- **Prompt History**: MCP prompt request logs
|
|
13
|
+
- **Resource History**: MCP resource request logs
|
|
12
14
|
- **Trigger History**: Event trigger execution logs
|
|
13
15
|
|
|
14
16
|
## Common Use Cases
|
|
@@ -20,13 +22,13 @@ export const historyDoc = {
|
|
|
20
22
|
ai_hints: `- Use request history to debug API issues
|
|
21
23
|
- Filter by status to find errors (4xx, 5xx)
|
|
22
24
|
- Use branch filter to separate dev/prod logs
|
|
23
|
-
-
|
|
25
|
+
- Pass include_output=true for each request's output; the input is always returned
|
|
24
26
|
- History is limited to recent requests (not permanent storage)`,
|
|
25
27
|
endpoints: [
|
|
26
28
|
{
|
|
27
29
|
method: "GET",
|
|
28
30
|
path: "/workspace/{workspace_id}/request_history",
|
|
29
|
-
tool_name: "
|
|
31
|
+
tool_name: "getApiRequestHistory",
|
|
30
32
|
description: "Get API request history with pagination.",
|
|
31
33
|
parameters: [
|
|
32
34
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -34,13 +36,13 @@ export const historyDoc = {
|
|
|
34
36
|
{ name: "per_page", type: "integer", default: 50, description: "Items per page (max 500)" },
|
|
35
37
|
{ name: "branch", type: "string", description: "Filter by branch name" },
|
|
36
38
|
{ name: "api_id", type: "integer", description: "Filter by API endpoint ID" },
|
|
37
|
-
{ name: "
|
|
39
|
+
{ name: "include_output", type: "boolean", default: false, description: "Include each request's output (response); the input is always returned" }
|
|
38
40
|
]
|
|
39
41
|
},
|
|
40
42
|
{
|
|
41
43
|
method: "POST",
|
|
42
44
|
path: "/workspace/{workspace_id}/request_history/search",
|
|
43
|
-
tool_name: "
|
|
45
|
+
tool_name: "searchApiRequestHistory",
|
|
44
46
|
description: "Search request history with advanced filters.",
|
|
45
47
|
parameters: [
|
|
46
48
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
@@ -53,14 +55,15 @@ export const historyDoc = {
|
|
|
53
55
|
status: { type: "array", description: "Filter by status codes (e.g., [200, 201])" },
|
|
54
56
|
verb: { type: "array", description: "Filter by HTTP methods (e.g., ['GET', 'POST'])" },
|
|
55
57
|
from_date: { type: "string", description: "Start date (ISO format)" },
|
|
56
|
-
to_date: { type: "string", description: "End date (ISO format)" }
|
|
58
|
+
to_date: { type: "string", description: "End date (ISO format)" },
|
|
59
|
+
include_output: { type: "boolean", description: "Include each request's output (response); the input is always returned" }
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
},
|
|
60
63
|
{
|
|
61
64
|
method: "GET",
|
|
62
65
|
path: "/workspace/{workspace_id}/function_history",
|
|
63
|
-
tool_name: "
|
|
66
|
+
tool_name: "getFunctionRequestHistory",
|
|
64
67
|
description: "Get function execution history.",
|
|
65
68
|
parameters: [
|
|
66
69
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -72,7 +75,7 @@ export const historyDoc = {
|
|
|
72
75
|
{
|
|
73
76
|
method: "GET",
|
|
74
77
|
path: "/workspace/{workspace_id}/task_history",
|
|
75
|
-
tool_name: "
|
|
78
|
+
tool_name: "getTaskRequestHistory",
|
|
76
79
|
description: "Get scheduled task execution history.",
|
|
77
80
|
parameters: [
|
|
78
81
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -84,7 +87,7 @@ export const historyDoc = {
|
|
|
84
87
|
{
|
|
85
88
|
method: "GET",
|
|
86
89
|
path: "/workspace/{workspace_id}/middleware_history",
|
|
87
|
-
tool_name: "
|
|
90
|
+
tool_name: "getMiddlewareRequestHistory",
|
|
88
91
|
description: "Get middleware execution history.",
|
|
89
92
|
parameters: [
|
|
90
93
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -96,7 +99,7 @@ export const historyDoc = {
|
|
|
96
99
|
{
|
|
97
100
|
method: "GET",
|
|
98
101
|
path: "/workspace/{workspace_id}/tool_history",
|
|
99
|
-
tool_name: "
|
|
102
|
+
tool_name: "getToolRequestHistory",
|
|
100
103
|
description: "Get agent tool execution history.",
|
|
101
104
|
parameters: [
|
|
102
105
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -105,10 +108,38 @@ export const historyDoc = {
|
|
|
105
108
|
{ name: "per_page", type: "integer", default: 50, description: "Items per page" }
|
|
106
109
|
]
|
|
107
110
|
},
|
|
111
|
+
{
|
|
112
|
+
method: "GET",
|
|
113
|
+
path: "/workspace/{workspace_id}/prompt_history",
|
|
114
|
+
tool_name: "getPromptRequestHistory",
|
|
115
|
+
description: "Get MCP prompt request history, newest first.",
|
|
116
|
+
parameters: [
|
|
117
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
118
|
+
{ name: "prompt_id", type: "integer", description: "Filter by MCP prompt ID" },
|
|
119
|
+
{ name: "branch", type: "string", description: "Filter by branch name" },
|
|
120
|
+
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
121
|
+
{ name: "per_page", type: "integer", default: 50, description: "Items per page (max 500)" },
|
|
122
|
+
{ name: "include_output", type: "boolean", default: false, description: "Include each request's output" }
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
method: "GET",
|
|
127
|
+
path: "/workspace/{workspace_id}/resource_history",
|
|
128
|
+
tool_name: "getResourceRequestHistory",
|
|
129
|
+
description: "Get MCP resource request history, newest first.",
|
|
130
|
+
parameters: [
|
|
131
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
132
|
+
{ name: "resource_id", type: "integer", description: "Filter by MCP resource ID" },
|
|
133
|
+
{ name: "branch", type: "string", description: "Filter by branch name" },
|
|
134
|
+
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
135
|
+
{ name: "per_page", type: "integer", default: 50, description: "Items per page (max 500)" },
|
|
136
|
+
{ name: "include_output", type: "boolean", default: false, description: "Include each request's output" }
|
|
137
|
+
]
|
|
138
|
+
},
|
|
108
139
|
{
|
|
109
140
|
method: "GET",
|
|
110
141
|
path: "/workspace/{workspace_id}/trigger_history",
|
|
111
|
-
tool_name: "
|
|
142
|
+
tool_name: "getTriggerRequestHistory",
|
|
112
143
|
description: "Get trigger execution history.",
|
|
113
144
|
parameters: [
|
|
114
145
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -145,5 +176,5 @@ export const historyDoc = {
|
|
|
145
176
|
}
|
|
146
177
|
}
|
|
147
178
|
},
|
|
148
|
-
related_topics: ["api", "function", "task"]
|
|
179
|
+
related_topics: ["api", "function", "task", "prompt", "resource"]
|
|
149
180
|
};
|
|
@@ -28,7 +28,7 @@ export const mcpServerDoc = {
|
|
|
28
28
|
{
|
|
29
29
|
method: "GET",
|
|
30
30
|
path: "/workspace/{workspace_id}/mcp_server",
|
|
31
|
-
tool_name: "
|
|
31
|
+
tool_name: "listMCPServers",
|
|
32
32
|
description: "List all MCP servers in a workspace.",
|
|
33
33
|
parameters: [
|
|
34
34
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -41,7 +41,7 @@ export const mcpServerDoc = {
|
|
|
41
41
|
{
|
|
42
42
|
method: "GET",
|
|
43
43
|
path: "/workspace/{workspace_id}/mcp_server/{mcp_server_id}",
|
|
44
|
-
tool_name: "
|
|
44
|
+
tool_name: "getMCPServer",
|
|
45
45
|
description: "Get details of a specific MCP server.",
|
|
46
46
|
parameters: [
|
|
47
47
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -52,7 +52,7 @@ export const mcpServerDoc = {
|
|
|
52
52
|
{
|
|
53
53
|
method: "POST",
|
|
54
54
|
path: "/workspace/{workspace_id}/mcp_server",
|
|
55
|
-
tool_name: "
|
|
55
|
+
tool_name: "createMCPServer",
|
|
56
56
|
description: "Create a new MCP server to expose tools.",
|
|
57
57
|
parameters: [
|
|
58
58
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
@@ -84,7 +84,7 @@ export const mcpServerDoc = {
|
|
|
84
84
|
{
|
|
85
85
|
method: "PUT",
|
|
86
86
|
path: "/workspace/{workspace_id}/mcp_server/{mcp_server_id}",
|
|
87
|
-
tool_name: "
|
|
87
|
+
tool_name: "updateMCPServer",
|
|
88
88
|
description: "Update an existing MCP server.",
|
|
89
89
|
parameters: [
|
|
90
90
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -102,7 +102,7 @@ export const mcpServerDoc = {
|
|
|
102
102
|
{
|
|
103
103
|
method: "DELETE",
|
|
104
104
|
path: "/workspace/{workspace_id}/mcp_server/{mcp_server_id}",
|
|
105
|
-
tool_name: "
|
|
105
|
+
tool_name: "deleteMCPServer",
|
|
106
106
|
description: "Delete an MCP server.",
|
|
107
107
|
parameters: [
|
|
108
108
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -112,7 +112,7 @@ export const mcpServerDoc = {
|
|
|
112
112
|
{
|
|
113
113
|
method: "GET",
|
|
114
114
|
path: "/mcp_server/documentation",
|
|
115
|
-
tool_name: "
|
|
115
|
+
tool_name: "documentation",
|
|
116
116
|
description: "Get MCP documentation for setup and syntax reference.",
|
|
117
117
|
parameters: [
|
|
118
118
|
{ name: "type", type: "string", enum: ["start", "api", "function", "task", "mcp", "agent", "tool", "fs-syntax", "table", "database"], description: "Documentation type to retrieve" }
|
|
@@ -26,7 +26,7 @@ export const middlewareDoc = {
|
|
|
26
26
|
{
|
|
27
27
|
method: "GET",
|
|
28
28
|
path: "/workspace/{workspace_id}/middleware",
|
|
29
|
-
tool_name: "
|
|
29
|
+
tool_name: "listmiddlewares",
|
|
30
30
|
description: "List all middleware in a workspace.",
|
|
31
31
|
parameters: [
|
|
32
32
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -26,7 +26,7 @@ export const tableDoc = {
|
|
|
26
26
|
{
|
|
27
27
|
method: "GET",
|
|
28
28
|
path: "/workspace/{workspace_id}/table",
|
|
29
|
-
tool_name: "
|
|
29
|
+
tool_name: "getTables",
|
|
30
30
|
description: "List all database tables in a workspace.",
|
|
31
31
|
parameters: [
|
|
32
32
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
@@ -53,7 +53,7 @@ export const tableDoc = {
|
|
|
53
53
|
{
|
|
54
54
|
method: "POST",
|
|
55
55
|
path: "/workspace/{workspace_id}/table",
|
|
56
|
-
tool_name: "
|
|
56
|
+
tool_name: "addTable",
|
|
57
57
|
description: "Create a new database table with optional schema.",
|
|
58
58
|
parameters: [
|
|
59
59
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
@@ -122,7 +122,7 @@ POST /workspace/1/agent
|
|
|
122
122
|
steps: [
|
|
123
123
|
"1. `POST /workspace/{id}/request_history/search` - Search for failed requests",
|
|
124
124
|
"2. Filter by status: [400, 401, 403, 404, 500]",
|
|
125
|
-
"3. Use
|
|
125
|
+
"3. Use include_output=true to see each request's output (the input is always returned)",
|
|
126
126
|
"4. `GET /workspace/{id}/apigroup/{id}/api/{id}?include_xanoscript=true` - Review endpoint code"
|
|
127
127
|
]
|
|
128
128
|
}
|
|
@@ -126,7 +126,7 @@ export const workspaceDoc = {
|
|
|
126
126
|
{
|
|
127
127
|
method: "GET",
|
|
128
128
|
path: "/workspace/{workspace_id}/openapi",
|
|
129
|
-
tool_name: "
|
|
129
|
+
tool_name: "getWorkspaceOpenApi",
|
|
130
130
|
description: "Get OpenAPI v3 specification for all APIs in the workspace.",
|
|
131
131
|
parameters: [
|
|
132
132
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
@@ -112,12 +112,13 @@ const SYNTAX_SUGGESTIONS = [
|
|
|
112
112
|
/**
|
|
113
113
|
* Enhance error message with helpful suggestions
|
|
114
114
|
*/
|
|
115
|
-
function enhanceErrorMessage(message, code, lineNumber) {
|
|
115
|
+
function enhanceErrorMessage(message, code, lineNumber, scheme) {
|
|
116
116
|
let enhanced = message;
|
|
117
117
|
const lines = code.split("\n");
|
|
118
118
|
const errorLine = lines[lineNumber] || "";
|
|
119
|
-
// Check for type aliases
|
|
120
|
-
|
|
119
|
+
// Check for type aliases, never in a policy: it declares no types, and a value such as
|
|
120
|
+
// object.naming's name_kind: "object" is not one.
|
|
121
|
+
for (const [alias, correct] of scheme === "policy" ? [] : Object.entries(TYPE_ALIASES)) {
|
|
121
122
|
const regex = new RegExp(`\\b${alias}\\b`, "i");
|
|
122
123
|
if (regex.test(errorLine)) {
|
|
123
124
|
enhanced += `\n\n💡 Suggestion: Use "${correct}" instead of "${alias}"`;
|
|
@@ -213,7 +214,7 @@ function validateCode(code, filePath) {
|
|
|
213
214
|
const endLines = text.substring(0, endOffset + 1).split("\n");
|
|
214
215
|
const endLine = endLines.length - 1;
|
|
215
216
|
const endCharacter = endLines[endLines.length - 1].length;
|
|
216
|
-
const enhancedMessage = enhanceErrorMessage(item.message, text, line);
|
|
217
|
+
const enhancedMessage = enhanceErrorMessage(item.message, text, line, scheme);
|
|
217
218
|
return {
|
|
218
219
|
severity,
|
|
219
220
|
range: {
|
|
@@ -451,11 +452,7 @@ export const validateXanoscriptToolSpec = defineTool({
|
|
|
451
452
|
"- file_paths: Array of file paths for batch validation\n" +
|
|
452
453
|
"- directory: Validate all .xs files in a directory\n\n" +
|
|
453
454
|
"Returns errors with line/column positions and helpful suggestions for common mistakes. " +
|
|
454
|
-
"The language server auto-detects the object type from the code syntax.
|
|
455
|
-
"Policy documents (policies/*.xs) are validated too: their syntax and block shape are errors, " +
|
|
456
|
-
"and what the check catalogue decides (an unknown check, field or param, a value outside its set) " +
|
|
457
|
-
"is a warning against the catalogue the language server ships with. The instance decides on save; " +
|
|
458
|
-
"format and check a policy against its branch with xano_parse_policy or `xano policy parse --file <path>`.",
|
|
455
|
+
"The language server auto-detects the object type from the code syntax.",
|
|
459
456
|
annotations: {
|
|
460
457
|
readOnlyHint: true,
|
|
461
458
|
destructiveHint: false,
|
package/dist/xanoscript.js
CHANGED
|
@@ -341,7 +341,6 @@ export function readXanoscriptDocsV2(docsPath, args) {
|
|
|
341
341
|
`- file_path='api/users/create.xs' — auto-select the docs for the file you're editing`,
|
|
342
342
|
`- filter='round' — one expression filter's signature and example (comma-separate for several, e.g. filter='to_upper,split')`,
|
|
343
343
|
`- tier='survival' (~${tiers.survival.tokens}) or tier='working' (~${tiers.working.tokens}) for context-limited models`,
|
|
344
|
-
`- topic='policies' — when the workspace has a policies/ folder: keep to its active mandatory policies while changing code, and evaluate after`,
|
|
345
344
|
`- mode='quick_reference' — compact output when you only need a reminder`,
|
|
346
345
|
`- max_tokens=4000 with file_path= — stop loading once the budget is reached`,
|
|
347
346
|
`- exclude_topics=['syntax'] with file_path= — skip topics you've already loaded`,
|