@xano/developer-mcp 1.0.28 → 1.0.29
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/meta_api_docs/topics/branch.js +154 -18
- package/package.json +1 -1
|
@@ -4,22 +4,23 @@ export const branchDoc = {
|
|
|
4
4
|
description: `Branches provide environment separation for your Xano workspace. Use branches for development, staging, and production environments.
|
|
5
5
|
|
|
6
6
|
## Key Concepts
|
|
7
|
-
- Default branch is "v1" (cannot be deleted)
|
|
7
|
+
- Default branch is "v1" (cannot be deleted or renamed)
|
|
8
8
|
- Branches contain separate databases and configurations
|
|
9
9
|
- One branch is designated as "live" (production)
|
|
10
|
+
- Create branches by cloning from existing branches
|
|
10
11
|
- Useful for safe development without affecting production
|
|
11
|
-
- Import schema to create new branches from exports
|
|
12
12
|
|
|
13
13
|
## Common Workflow
|
|
14
|
-
1. Create a development branch
|
|
15
|
-
2. Make and test changes on dev branch
|
|
16
|
-
3.
|
|
17
|
-
4.
|
|
14
|
+
1. Create a development branch by cloning from "v1"
|
|
15
|
+
2. Make and test changes on the dev branch
|
|
16
|
+
3. Set the dev branch as live when ready
|
|
17
|
+
4. Or merge changes back to production manually`,
|
|
18
18
|
ai_hints: `- Cannot delete the "v1" branch or the live branch
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
19
|
+
- Cannot update/rename the "v1" branch label
|
|
20
|
+
- Use "v1" as the source_branch when cloning from the default branch
|
|
21
|
+
- The "live" property indicates which branch is active for API requests
|
|
22
|
+
- "backup" property indicates if branch was created as a backup
|
|
23
|
+
- Always verify branch before making changes (dev vs prod)`,
|
|
23
24
|
endpoints: [
|
|
24
25
|
{
|
|
25
26
|
method: "GET",
|
|
@@ -30,11 +31,78 @@ export const branchDoc = {
|
|
|
30
31
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
31
32
|
]
|
|
32
33
|
},
|
|
34
|
+
{
|
|
35
|
+
method: "GET",
|
|
36
|
+
path: "/workspace/{workspace_id}/branch/{branch_label}",
|
|
37
|
+
tool_name: "getBranch",
|
|
38
|
+
description: "Retrieve details for a specific branch by label. Use 'v1' for the default branch.",
|
|
39
|
+
parameters: [
|
|
40
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
41
|
+
{ name: "branch_label", type: "string", required: true, in: "path", description: "Branch label (use 'v1' for default branch)" }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
method: "POST",
|
|
46
|
+
path: "/workspace/{workspace_id}/branch",
|
|
47
|
+
tool_name: "createBranch",
|
|
48
|
+
description: "Create a new branch by cloning from an existing branch. Use 'v1' as source_branch for the default branch.",
|
|
49
|
+
parameters: [
|
|
50
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" }
|
|
51
|
+
],
|
|
52
|
+
request_body: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
source_branch: { type: "string", description: "Label of the branch to clone from. Defaults to 'v1'", required: false },
|
|
56
|
+
label: { type: "string", description: "Label for the new branch", required: true },
|
|
57
|
+
description: { type: "string", description: "Description for the new branch", required: false },
|
|
58
|
+
color: { type: "string", description: "Color hex code for the branch (e.g., '#ebc346')", required: false }
|
|
59
|
+
},
|
|
60
|
+
example: {
|
|
61
|
+
source_branch: "v1",
|
|
62
|
+
label: "feature-branch",
|
|
63
|
+
description: "A new feature branch",
|
|
64
|
+
color: "#ebc346"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
method: "PUT",
|
|
70
|
+
path: "/workspace/{workspace_id}/branch/{branch_label}",
|
|
71
|
+
tool_name: "updateBranch",
|
|
72
|
+
description: "Update an existing branch's label, description, or color. Cannot update the default 'v1' branch label.",
|
|
73
|
+
parameters: [
|
|
74
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
75
|
+
{ name: "branch_label", type: "string", required: true, in: "path", description: "Current label of the branch to update" }
|
|
76
|
+
],
|
|
77
|
+
request_body: {
|
|
78
|
+
type: "object",
|
|
79
|
+
properties: {
|
|
80
|
+
label: { type: "string", description: "New label for the branch", required: false },
|
|
81
|
+
description: { type: "string", description: "New description for the branch", required: false },
|
|
82
|
+
color: { type: "string", description: "New color hex code for the branch", required: false }
|
|
83
|
+
},
|
|
84
|
+
example: {
|
|
85
|
+
label: "updated-branch",
|
|
86
|
+
description: "Updated description",
|
|
87
|
+
color: "#ff5733"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
method: "POST",
|
|
93
|
+
path: "/workspace/{workspace_id}/branch/{branch_label}/live",
|
|
94
|
+
tool_name: "setBranchLive",
|
|
95
|
+
description: "Set a branch as the live (active) branch for the workspace. The live branch is the default branch used for API requests.",
|
|
96
|
+
parameters: [
|
|
97
|
+
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
98
|
+
{ name: "branch_label", type: "string", required: true, in: "path", description: "Label of the branch to set as live (use 'v1' for default)" }
|
|
99
|
+
]
|
|
100
|
+
},
|
|
33
101
|
{
|
|
34
102
|
method: "DELETE",
|
|
35
103
|
path: "/workspace/{workspace_id}/branch/{branch_label}",
|
|
36
104
|
tool_name: "deleteBranch",
|
|
37
|
-
description: "Delete a branch. Cannot delete 'v1' or the live branch.",
|
|
105
|
+
description: "Delete a branch. Cannot delete the 'v1' branch or the currently live branch.",
|
|
38
106
|
parameters: [
|
|
39
107
|
{ name: "workspace_id", type: "integer", required: true, in: "path", description: "Workspace ID" },
|
|
40
108
|
{ name: "branch_label", type: "string", required: true, in: "path", description: "Branch label/name to delete" }
|
|
@@ -45,9 +113,10 @@ export const branchDoc = {
|
|
|
45
113
|
Branch: {
|
|
46
114
|
type: "object",
|
|
47
115
|
properties: {
|
|
116
|
+
created_at: { type: "string", format: "date-time", description: "When the branch was created" },
|
|
48
117
|
label: { type: "string", description: "Branch identifier (e.g., 'v1', 'dev')" },
|
|
49
|
-
|
|
50
|
-
|
|
118
|
+
backup: { type: "boolean", description: "Whether this branch was created as a backup" },
|
|
119
|
+
live: { type: "boolean", description: "Whether this is the live/production branch" }
|
|
51
120
|
}
|
|
52
121
|
}
|
|
53
122
|
},
|
|
@@ -60,12 +129,79 @@ export const branchDoc = {
|
|
|
60
129
|
path: "/workspace/1/branch",
|
|
61
130
|
headers: { "Authorization": "Bearer <token>" }
|
|
62
131
|
},
|
|
132
|
+
response: [
|
|
133
|
+
{ created_at: "2024-01-15T10:30:00Z", label: "v1", backup: false, live: true },
|
|
134
|
+
{ created_at: "2024-02-01T14:20:00Z", label: "dev", backup: false, live: false },
|
|
135
|
+
{ created_at: "2024-02-10T09:15:00Z", label: "staging", backup: false, live: false }
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
title: "Get a specific branch",
|
|
140
|
+
description: "Retrieve details for a single branch",
|
|
141
|
+
request: {
|
|
142
|
+
method: "GET",
|
|
143
|
+
path: "/workspace/1/branch/dev",
|
|
144
|
+
headers: { "Authorization": "Bearer <token>" }
|
|
145
|
+
},
|
|
146
|
+
response: {
|
|
147
|
+
created_at: "2024-02-01T14:20:00Z",
|
|
148
|
+
label: "dev",
|
|
149
|
+
backup: false,
|
|
150
|
+
live: false
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
title: "Create a new branch",
|
|
155
|
+
description: "Clone from v1 to create a development branch",
|
|
156
|
+
request: {
|
|
157
|
+
method: "POST",
|
|
158
|
+
path: "/workspace/1/branch",
|
|
159
|
+
headers: { "Authorization": "Bearer <token>" },
|
|
160
|
+
body: {
|
|
161
|
+
source_branch: "v1",
|
|
162
|
+
label: "feature-auth",
|
|
163
|
+
description: "Authentication feature development",
|
|
164
|
+
color: "#ebc346"
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
response: {
|
|
168
|
+
created_at: "2024-02-11T10:00:00Z",
|
|
169
|
+
label: "feature-auth",
|
|
170
|
+
backup: false,
|
|
171
|
+
live: false
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
title: "Update a branch",
|
|
176
|
+
description: "Rename a branch and update its color",
|
|
177
|
+
request: {
|
|
178
|
+
method: "PUT",
|
|
179
|
+
path: "/workspace/1/branch/feature-auth",
|
|
180
|
+
headers: { "Authorization": "Bearer <token>" },
|
|
181
|
+
body: {
|
|
182
|
+
label: "feature-authentication",
|
|
183
|
+
color: "#ff5733"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
response: {
|
|
187
|
+
created_at: "2024-02-11T10:00:00Z",
|
|
188
|
+
label: "feature-authentication",
|
|
189
|
+
backup: false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
title: "Set branch as live",
|
|
194
|
+
description: "Make a branch the active production branch",
|
|
195
|
+
request: {
|
|
196
|
+
method: "POST",
|
|
197
|
+
path: "/workspace/1/branch/staging/live",
|
|
198
|
+
headers: { "Authorization": "Bearer <token>" }
|
|
199
|
+
},
|
|
63
200
|
response: {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
]
|
|
201
|
+
created_at: "2024-02-10T09:15:00Z",
|
|
202
|
+
label: "staging",
|
|
203
|
+
backup: false,
|
|
204
|
+
live: true
|
|
69
205
|
}
|
|
70
206
|
}
|
|
71
207
|
],
|