@xano/developer-mcp 1.0.74 → 2.0.0-beta.0
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 +104 -37
- package/dist/cli_docs/index.d.ts +13 -37
- package/dist/cli_docs/index.js +28 -39
- package/dist/cli_docs/topics/integration.js +1 -1
- package/dist/cli_docs/topics/workspace.js +1 -1
- package/dist/index.js +58 -55
- package/dist/lib.d.ts +3 -1
- package/dist/lib.js +1 -1
- package/dist/meta_api_docs/format.js +1 -1
- package/dist/meta_api_docs/index.d.ts +14 -42
- package/dist/meta_api_docs/index.js +34 -46
- package/dist/tools/cli_docs.d.ts +2 -3
- package/dist/tools/cli_docs.js +3 -5
- package/dist/tools/define_tool.d.ts +47 -0
- package/dist/tools/define_tool.js +36 -0
- package/dist/tools/index.d.ts +88 -221
- package/dist/tools/index.js +80 -109
- package/dist/tools/mcp_version.d.ts +4 -25
- package/dist/tools/mcp_version.js +12 -19
- package/dist/tools/meta_api_docs.d.ts +2 -3
- package/dist/tools/meta_api_docs.js +3 -5
- package/dist/tools/validate_xanoscript.d.ts +18 -65
- package/dist/tools/validate_xanoscript.js +56 -54
- package/dist/tools/xanoscript_docs.d.ts +25 -74
- package/dist/tools/xanoscript_docs.js +86 -83
- package/dist/xanoscript_docs/README.md +5 -5
- package/dist/xanoscript_docs/addons.md +1 -3
- package/dist/xanoscript_docs/apis.md +2 -2
- package/dist/xanoscript_docs/database.md +1 -1
- package/dist/xanoscript_docs/essentials.md +6 -6
- package/dist/xanoscript_docs/functions.md +3 -3
- package/dist/xanoscript_docs/integrations.md +5 -5
- package/dist/xanoscript_docs/middleware.md +1 -1
- package/dist/xanoscript_docs/performance.md +4 -4
- package/dist/xanoscript_docs/realtime.md +2 -2
- package/dist/xanoscript_docs/security.md +3 -6
- package/dist/xanoscript_docs/survival.md +1 -1
- package/dist/xanoscript_docs/syntax/string-filters.md +1 -1
- package/dist/xanoscript_docs/syntax.md +10 -12
- package/dist/xanoscript_docs/tasks.md +1 -2
- package/dist/xanoscript_docs/tools.md +3 -5
- package/dist/xanoscript_docs/types.md +2 -2
- package/dist/xanoscript_docs/unit-testing.md +1 -1
- package/dist/xanoscript_docs/workflow-tests.md +1 -1
- package/dist/xanoscript_docs/working.md +4 -4
- package/package.json +5 -4
- package/dist/api_docs/format.d.ts +0 -5
- package/dist/api_docs/format.js +0 -171
- package/dist/api_docs/index.d.ts +0 -52
- package/dist/api_docs/index.js +0 -111
- package/dist/api_docs/topics/agent.d.ts +0 -2
- package/dist/api_docs/topics/agent.js +0 -142
- package/dist/api_docs/topics/api.d.ts +0 -2
- package/dist/api_docs/topics/api.js +0 -176
- package/dist/api_docs/topics/apigroup.d.ts +0 -2
- package/dist/api_docs/topics/apigroup.js +0 -124
- package/dist/api_docs/topics/authentication.d.ts +0 -2
- package/dist/api_docs/topics/authentication.js +0 -61
- package/dist/api_docs/topics/branch.d.ts +0 -2
- package/dist/api_docs/topics/branch.js +0 -73
- package/dist/api_docs/topics/file.d.ts +0 -2
- package/dist/api_docs/topics/file.js +0 -70
- package/dist/api_docs/topics/function.d.ts +0 -2
- package/dist/api_docs/topics/function.js +0 -164
- package/dist/api_docs/topics/history.d.ts +0 -2
- package/dist/api_docs/topics/history.js +0 -149
- package/dist/api_docs/topics/mcp_server.d.ts +0 -2
- package/dist/api_docs/topics/mcp_server.js +0 -139
- package/dist/api_docs/topics/middleware.d.ts +0 -2
- package/dist/api_docs/topics/middleware.js +0 -156
- package/dist/api_docs/topics/realtime.d.ts +0 -2
- package/dist/api_docs/topics/realtime.js +0 -112
- package/dist/api_docs/topics/start.d.ts +0 -2
- package/dist/api_docs/topics/start.js +0 -107
- package/dist/api_docs/topics/table.d.ts +0 -2
- package/dist/api_docs/topics/table.js +0 -195
- package/dist/api_docs/topics/task.d.ts +0 -2
- package/dist/api_docs/topics/task.js +0 -165
- package/dist/api_docs/topics/tool.d.ts +0 -2
- package/dist/api_docs/topics/tool.js +0 -150
- package/dist/api_docs/topics/workflows.d.ts +0 -2
- package/dist/api_docs/topics/workflows.js +0 -131
- package/dist/api_docs/topics/workspace.d.ts +0 -2
- package/dist/api_docs/topics/workspace.js +0 -153
- package/dist/api_docs/types.d.ts +0 -79
- package/dist/api_docs/types.js +0 -4
- package/dist/cli_docs/topics/run.d.ts +0 -2
- package/dist/cli_docs/topics/run.js +0 -248
- package/dist/meta_api_docs/format.test.d.ts +0 -1
- package/dist/meta_api_docs/format.test.js +0 -272
- package/dist/meta_api_docs/index.test.d.ts +0 -1
- package/dist/meta_api_docs/index.test.js +0 -128
- package/dist/meta_api_docs/types.test.d.ts +0 -1
- package/dist/meta_api_docs/types.test.js +0 -132
- package/dist/templates/init-workspace.d.ts +0 -10
- package/dist/templates/init-workspace.js +0 -278
- package/dist/templates/xanoscript-index.d.ts +0 -11
- package/dist/templates/xanoscript-index.js +0 -72
- package/dist/tools/index.test.d.ts +0 -1
- package/dist/tools/index.test.js +0 -179
- package/dist/tools/xanoscript_docs.test.d.ts +0 -1
- package/dist/tools/xanoscript_docs.test.js +0 -197
- package/dist/xanoscript.test.d.ts +0 -1
- package/dist/xanoscript.test.js +0 -421
- package/dist/xanoscript_docs/cheatsheet.md +0 -287
- package/dist/xanoscript_docs/ephemeral.md +0 -330
- package/dist/xanoscript_docs/quickstart.md +0 -692
- package/dist/xanoscript_docs/run.md +0 -196
- package/dist/xanoscript_docs/schema.md +0 -300
- package/dist/xanoscript_docs_auto/README.md +0 -119
- package/dist/xanoscript_docs_auto/agents.md +0 -446
- package/dist/xanoscript_docs_auto/apis.md +0 -517
- package/dist/xanoscript_docs_auto/control-flow.md +0 -543
- package/dist/xanoscript_docs_auto/database.md +0 -551
- package/dist/xanoscript_docs_auto/debugging.md +0 -527
- package/dist/xanoscript_docs_auto/filters.md +0 -464
- package/dist/xanoscript_docs_auto/functions.md +0 -431
- package/dist/xanoscript_docs_auto/integrations.md +0 -657
- package/dist/xanoscript_docs_auto/mcp-servers.md +0 -408
- package/dist/xanoscript_docs_auto/operators.md +0 -368
- package/dist/xanoscript_docs_auto/syntax.md +0 -287
- package/dist/xanoscript_docs_auto/tables.md +0 -447
- package/dist/xanoscript_docs_auto/tasks.md +0 -479
- package/dist/xanoscript_docs_auto/testing.md +0 -574
- package/dist/xanoscript_docs_auto/tools.md +0 -485
- package/dist/xanoscript_docs_auto/triggers.md +0 -595
- package/dist/xanoscript_docs_auto/types.md +0 -323
- package/dist/xanoscript_docs_auto/variables.md +0 -462
- package/dist/xanoscript_docs_auto/version.json +0 -5
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
export const taskDoc = {
|
|
2
|
-
topic: "task",
|
|
3
|
-
title: "Scheduled Task Management",
|
|
4
|
-
description: `Tasks are scheduled jobs that run automatically based on a cron schedule. They're used for background processing, periodic data sync, automated maintenance, and more.
|
|
5
|
-
|
|
6
|
-
## Key Concepts
|
|
7
|
-
- Tasks run on a schedule (cron syntax)
|
|
8
|
-
- No HTTP trigger - runs automatically
|
|
9
|
-
- Can access databases, call functions, make external requests
|
|
10
|
-
- Support draft/publish workflow
|
|
11
|
-
- Restricted to paid accounts
|
|
12
|
-
|
|
13
|
-
## Common Use Cases
|
|
14
|
-
- Data cleanup and archiving
|
|
15
|
-
- Report generation
|
|
16
|
-
- External API sync
|
|
17
|
-
- Notification sending
|
|
18
|
-
- Cache warming`,
|
|
19
|
-
ai_hints: `- Tasks require paid account (will fail on free tier)
|
|
20
|
-
- Use cron syntax for scheduling (e.g., "0 * * * *" for hourly)
|
|
21
|
-
- Tasks have no HTTP inputs - all data comes from database or environment
|
|
22
|
-
- Draft changes won't affect running schedule until published
|
|
23
|
-
- Check task history to debug execution issues`,
|
|
24
|
-
endpoints: [
|
|
25
|
-
{
|
|
26
|
-
method: "GET",
|
|
27
|
-
path: "/workspace/{workspace_id}/task",
|
|
28
|
-
tool_name: "listTasks",
|
|
29
|
-
description: "List all scheduled tasks in a workspace.",
|
|
30
|
-
parameters: [
|
|
31
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
32
|
-
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
33
|
-
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
34
|
-
{ name: "search", type: "string", description: "Search by task name" },
|
|
35
|
-
{ name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
|
|
36
|
-
{ name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" },
|
|
37
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
|
|
38
|
-
{ name: "include_draft", type: "boolean", default: false, description: "Include draft versions" },
|
|
39
|
-
{ name: "branch", type: "string", description: "Filter by branch name" }
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
method: "GET",
|
|
44
|
-
path: "/workspace/{workspace_id}/task/{task_id}",
|
|
45
|
-
tool_name: "getTask",
|
|
46
|
-
description: "Get details of a specific scheduled task.",
|
|
47
|
-
parameters: [
|
|
48
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
49
|
-
{ name: "task_id", type: "integer", required: true, in: "path", description: "Task ID" },
|
|
50
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
|
|
51
|
-
{ name: "include_draft", type: "boolean", default: false, description: "Include draft version" }
|
|
52
|
-
]
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
method: "POST",
|
|
56
|
-
path: "/workspace/{workspace_id}/task",
|
|
57
|
-
tool_name: "createTask",
|
|
58
|
-
description: "Create a new scheduled task. Requires paid account.",
|
|
59
|
-
parameters: [
|
|
60
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
61
|
-
],
|
|
62
|
-
request_body: {
|
|
63
|
-
type: "application/json",
|
|
64
|
-
properties: {
|
|
65
|
-
name: { type: "string", description: "Task name", required: true },
|
|
66
|
-
description: { type: "string", description: "Task description" },
|
|
67
|
-
schedule: { type: "string", description: "Cron expression (e.g., '0 * * * *' for hourly)", required: true },
|
|
68
|
-
active: { type: "boolean", description: "Whether task is active", required: true },
|
|
69
|
-
xanoscript: { type: "string", description: "XanoScript task definition", required: true }
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
example: {
|
|
73
|
-
method: "POST",
|
|
74
|
-
path: "/workspace/1/task",
|
|
75
|
-
body: {
|
|
76
|
-
name: "cleanup_old_sessions",
|
|
77
|
-
description: "Delete sessions older than 30 days",
|
|
78
|
-
schedule: "0 3 * * *",
|
|
79
|
-
active: true,
|
|
80
|
-
xanoscript: `task cleanup_old_sessions {
|
|
81
|
-
stack {
|
|
82
|
-
var $cutoff {
|
|
83
|
-
value = now() - 30.days
|
|
84
|
-
}
|
|
85
|
-
db.sessions.query()
|
|
86
|
-
.where("created_at", "<", $cutoff)
|
|
87
|
-
.delete()
|
|
88
|
-
}
|
|
89
|
-
}`
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
method: "PUT",
|
|
95
|
-
path: "/workspace/{workspace_id}/task/{task_id}",
|
|
96
|
-
tool_name: "updateTask",
|
|
97
|
-
description: "Update an existing scheduled task.",
|
|
98
|
-
parameters: [
|
|
99
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
100
|
-
{ name: "task_id", type: "integer", required: true, in: "path", description: "Task ID" },
|
|
101
|
-
{ name: "publish", type: "boolean", default: true, description: "Publish changes immediately" }
|
|
102
|
-
],
|
|
103
|
-
request_body: {
|
|
104
|
-
type: "application/json",
|
|
105
|
-
properties: {
|
|
106
|
-
name: { type: "string", description: "Task name" },
|
|
107
|
-
description: { type: "string", description: "Task description" },
|
|
108
|
-
schedule: { type: "string", description: "Cron expression" },
|
|
109
|
-
active: { type: "boolean", description: "Whether task is active" },
|
|
110
|
-
xanoscript: { type: "string", description: "XanoScript task definition" }
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
method: "DELETE",
|
|
116
|
-
path: "/workspace/{workspace_id}/task/{task_id}",
|
|
117
|
-
tool_name: "deleteTask",
|
|
118
|
-
description: "Delete a scheduled task.",
|
|
119
|
-
parameters: [
|
|
120
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
121
|
-
{ name: "task_id", type: "integer", required: true, in: "path", description: "Task ID" }
|
|
122
|
-
]
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
method: "PUT",
|
|
126
|
-
path: "/workspace/{workspace_id}/task/{task_id}/security",
|
|
127
|
-
tool_name: "updateTaskSecurity",
|
|
128
|
-
description: "Update security settings for the task.",
|
|
129
|
-
parameters: [
|
|
130
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
131
|
-
{ name: "task_id", type: "integer", required: true, in: "path", description: "Task ID" }
|
|
132
|
-
],
|
|
133
|
-
request_body: {
|
|
134
|
-
type: "application/json",
|
|
135
|
-
properties: {
|
|
136
|
-
guid: { type: "string", description: "Security group GUID" }
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
schemas: {
|
|
142
|
-
Task: {
|
|
143
|
-
type: "object",
|
|
144
|
-
properties: {
|
|
145
|
-
id: { type: "integer" },
|
|
146
|
-
name: { type: "string" },
|
|
147
|
-
description: { type: "string" },
|
|
148
|
-
schedule: { type: "string", description: "Cron expression" },
|
|
149
|
-
active: { type: "boolean" },
|
|
150
|
-
xanoscript: { type: "string" },
|
|
151
|
-
created_at: { type: "string", format: "date-time" },
|
|
152
|
-
updated_at: { type: "string", format: "date-time" }
|
|
153
|
-
}
|
|
154
|
-
},
|
|
155
|
-
CronExamples: {
|
|
156
|
-
"every_minute": "* * * * *",
|
|
157
|
-
"every_hour": "0 * * * *",
|
|
158
|
-
"every_day_midnight": "0 0 * * *",
|
|
159
|
-
"every_day_3am": "0 3 * * *",
|
|
160
|
-
"every_monday": "0 0 * * 1",
|
|
161
|
-
"first_of_month": "0 0 1 * *"
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
related_topics: ["function", "history"]
|
|
165
|
-
};
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
export const toolDoc = {
|
|
2
|
-
topic: "tool",
|
|
3
|
-
title: "Agent Tool Management",
|
|
4
|
-
description: `Tools are callable functions that AI agents can use to perform actions. They define inputs, outputs, and the logic to execute.
|
|
5
|
-
|
|
6
|
-
## Key Concepts
|
|
7
|
-
- Tools are used by agents to interact with data and external systems
|
|
8
|
-
- Each tool has defined inputs and outputs
|
|
9
|
-
- Tools contain XanoScript logic
|
|
10
|
-
- Can be shared across multiple agents
|
|
11
|
-
- Support draft/publish workflow
|
|
12
|
-
|
|
13
|
-
## Tool Design Best Practices
|
|
14
|
-
- Clear, descriptive names (e.g., "lookup_customer", "send_email")
|
|
15
|
-
- Well-defined input schemas
|
|
16
|
-
- Specific, focused functionality
|
|
17
|
-
- Good error handling`,
|
|
18
|
-
ai_hints: `- Create tools before creating agents that use them
|
|
19
|
-
- Tool names should be descriptive verbs (lookup, create, update, send)
|
|
20
|
-
- Keep tools focused on single responsibilities
|
|
21
|
-
- Use \`include_xanoscript=true\` to see tool implementation
|
|
22
|
-
- Tools can call other functions for code reuse`,
|
|
23
|
-
endpoints: [
|
|
24
|
-
{
|
|
25
|
-
method: "GET",
|
|
26
|
-
path: "/workspace/{workspace_id}/tool",
|
|
27
|
-
tool_name: "listTools",
|
|
28
|
-
description: "List all tools in a workspace.",
|
|
29
|
-
parameters: [
|
|
30
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
31
|
-
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
32
|
-
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
33
|
-
{ name: "search", type: "string", description: "Search by tool name" },
|
|
34
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
|
|
35
|
-
{ name: "include_draft", type: "boolean", default: false, description: "Include draft versions" }
|
|
36
|
-
]
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
method: "GET",
|
|
40
|
-
path: "/workspace/{workspace_id}/tool/{tool_id}",
|
|
41
|
-
tool_name: "getTool",
|
|
42
|
-
description: "Get details of a specific tool.",
|
|
43
|
-
parameters: [
|
|
44
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
45
|
-
{ name: "tool_id", type: "integer", required: true, in: "path", description: "Tool ID" },
|
|
46
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript code" },
|
|
47
|
-
{ name: "include_draft", type: "boolean", default: false, description: "Include draft version" }
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
method: "POST",
|
|
52
|
-
path: "/workspace/{workspace_id}/tool",
|
|
53
|
-
tool_name: "createTool",
|
|
54
|
-
description: "Create a new tool for agents to use.",
|
|
55
|
-
parameters: [
|
|
56
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
57
|
-
],
|
|
58
|
-
request_body: {
|
|
59
|
-
type: "application/json",
|
|
60
|
-
properties: {
|
|
61
|
-
name: { type: "string", description: "Tool name", required: true },
|
|
62
|
-
description: { type: "string", description: "Tool description (shown to AI)" },
|
|
63
|
-
xanoscript: { type: "string", description: "XanoScript tool definition", required: true }
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
example: {
|
|
67
|
-
method: "POST",
|
|
68
|
-
path: "/workspace/1/tool",
|
|
69
|
-
body: {
|
|
70
|
-
name: "lookup_order",
|
|
71
|
-
description: "Look up an order by order ID or customer email",
|
|
72
|
-
xanoscript: `tool lookup_order {
|
|
73
|
-
input {
|
|
74
|
-
int order_id?
|
|
75
|
-
text email?
|
|
76
|
-
}
|
|
77
|
-
stack {
|
|
78
|
-
var $order {
|
|
79
|
-
value = db.orders.query()
|
|
80
|
-
.where("id", "=", $input.order_id)
|
|
81
|
-
.or("customer_email", "=", $input.email)
|
|
82
|
-
.first()
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
response = $order
|
|
86
|
-
}`
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
method: "PUT",
|
|
92
|
-
path: "/workspace/{workspace_id}/tool/{tool_id}",
|
|
93
|
-
tool_name: "updateTool",
|
|
94
|
-
description: "Update an existing tool.",
|
|
95
|
-
parameters: [
|
|
96
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
97
|
-
{ name: "tool_id", type: "integer", required: true, in: "path", description: "Tool ID" },
|
|
98
|
-
{ name: "publish", type: "boolean", default: true, description: "Publish changes immediately" }
|
|
99
|
-
],
|
|
100
|
-
request_body: {
|
|
101
|
-
type: "application/json",
|
|
102
|
-
properties: {
|
|
103
|
-
name: { type: "string", description: "Tool name" },
|
|
104
|
-
description: { type: "string", description: "Tool description" },
|
|
105
|
-
xanoscript: { type: "string", description: "XanoScript tool definition" }
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
method: "DELETE",
|
|
111
|
-
path: "/workspace/{workspace_id}/tool/{tool_id}",
|
|
112
|
-
tool_name: "deleteTool",
|
|
113
|
-
description: "Delete a tool. Ensure no agents depend on it.",
|
|
114
|
-
parameters: [
|
|
115
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
116
|
-
{ name: "tool_id", type: "integer", required: true, in: "path", description: "Tool ID" }
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
method: "PUT",
|
|
121
|
-
path: "/workspace/{workspace_id}/tool/{tool_id}/security",
|
|
122
|
-
tool_name: "updateToolSecurity",
|
|
123
|
-
description: "Update security settings for the tool.",
|
|
124
|
-
parameters: [
|
|
125
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
126
|
-
{ name: "tool_id", type: "integer", required: true, in: "path", description: "Tool ID" }
|
|
127
|
-
],
|
|
128
|
-
request_body: {
|
|
129
|
-
type: "application/json",
|
|
130
|
-
properties: {
|
|
131
|
-
guid: { type: "string", description: "Security group GUID" }
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
],
|
|
136
|
-
schemas: {
|
|
137
|
-
Tool: {
|
|
138
|
-
type: "object",
|
|
139
|
-
properties: {
|
|
140
|
-
id: { type: "integer" },
|
|
141
|
-
name: { type: "string" },
|
|
142
|
-
description: { type: "string" },
|
|
143
|
-
xanoscript: { type: "string" },
|
|
144
|
-
created_at: { type: "string", format: "date-time" },
|
|
145
|
-
updated_at: { type: "string", format: "date-time" }
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
related_topics: ["agent", "mcp_server", "function"]
|
|
150
|
-
};
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
export const workflowsDoc = {
|
|
2
|
-
topic: "workflows",
|
|
3
|
-
title: "Common Workflows",
|
|
4
|
-
description: `Step-by-step guides for common multi-step tasks using the Xano Meta API.
|
|
5
|
-
|
|
6
|
-
## Quick Reference
|
|
7
|
-
- **Create API Endpoint**: workspace → apigroup → api
|
|
8
|
-
- **Create Database Table**: workspace → table → schema → index
|
|
9
|
-
- **Set Up AI Agent**: tool → agent → (optional) mcp_server
|
|
10
|
-
- **Deploy Changes**: draft → test → publish`,
|
|
11
|
-
ai_hints: `- Always start by listing existing resources
|
|
12
|
-
- Use workspace context to understand current state
|
|
13
|
-
- Create dependencies first (tables before APIs, tools before agents)
|
|
14
|
-
- Test in development branch before production
|
|
15
|
-
- Export backup before major changes`,
|
|
16
|
-
patterns: [
|
|
17
|
-
{
|
|
18
|
-
name: "Create a Complete REST API",
|
|
19
|
-
description: "Set up a table with CRUD endpoints",
|
|
20
|
-
steps: [
|
|
21
|
-
"1. `GET /workspace` - Find your workspace ID",
|
|
22
|
-
"2. `POST /workspace/{id}/table` - Create the database table",
|
|
23
|
-
"3. `POST /workspace/{id}/table/{id}/schema` - Add fields to the table",
|
|
24
|
-
"4. `POST /workspace/{id}/table/{id}/index` - Add indexes for query performance",
|
|
25
|
-
"5. `GET /workspace/{id}/apigroup` - Find or create an API group",
|
|
26
|
-
"6. `POST /workspace/{id}/apigroup/{id}/api` - Create GET (list) endpoint",
|
|
27
|
-
"7. `POST /workspace/{id}/apigroup/{id}/api` - Create GET (single) endpoint",
|
|
28
|
-
"8. `POST /workspace/{id}/apigroup/{id}/api` - Create POST endpoint",
|
|
29
|
-
"9. `POST /workspace/{id}/apigroup/{id}/api` - Create PUT endpoint",
|
|
30
|
-
"10. `POST /workspace/{id}/apigroup/{id}/api` - Create DELETE endpoint"
|
|
31
|
-
],
|
|
32
|
-
example: `// Example: Create users table and list endpoint
|
|
33
|
-
|
|
34
|
-
// 1. Create table
|
|
35
|
-
POST /workspace/1/table
|
|
36
|
-
{
|
|
37
|
-
"name": "users",
|
|
38
|
-
"xanoscript": "table users {\\n id int [pk, auto]\\n email text [unique]\\n name text\\n created_at timestamp [default:now]\\n}"
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
// 2. Create list endpoint
|
|
42
|
-
POST /workspace/1/apigroup/1/api
|
|
43
|
-
{
|
|
44
|
-
"name": "listUsers",
|
|
45
|
-
"path": "/users",
|
|
46
|
-
"verb": "GET",
|
|
47
|
-
"xanoscript": "query listUsers {\\n response = db.users.query().all()\\n}"
|
|
48
|
-
}`
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "Set Up an AI Agent with Tools",
|
|
52
|
-
description: "Create tools and an agent that uses them",
|
|
53
|
-
steps: [
|
|
54
|
-
"1. `GET /workspace` - Find your workspace ID",
|
|
55
|
-
"2. `POST /workspace/{id}/tool` - Create first tool",
|
|
56
|
-
"3. `POST /workspace/{id}/tool` - Create additional tools as needed",
|
|
57
|
-
"4. `POST /workspace/{id}/agent` - Create agent with tool references",
|
|
58
|
-
"5. `POST /workspace/{id}/mcp_server` (optional) - Expose via MCP"
|
|
59
|
-
],
|
|
60
|
-
example: `// 1. Create a lookup tool
|
|
61
|
-
POST /workspace/1/tool
|
|
62
|
-
{
|
|
63
|
-
"name": "lookup_customer",
|
|
64
|
-
"description": "Look up customer by email or ID",
|
|
65
|
-
"xanoscript": "tool lookup_customer {\\n input { text email? int id? }\\n response = db.customers.query().where('email', '=', $input.email).or('id', '=', $input.id).first()\\n}"
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// 2. Create agent
|
|
69
|
-
POST /workspace/1/agent
|
|
70
|
-
{
|
|
71
|
-
"name": "support_bot",
|
|
72
|
-
"xanoscript": "agent support_bot {\\n llm {\\n type = \\"anthropic\\"\\n model = \\"claude-4-sonnet-20250514\\"\\n system_prompt = \\"You help customers with their orders.\\"\\n }\\n tools = [lookup_customer]\\n}"
|
|
73
|
-
}`
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
name: "Deploy Function Changes Safely",
|
|
77
|
-
description: "Use draft/publish workflow for safe deployments",
|
|
78
|
-
steps: [
|
|
79
|
-
"1. `GET /workspace/{id}/function/{id}?include_xanoscript=true` - Get current function",
|
|
80
|
-
"2. `PUT /workspace/{id}/function/{id}?publish=false` - Save changes as draft",
|
|
81
|
-
"3. Test the draft version in development",
|
|
82
|
-
"4. `PUT /workspace/{id}/function/{id}?publish=true` - Publish to production"
|
|
83
|
-
]
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "Create a Scheduled Data Cleanup Task",
|
|
87
|
-
description: "Set up automated data maintenance",
|
|
88
|
-
steps: [
|
|
89
|
-
"1. `GET /workspace` - Find workspace ID",
|
|
90
|
-
"2. `POST /workspace/{id}/task` - Create the task with schedule",
|
|
91
|
-
"3. Monitor via `GET /workspace/{id}/task_history`"
|
|
92
|
-
],
|
|
93
|
-
example: `POST /workspace/1/task
|
|
94
|
-
{
|
|
95
|
-
"name": "cleanup_old_sessions",
|
|
96
|
-
"schedule": "0 3 * * *",
|
|
97
|
-
"active": true,
|
|
98
|
-
"xanoscript": "task cleanup_old_sessions {\\n stack {\\n db.sessions.query().where('created_at', '<', now() - 30.days).delete()\\n }\\n}"
|
|
99
|
-
}`
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
name: "Export and Import Workspace",
|
|
103
|
-
description: "Backup or migrate workspace data",
|
|
104
|
-
steps: [
|
|
105
|
-
"1. `POST /workspace/{id}/export` - Export complete workspace",
|
|
106
|
-
"2. Download the export file",
|
|
107
|
-
"3. `POST /workspace/{target_id}/import` - Import to target workspace"
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
name: "Add Authentication to API Group",
|
|
112
|
-
description: "Secure API endpoints with authentication",
|
|
113
|
-
steps: [
|
|
114
|
-
"1. `GET /workspace/{id}/apigroup/{id}` - Get API group details",
|
|
115
|
-
"2. `PUT /workspace/{id}/apigroup/{id}/security` - Set security GUID",
|
|
116
|
-
"3. Individual endpoints inherit group security unless overridden"
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
name: "Debug a Failing API Endpoint",
|
|
121
|
-
description: "Use history to troubleshoot issues",
|
|
122
|
-
steps: [
|
|
123
|
-
"1. `POST /workspace/{id}/request_history/search` - Search for failed requests",
|
|
124
|
-
"2. Filter by status: [400, 401, 403, 404, 500]",
|
|
125
|
-
"3. Use include_payload=true to see request/response details",
|
|
126
|
-
"4. `GET /workspace/{id}/apigroup/{id}/api/{id}?include_xanoscript=true` - Review endpoint code"
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
],
|
|
130
|
-
related_topics: ["start", "api", "table", "function", "agent"]
|
|
131
|
-
};
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
export const workspaceDoc = {
|
|
2
|
-
topic: "workspace",
|
|
3
|
-
title: "Workspace Management",
|
|
4
|
-
description: `Workspaces are the top-level container for all Xano resources. Each workspace contains databases, APIs, functions, tasks, agents, and more.
|
|
5
|
-
|
|
6
|
-
## Key Operations
|
|
7
|
-
- List/get workspaces
|
|
8
|
-
- Export/import workspace data
|
|
9
|
-
- Generate workspace context for AI
|
|
10
|
-
- Get OpenAPI specifications
|
|
11
|
-
- Convert between XanoScript and JSON`,
|
|
12
|
-
ai_hints: `- Use \`getWorkspaceContext\` first to understand workspace structure
|
|
13
|
-
- Export before making major changes (backup)
|
|
14
|
-
- Check branch before modifying (prod vs dev)
|
|
15
|
-
- \`export-schema\` is lighter than \`export\` (schema only vs full data)
|
|
16
|
-
- OpenAPI spec useful for understanding available endpoints`,
|
|
17
|
-
endpoints: [
|
|
18
|
-
{
|
|
19
|
-
method: "GET",
|
|
20
|
-
path: "/workspace",
|
|
21
|
-
tool_name: "listWorkspaces",
|
|
22
|
-
description: "List all accessible workspaces with pagination and filtering.",
|
|
23
|
-
parameters: [
|
|
24
|
-
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
25
|
-
{ name: "per_page", type: "integer", default: 50, description: "Items per page (max 10000)" },
|
|
26
|
-
{ name: "search", type: "string", description: "Search by workspace name" },
|
|
27
|
-
{ name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
|
|
28
|
-
{ name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" }
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
method: "GET",
|
|
33
|
-
path: "/workspace/{workspace_id}",
|
|
34
|
-
tool_name: "getWorkspace",
|
|
35
|
-
description: "Get details of a specific workspace.",
|
|
36
|
-
parameters: [
|
|
37
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
method: "POST",
|
|
42
|
-
path: "/workspace/{workspace_id}/export-schema",
|
|
43
|
-
tool_name: "exportWorkspaceSchema",
|
|
44
|
-
description: "Export database schemas and branch configuration only (lighter than full export).",
|
|
45
|
-
parameters: [
|
|
46
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
47
|
-
{ name: "password", type: "string", description: "Optional encryption password" }
|
|
48
|
-
]
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
method: "POST",
|
|
52
|
-
path: "/workspace/{workspace_id}/export",
|
|
53
|
-
tool_name: "exportWorkspace",
|
|
54
|
-
description: "Export complete workspace data and configuration including APIs, functions, data.",
|
|
55
|
-
parameters: [
|
|
56
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
57
|
-
{ name: "password", type: "string", description: "Optional encryption password" }
|
|
58
|
-
]
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
method: "POST",
|
|
62
|
-
path: "/workspace/{workspace_id}/import",
|
|
63
|
-
tool_name: "importWorkspace",
|
|
64
|
-
description: "Import and restore workspace content from an export file.",
|
|
65
|
-
parameters: [
|
|
66
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
67
|
-
],
|
|
68
|
-
request_body: {
|
|
69
|
-
type: "multipart/form-data",
|
|
70
|
-
properties: {
|
|
71
|
-
file: { type: "file", description: "Export file to import", required: true },
|
|
72
|
-
password: { type: "string", description: "Decryption password if encrypted" }
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
{
|
|
77
|
-
method: "POST",
|
|
78
|
-
path: "/workspace/{workspace_id}/import-schema",
|
|
79
|
-
tool_name: "importWorkspaceSchema",
|
|
80
|
-
description: "Import database schema into a new branch.",
|
|
81
|
-
parameters: [
|
|
82
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
83
|
-
],
|
|
84
|
-
request_body: {
|
|
85
|
-
type: "multipart/form-data",
|
|
86
|
-
properties: {
|
|
87
|
-
file: { type: "file", description: "Schema export file", required: true },
|
|
88
|
-
password: { type: "string", description: "Decryption password if encrypted" }
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
method: "GET",
|
|
94
|
-
path: "/workspace/{workspace_id}/openapi",
|
|
95
|
-
tool_name: "getWorkspaceOpenAPI",
|
|
96
|
-
description: "Get OpenAPI v3 specification for all APIs in the workspace.",
|
|
97
|
-
parameters: [
|
|
98
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
method: "GET",
|
|
103
|
-
path: "/workspace/{workspace_id}/context",
|
|
104
|
-
tool_name: "getWorkspaceContext",
|
|
105
|
-
description: "Generate complete workspace context map for AI agents. Essential for understanding workspace structure.",
|
|
106
|
-
parameters: [
|
|
107
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
108
|
-
{ name: "format", type: "string", enum: ["json", "yaml"], default: "json", description: "Output format" },
|
|
109
|
-
{ name: "user_descriptions", type: "boolean", default: false, description: "Include user-provided descriptions" },
|
|
110
|
-
{ name: "ai_descriptions", type: "boolean", default: false, description: "Include AI-generated descriptions" }
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
method: "POST",
|
|
115
|
-
path: "/workspace/{workspace_id}/convert/fromXS",
|
|
116
|
-
tool_name: "convertFromXanoScript",
|
|
117
|
-
description: "Convert XanoScript code to JSON format for programmatic manipulation.",
|
|
118
|
-
parameters: [
|
|
119
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
120
|
-
],
|
|
121
|
-
request_body: {
|
|
122
|
-
type: "text/x-xanoscript",
|
|
123
|
-
description: "XanoScript code to convert"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
method: "POST",
|
|
128
|
-
path: "/workspace/{workspace_id}/convert/toXS",
|
|
129
|
-
tool_name: "convertToXanoScript",
|
|
130
|
-
description: "Convert JSON to XanoScript format for human-readable code.",
|
|
131
|
-
parameters: [
|
|
132
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
133
|
-
],
|
|
134
|
-
request_body: {
|
|
135
|
-
type: "application/json",
|
|
136
|
-
description: "JSON structure to convert to XanoScript"
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
],
|
|
140
|
-
schemas: {
|
|
141
|
-
Workspace: {
|
|
142
|
-
type: "object",
|
|
143
|
-
properties: {
|
|
144
|
-
id: { type: "integer", description: "Unique workspace ID" },
|
|
145
|
-
name: { type: "string", description: "Workspace name" },
|
|
146
|
-
description: { type: "string", description: "Workspace description" },
|
|
147
|
-
created_at: { type: "string", format: "date-time" },
|
|
148
|
-
updated_at: { type: "string", format: "date-time" }
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
related_topics: ["apigroup", "table", "function", "branch"]
|
|
153
|
-
};
|