@xano/developer-mcp 1.0.26 → 1.0.27
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/dist/xanoscript_docs/README.md +78 -64
- package/dist/xanoscript_docs/apis.md +81 -27
- package/dist/xanoscript_docs/branch.md +13 -13
- package/dist/xanoscript_docs/database.md +57 -17
- package/dist/xanoscript_docs/functions.md +43 -71
- package/dist/xanoscript_docs/performance.md +14 -23
- package/dist/xanoscript_docs/tables.md +47 -1
- package/dist/xanoscript_docs/tools.md +9 -7
- package/dist/xanoscript_docs/types.md +12 -10
- package/package.json +1 -1
- 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/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/xanoscript_docs/ephemeral.md +0 -330
- 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,112 +0,0 @@
|
|
|
1
|
-
export const realtimeDoc = {
|
|
2
|
-
topic: "realtime",
|
|
3
|
-
title: "Realtime Channel Management",
|
|
4
|
-
description: `Realtime channels enable WebSocket-based push notifications and live updates to connected clients.
|
|
5
|
-
|
|
6
|
-
## Key Concepts
|
|
7
|
-
- Channels are WebSocket endpoints for real-time communication
|
|
8
|
-
- Clients subscribe to channels to receive updates
|
|
9
|
-
- Server can publish messages to channels
|
|
10
|
-
- Triggers can respond to channel events
|
|
11
|
-
- Useful for chat, notifications, live updates
|
|
12
|
-
|
|
13
|
-
## Common Use Cases
|
|
14
|
-
- Live chat applications
|
|
15
|
-
- Real-time notifications
|
|
16
|
-
- Live dashboards
|
|
17
|
-
- Collaborative editing
|
|
18
|
-
- Push updates to mobile apps`,
|
|
19
|
-
ai_hints: `- Create channels for different message types (chat, notifications, etc.)
|
|
20
|
-
- Use triggers to respond to channel events (subscribe, message, etc.)
|
|
21
|
-
- Channels require authenticated connections for security
|
|
22
|
-
- Consider rate limiting for high-traffic channels
|
|
23
|
-
- Test with WebSocket clients before production`,
|
|
24
|
-
endpoints: [
|
|
25
|
-
{
|
|
26
|
-
method: "GET",
|
|
27
|
-
path: "/workspace/{workspace_id}/realtime/channel",
|
|
28
|
-
tool_name: "listRealtimeChannels",
|
|
29
|
-
description: "List all realtime channels 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 channel name" }
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
method: "GET",
|
|
39
|
-
path: "/workspace/{workspace_id}/realtime/channel/{channel_id}",
|
|
40
|
-
tool_name: "getRealtimeChannel",
|
|
41
|
-
description: "Get details of a specific realtime channel.",
|
|
42
|
-
parameters: [
|
|
43
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
44
|
-
{ name: "channel_id", type: "integer", required: true, in: "path", description: "Channel ID" }
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
method: "POST",
|
|
49
|
-
path: "/workspace/{workspace_id}/realtime/channel",
|
|
50
|
-
tool_name: "createRealtimeChannel",
|
|
51
|
-
description: "Create a new realtime channel.",
|
|
52
|
-
parameters: [
|
|
53
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
54
|
-
],
|
|
55
|
-
request_body: {
|
|
56
|
-
type: "application/json",
|
|
57
|
-
properties: {
|
|
58
|
-
name: { type: "string", description: "Channel name", required: true },
|
|
59
|
-
description: { type: "string", description: "Channel description" }
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
example: {
|
|
63
|
-
method: "POST",
|
|
64
|
-
path: "/workspace/1/realtime/channel",
|
|
65
|
-
body: {
|
|
66
|
-
name: "notifications",
|
|
67
|
-
description: "User notification channel"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
method: "PUT",
|
|
73
|
-
path: "/workspace/{workspace_id}/realtime/channel/{channel_id}",
|
|
74
|
-
tool_name: "updateRealtimeChannel",
|
|
75
|
-
description: "Update an existing realtime channel.",
|
|
76
|
-
parameters: [
|
|
77
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
78
|
-
{ name: "channel_id", type: "integer", required: true, in: "path", description: "Channel ID" }
|
|
79
|
-
],
|
|
80
|
-
request_body: {
|
|
81
|
-
type: "application/json",
|
|
82
|
-
properties: {
|
|
83
|
-
name: { type: "string", description: "Channel name" },
|
|
84
|
-
description: { type: "string", description: "Channel description" }
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
method: "DELETE",
|
|
90
|
-
path: "/workspace/{workspace_id}/realtime/channel/{channel_id}",
|
|
91
|
-
tool_name: "deleteRealtimeChannel",
|
|
92
|
-
description: "Delete a realtime channel.",
|
|
93
|
-
parameters: [
|
|
94
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
95
|
-
{ name: "channel_id", type: "integer", required: true, in: "path", description: "Channel ID" }
|
|
96
|
-
]
|
|
97
|
-
}
|
|
98
|
-
],
|
|
99
|
-
schemas: {
|
|
100
|
-
RealtimeChannel: {
|
|
101
|
-
type: "object",
|
|
102
|
-
properties: {
|
|
103
|
-
id: { type: "integer" },
|
|
104
|
-
name: { type: "string" },
|
|
105
|
-
description: { type: "string" },
|
|
106
|
-
created_at: { type: "string", format: "date-time" },
|
|
107
|
-
updated_at: { type: "string", format: "date-time" }
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
related_topics: ["api", "function"]
|
|
112
|
-
};
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
export const startDoc = {
|
|
2
|
-
topic: "start",
|
|
3
|
-
title: "Xano Meta API - Getting Started",
|
|
4
|
-
description: `The Xano Meta API provides programmatic access to manage your Xano instance. Use it to create, modify, and manage workspaces, databases, APIs, functions, scheduled tasks, AI agents, and more.
|
|
5
|
-
|
|
6
|
-
## Base URL
|
|
7
|
-
\`\`\`
|
|
8
|
-
https://<your-instance-subdomain>.xano.io/api:meta/<endpoint>
|
|
9
|
-
\`\`\`
|
|
10
|
-
|
|
11
|
-
**Example:** If your Xano instance is \`https://x8ki-letl-twmt.n7.xano.io\`, the full URL to list workspaces would be:
|
|
12
|
-
\`\`\`
|
|
13
|
-
https://x8ki-letl-twmt.n7.xano.io/api:meta/workspace
|
|
14
|
-
\`\`\`
|
|
15
|
-
|
|
16
|
-
Your instance URL can be found in the Xano dashboard URL or in your API endpoint URLs.
|
|
17
|
-
|
|
18
|
-
## Authentication
|
|
19
|
-
Include your Access Token in the Authorization header:
|
|
20
|
-
\`\`\`
|
|
21
|
-
Authorization: Bearer <your-access-token>
|
|
22
|
-
\`\`\`
|
|
23
|
-
|
|
24
|
-
Access tokens are created in the Xano dashboard under Settings > Access Tokens.
|
|
25
|
-
|
|
26
|
-
## Quick Start
|
|
27
|
-
1. **Get your workspaces:** \`GET /workspace\`
|
|
28
|
-
2. **List tables in a workspace:** \`GET /workspace/{id}/table\`
|
|
29
|
-
3. **Create an API endpoint:** \`POST /workspace/{id}/apigroup/{id}/api\`
|
|
30
|
-
|
|
31
|
-
## Resource Hierarchy
|
|
32
|
-
\`\`\`
|
|
33
|
-
workspace/
|
|
34
|
-
├── apigroup/ # API groups (REST endpoint collections)
|
|
35
|
-
│ └── api/ # Individual endpoints
|
|
36
|
-
├── table/ # Database tables
|
|
37
|
-
│ ├── schema/ # Table schema definitions
|
|
38
|
-
│ ├── index/ # Database indexes
|
|
39
|
-
│ └── trigger/ # Table triggers
|
|
40
|
-
├── function/ # Reusable functions
|
|
41
|
-
├── task/ # Scheduled tasks
|
|
42
|
-
├── agent/ # AI agents
|
|
43
|
-
│ └── trigger/ # Agent triggers
|
|
44
|
-
├── tool/ # Agent tools
|
|
45
|
-
├── mcp_server/ # MCP servers
|
|
46
|
-
│ └── trigger/ # MCP triggers
|
|
47
|
-
├── middleware/ # Request interceptors
|
|
48
|
-
├── realtime/ # WebSocket channels
|
|
49
|
-
│ └── trigger/ # Realtime triggers
|
|
50
|
-
├── branch/ # Environment branches
|
|
51
|
-
└── file/ # File storage
|
|
52
|
-
\`\`\`
|
|
53
|
-
|
|
54
|
-
## Common Parameters
|
|
55
|
-
Most list endpoints support:
|
|
56
|
-
- \`page\`: Page number (default: 1)
|
|
57
|
-
- \`per_page\`: Items per page (default: 50, max: 10000)
|
|
58
|
-
- \`search\`: Search by name
|
|
59
|
-
- \`sort\`: Sort field (usually: id, name, created_at)
|
|
60
|
-
- \`order\`: Sort direction (asc, desc)
|
|
61
|
-
- \`branch\`: Filter by branch name
|
|
62
|
-
|
|
63
|
-
## XanoScript Integration
|
|
64
|
-
Many endpoints accept XanoScript code for logic definition:
|
|
65
|
-
- Use \`include_xanoscript=true\` to get code in responses
|
|
66
|
-
- POST/PUT bodies can include XanoScript directly
|
|
67
|
-
- Use \`/convert/fromXS\` and \`/convert/toXS\` for format conversion`,
|
|
68
|
-
ai_hints: `- Start by calling \`GET /workspace\` to get workspace IDs
|
|
69
|
-
- Use \`GET /workspace/{id}/context\` to get a full workspace map for AI understanding
|
|
70
|
-
- Always check existing resources before creating new ones
|
|
71
|
-
- Use \`include_xanoscript=true\` to see implementation details
|
|
72
|
-
- Draft/publish workflow: changes are drafts until published`,
|
|
73
|
-
related_topics: ["authentication", "workspace", "workflows"],
|
|
74
|
-
examples: [
|
|
75
|
-
{
|
|
76
|
-
title: "List all workspaces",
|
|
77
|
-
description: "Get a list of all accessible workspaces",
|
|
78
|
-
request: {
|
|
79
|
-
method: "GET",
|
|
80
|
-
path: "/workspace",
|
|
81
|
-
headers: { "Authorization": "Bearer <token>" }
|
|
82
|
-
},
|
|
83
|
-
response: {
|
|
84
|
-
curPage: 1,
|
|
85
|
-
nextPage: null,
|
|
86
|
-
prevPage: null,
|
|
87
|
-
items: [
|
|
88
|
-
{ id: 1, name: "My App", description: "Production workspace" }
|
|
89
|
-
]
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
{
|
|
93
|
-
title: "Get workspace context for AI",
|
|
94
|
-
description: "Generate complete workspace context for AI agents",
|
|
95
|
-
request: {
|
|
96
|
-
method: "GET",
|
|
97
|
-
path: "/workspace/1/context?format=json",
|
|
98
|
-
headers: { "Authorization": "Bearer <token>" }
|
|
99
|
-
},
|
|
100
|
-
response: {
|
|
101
|
-
tables: ["users", "posts", "comments"],
|
|
102
|
-
api_groups: [{ name: "public", endpoints: 12 }],
|
|
103
|
-
functions: ["auth_check", "send_email"]
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
};
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
export const tableDoc = {
|
|
2
|
-
topic: "table",
|
|
3
|
-
title: "Database Table Management",
|
|
4
|
-
description: `Tables are the database layer in Xano. Each table has a schema (fields), indexes, and optional triggers.
|
|
5
|
-
|
|
6
|
-
## Key Concepts
|
|
7
|
-
- Tables store structured data with typed fields
|
|
8
|
-
- Schemas define field types, validation, and defaults
|
|
9
|
-
- Indexes improve query performance
|
|
10
|
-
- Triggers run automatically on data changes
|
|
11
|
-
- Tables can reference other tables (foreign keys)
|
|
12
|
-
|
|
13
|
-
## Field Types
|
|
14
|
-
- **Primitives:** int, text, bool, decimal, email, password
|
|
15
|
-
- **Temporal:** timestamp, date
|
|
16
|
-
- **Structured:** json, object
|
|
17
|
-
- **Files:** blob (with subtypes: image, video, audio, attachment)
|
|
18
|
-
- **References:** tableref, tablerefuuid (foreign keys)
|
|
19
|
-
- **Special:** enum, vector, geo_* (point, polygon, etc.)`,
|
|
20
|
-
ai_hints: `- Always check existing schema before adding fields
|
|
21
|
-
- Use \`tableref\` type for foreign keys to other tables
|
|
22
|
-
- Consider indexes for frequently queried fields
|
|
23
|
-
- Triggers run automatically - be careful with side effects
|
|
24
|
-
- Use \`include_xanoscript=true\` to see full table definition`,
|
|
25
|
-
endpoints: [
|
|
26
|
-
{
|
|
27
|
-
method: "GET",
|
|
28
|
-
path: "/workspace/{workspace_id}/table",
|
|
29
|
-
tool_name: "listTables",
|
|
30
|
-
description: "List all database tables in a workspace.",
|
|
31
|
-
parameters: [
|
|
32
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
33
|
-
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
34
|
-
{ name: "per_page", type: "integer", default: 50, description: "Items per page" },
|
|
35
|
-
{ name: "search", type: "string", description: "Search by table name" },
|
|
36
|
-
{ name: "sort", type: "string", enum: ["id", "name", "created_at"], default: "created_at", description: "Sort field" },
|
|
37
|
-
{ name: "order", type: "string", enum: ["asc", "desc"], default: "desc", description: "Sort direction" },
|
|
38
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript schema definition" },
|
|
39
|
-
{ name: "branch", type: "string", description: "Filter by branch name" }
|
|
40
|
-
]
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
method: "GET",
|
|
44
|
-
path: "/workspace/{workspace_id}/table/{table_id}",
|
|
45
|
-
tool_name: "getTable",
|
|
46
|
-
description: "Get details of a specific table including schema.",
|
|
47
|
-
parameters: [
|
|
48
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
49
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" },
|
|
50
|
-
{ name: "include_xanoscript", type: "boolean", default: false, description: "Include XanoScript definition" }
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
method: "POST",
|
|
55
|
-
path: "/workspace/{workspace_id}/table",
|
|
56
|
-
tool_name: "createTable",
|
|
57
|
-
description: "Create a new database table with optional schema.",
|
|
58
|
-
parameters: [
|
|
59
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
60
|
-
],
|
|
61
|
-
request_body: {
|
|
62
|
-
type: "application/json",
|
|
63
|
-
properties: {
|
|
64
|
-
name: { type: "string", description: "Table name", required: true },
|
|
65
|
-
description: { type: "string", description: "Table description" },
|
|
66
|
-
xanoscript: { type: "string", description: "XanoScript table definition with schema" }
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
example: {
|
|
70
|
-
method: "POST",
|
|
71
|
-
path: "/workspace/1/table",
|
|
72
|
-
body: {
|
|
73
|
-
name: "users",
|
|
74
|
-
xanoscript: `table users {
|
|
75
|
-
id int [pk, auto]
|
|
76
|
-
email text [unique]
|
|
77
|
-
name text
|
|
78
|
-
created_at timestamp [default:now]
|
|
79
|
-
}`
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
{
|
|
84
|
-
method: "PUT",
|
|
85
|
-
path: "/workspace/{workspace_id}/table/{table_id}",
|
|
86
|
-
tool_name: "updateTable",
|
|
87
|
-
description: "Update table definition and schema.",
|
|
88
|
-
parameters: [
|
|
89
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
90
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" }
|
|
91
|
-
],
|
|
92
|
-
request_body: {
|
|
93
|
-
type: "application/json",
|
|
94
|
-
properties: {
|
|
95
|
-
name: { type: "string", description: "Table name" },
|
|
96
|
-
description: { type: "string", description: "Table description" },
|
|
97
|
-
xanoscript: { type: "string", description: "Updated XanoScript definition" }
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
method: "DELETE",
|
|
103
|
-
path: "/workspace/{workspace_id}/table/{table_id}",
|
|
104
|
-
tool_name: "deleteTable",
|
|
105
|
-
description: "Delete a table and all its data. This action is irreversible.",
|
|
106
|
-
parameters: [
|
|
107
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
108
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" }
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
method: "POST",
|
|
113
|
-
path: "/workspace/{workspace_id}/table/{table_id}/schema",
|
|
114
|
-
tool_name: "addTableField",
|
|
115
|
-
description: "Add a new field to the table schema.",
|
|
116
|
-
parameters: [
|
|
117
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
118
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" }
|
|
119
|
-
],
|
|
120
|
-
request_body: {
|
|
121
|
-
type: "application/json",
|
|
122
|
-
properties: {
|
|
123
|
-
name: { type: "string", description: "Field name", required: true },
|
|
124
|
-
type: { type: "string", description: "Field type (int, text, bool, etc.)", required: true },
|
|
125
|
-
nullable: { type: "boolean", description: "Allow null values" },
|
|
126
|
-
default: { type: "any", description: "Default value" }
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
{
|
|
131
|
-
method: "POST",
|
|
132
|
-
path: "/workspace/{workspace_id}/table/{table_id}/index",
|
|
133
|
-
tool_name: "createTableIndex",
|
|
134
|
-
description: "Create an index on table fields for query performance.",
|
|
135
|
-
parameters: [
|
|
136
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
137
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" }
|
|
138
|
-
],
|
|
139
|
-
request_body: {
|
|
140
|
-
type: "application/json",
|
|
141
|
-
properties: {
|
|
142
|
-
name: { type: "string", description: "Index name", required: true },
|
|
143
|
-
type: { type: "string", description: "Index type: primary, unique, btree, search, spatial, vector", required: true },
|
|
144
|
-
fields: { type: "array", description: "Fields to index", required: true }
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
},
|
|
148
|
-
{
|
|
149
|
-
method: "GET",
|
|
150
|
-
path: "/workspace/{workspace_id}/table/{table_id}/content",
|
|
151
|
-
tool_name: "getTableContent",
|
|
152
|
-
description: "Get table content/data (paginated).",
|
|
153
|
-
parameters: [
|
|
154
|
-
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
155
|
-
{ name: "table_id", type: "integer", required: true, in: "path", description: "Table ID" },
|
|
156
|
-
{ name: "page", type: "integer", default: 1, description: "Page number" },
|
|
157
|
-
{ name: "per_page", type: "integer", default: 50, description: "Items per page" }
|
|
158
|
-
]
|
|
159
|
-
}
|
|
160
|
-
],
|
|
161
|
-
schemas: {
|
|
162
|
-
Table: {
|
|
163
|
-
type: "object",
|
|
164
|
-
properties: {
|
|
165
|
-
id: { type: "integer" },
|
|
166
|
-
name: { type: "string" },
|
|
167
|
-
description: { type: "string" },
|
|
168
|
-
schema: {
|
|
169
|
-
type: "array",
|
|
170
|
-
items: {
|
|
171
|
-
type: "object",
|
|
172
|
-
properties: {
|
|
173
|
-
name: { type: "string" },
|
|
174
|
-
type: { type: "string" },
|
|
175
|
-
nullable: { type: "boolean" },
|
|
176
|
-
default: { type: "any" }
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
indexes: { type: "array" },
|
|
181
|
-
created_at: { type: "string", format: "date-time" },
|
|
182
|
-
updated_at: { type: "string", format: "date-time" }
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
FieldTypes: {
|
|
186
|
-
primitives: ["int", "text", "bool", "decimal", "email", "password"],
|
|
187
|
-
temporal: ["timestamp", "date"],
|
|
188
|
-
structured: ["json", "object"],
|
|
189
|
-
files: ["blob", "image", "video", "audio", "attachment"],
|
|
190
|
-
references: ["tableref", "tablerefuuid"],
|
|
191
|
-
special: ["enum", "vector", "geo_point", "geo_polygon", "geo_linestring"]
|
|
192
|
-
}
|
|
193
|
-
},
|
|
194
|
-
related_topics: ["function", "api", "workflows"]
|
|
195
|
-
};
|
|
@@ -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
|
-
};
|