@josephyan/qingflow-app-builder-mcp 0.2.0-beta.36 → 0.2.0-beta.38

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 CHANGED
@@ -3,13 +3,13 @@
3
3
  Install:
4
4
 
5
5
  ```bash
6
- npm install @josephyan/qingflow-app-builder-mcp@0.2.0-beta.36
6
+ npm install @josephyan/qingflow-app-builder-mcp@0.2.0-beta.38
7
7
  ```
8
8
 
9
9
  Run:
10
10
 
11
11
  ```bash
12
- npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.36 qingflow-app-builder-mcp
12
+ npx -y -p @josephyan/qingflow-app-builder-mcp@0.2.0-beta.38 qingflow-app-builder-mcp
13
13
  ```
14
14
 
15
15
  Environment:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@josephyan/qingflow-app-builder-mcp",
3
- "version": "0.2.0-beta.36",
3
+ "version": "0.2.0-beta.38",
4
4
  "description": "Builder MCP for Qingflow app/package/system design and staged solution workflows.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qingflow-mcp"
7
- version = "0.2.0b36"
7
+ version = "0.2.0b38"
8
8
  description = "User-authenticated MCP server for Qingflow"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -49,15 +49,17 @@ Default modeling rules:
49
49
  - Authentication and workspace: `auth_*`, `workspace_*`
50
50
  - File upload: `file_upload_local`
51
51
  - Resource resolve/read: `package_list`, `package_resolve`, `package_create`, `builder_tool_contract`, `member_search`, `role_search`, `app_resolve`, `app_read_summary`, `app_read_fields`, `app_read_layout_summary`, `app_read_views_summary`, `app_read_flow_summary`
52
- - Resource plan: `app_schema_plan`, `app_layout_plan`, `app_flow_plan`, `app_views_plan`
53
- - Resource patch: `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, `package_attach_app`, `app_release_edit_lock_if_mine`, `role_create`
52
+ - Resource patch: `app_schema_apply`, `app_layout_apply`, `app_flow_apply`, `app_views_apply`, `chart_apply`, `portal_apply`, `package_attach_app`, `app_release_edit_lock_if_mine`, `role_create`
54
53
  - Publish and verify: `app_publish_verify`
55
54
 
56
55
  Note:
57
56
  - Do not try to handcraft raw Qingflow schema or internal solution payloads.
58
- - Do not rely on low-level `view_*`, `workflow_*`, or `qingbi_report_*` write payloads from public builder flows.
59
- - Public builder work should stay on the resource path: `resolve -> summary read -> plan -> apply -> attach -> publish_verify`.
57
+ - Do not rely on low-level `view_*`, `workflow_*`, `qingbi_report_*`, or `portal_*` write payloads from public builder flows.
58
+ - Public builder work should stay on the resource path: `resolve -> summary read -> apply -> attach -> publish_verify`.
60
59
  - `app_schema_apply` / `app_layout_apply` / `app_flow_apply` / `app_views_apply` publish by default; pass `publish=false` only when you intentionally want to leave changes in draft.
60
+ - `chart_apply` is immediate-live and does not publish.
61
+ - `portal_apply` uses replace semantics for sections; remove a section by omitting it from the next full sections list.
62
+ - `app_schema_apply` / `app_layout_apply` / `app_flow_apply` / `app_views_apply` now perform planning, normalization, and dependency checks internally; when prechecks block, read the returned blocking issues and `suggested_next_call` directly from the apply result.
61
63
  - If you are unsure about a public builder tool's keys, aliases, presets, or minimal legal shape, call `builder_tool_contract` instead of guessing.
62
64
  - For views, always write the canonical key `columns`. Do not emit `column_names`; treat `fields` only as a tolerated legacy alias, not the preferred shape.
63
65
  - For flow presets, map natural language to canonical values before calling MCP:
@@ -73,7 +75,7 @@ Note:
73
75
 
74
76
  Default policy:
75
77
 
76
- - Creating or updating one app inside an existing package: resolve the package/app, read compact state, plan patches on the server, then apply schema/layout/flow/views patches explicitly.
78
+ - Creating or updating one app inside an existing package: resolve the package/app, read compact state, then apply schema/layout/flow/views patches explicitly.
77
79
  - If package creation looks necessary or beneficial, ask the user to confirm before calling `package_create`.
78
80
  - If the user describes a system/package with multiple forms or modules, do not start with `app_schema_apply` on the package name. Resolve or create the package first, then create each app separately.
79
81
 
@@ -93,23 +95,21 @@ For builder work:
93
95
  - multi-app package/system: create or resolve the package, then create each app separately before adding relations
94
96
  3. Resolve the target app with `app_resolve` if the request is an update.
95
97
  4. Read only the smallest summary you need: `app_read_summary`, `app_read_fields`, `app_read_layout_summary`, `app_read_views_summary`, `app_read_flow_summary`.
96
- 5. Use `app_schema_plan`, `app_layout_plan`, `app_flow_plan`, or `app_views_plan` before any non-trivial write.
97
- 6. Use `app_schema_apply` for create/upsert/remove field work. It publishes by default after the patch lands.
98
- 7. If the app must belong to a package, use `package_attach_app` explicitly after schema work unless readback already shows the target `tag_id`.
99
- 8. Use `app_layout_apply` only when the user is explicitly changing layout. Prefer the default `mode=merge`; use `mode=replace` only when you intend to place every field explicitly. It publishes by default.
100
- 9. Use `app_flow_apply` after schema exists. It publishes by default.
101
- 10. Use `app_views_apply` when the user wants explicit table/card/board/gantt views. It publishes by default.
102
- 11. Use `app_publish_verify` only when the user explicitly wants final publish/live verification or you need an explicit verification pass.
103
- 12. If a write fails with `APP_EDIT_LOCKED`, stop normal writes. Only use `app_release_edit_lock_if_mine` when the failed result shows the lock owner is the current logged-in user.
98
+ 5. Use `app_schema_apply` for create/upsert/remove field work. It publishes by default after the patch lands; noop schema requests do not publish.
99
+ 6. If the app must belong to a package, use `package_attach_app` explicitly after schema work unless readback already shows the target `tag_id`.
100
+ 7. Use `app_layout_apply` only when the user is explicitly changing layout. Prefer the default `mode=merge`; use `mode=replace` only when you intend to place every field explicitly. It publishes by default after the patch lands; noop layout requests do not publish.
101
+ 8. Use `app_flow_apply` after schema exists. It publishes by default; pass `publish=false` when you only want draft/precheck behavior.
102
+ 9. Use `app_views_apply` when the user wants explicit table/card/board/gantt views. It publishes by default after the patch lands; noop view requests do not publish.
103
+ 10. Use `app_publish_verify` only when the user explicitly wants final publish/live verification or you need an explicit verification pass.
104
+ 11. If a write fails with `APP_EDIT_LOCKED`, stop normal writes. Only use `app_release_edit_lock_if_mine` when the failed result shows the lock owner is the current logged-in user.
104
105
 
105
106
  For view work, keep the order strict:
106
107
 
107
108
  1. `builder_tool_contract`
108
109
  2. `app_read_fields`
109
110
  3. `app_read_views_summary`
110
- 4. `app_views_plan`
111
- 5. `app_views_apply`
112
- 6. `app_read_views_summary` again whenever `app_views_apply` returns `failed` or `partial_success`
111
+ 4. `app_views_apply`
112
+ 5. `app_read_views_summary` again whenever `app_views_apply` returns `failed` or `partial_success`
113
113
 
114
114
  For flow work, keep the order strict:
115
115
 
@@ -128,11 +128,10 @@ For flow work, keep the order strict:
128
128
  - prefer `assignees.role_names`
129
129
  - support `assignees.member_names` / `assignees.member_emails` / `assignees.member_uids`
130
130
  10. When a node must edit specific fields, declare `permissions.editable_fields`
131
- 11. `app_flow_plan`
132
- 12. `app_flow_apply`
133
- 13. `app_read_flow_summary` after apply whenever the user asked for verification or apply returns `partial_success`
134
-
135
- In `prod`, keep `plan` and `apply` as separate phases unless the user explicitly asks for a direct live execution.
131
+ 11. `app_flow_apply`
132
+ 12. `app_read_flow_summary` after apply whenever the user asked for verification or apply returns `partial_success`
133
+ 13. Use `chart_apply` for QingBI chart creation and updates, not raw `qingbi_report_*` writes
134
+ 14. Use `portal_apply` for builder-side portal work; treat sections as a full replacement list
136
135
 
137
136
  For additive work on existing systems:
138
137
 
@@ -145,7 +144,7 @@ For additive work on existing systems:
145
144
 
146
145
  - When using `package_name`, expect deterministic resolution only on a unique exact package name match; if multiple packages match, stop and resolve the ambiguity instead of guessing
147
146
  - `app_schema_apply` is the only public patch tool allowed to create an app shell; `app_layout_apply`, `app_flow_apply`, and `app_views_apply` require an existing app.
148
- - Prefer `*_plan` before `*_apply`; the plan tools do server-side normalization and return the next executable call skeleton.
147
+ - Prefer reading compact state plus `builder_tool_contract` before `*_apply`; apply already performs server-side normalization and returns blocking issues or the next executable call shape when needed.
149
148
  - For abstract requests like “默认视图”, “基础审批流”, “灵活流程”, or “美观布局”, first translate the intent into a stable preset or explicit patch. Do not send those phrases to MCP unchanged.
150
149
  - If the user asks for a business system or package that contains several forms, do not use the system/package name as `app_name` and do not try to store the child app names as text fields.
151
150
  - For flexible workflow requests, split the work into two steps:
@@ -157,14 +156,12 @@ For additive work on existing systems:
157
156
  - `assignees.role_names`
158
157
  - `assignees.member_names`
159
158
  - `permissions.editable_fields`
160
- - Reuse `app_flow_plan` output directly when it succeeds. Do not rewrite it into internal keys such as `role_entries` or `editable_que_ids`.
161
- - Reuse `app_views_plan` output directly when it succeeds. Do not re-expand aliases such as `column_names`.
162
159
  - For layout work, keep the public section shape canonical:
163
160
  - `title`
164
161
  - `rows`
165
162
  Do not invent top-level layout `columns`, and do not prefer `fields` or `field_ids` once `rows` is known.
166
163
  - Translate natural language like “一行四个字段 / 四列布局 / 每行放四个” into `rows` matrices, not guessed layout parameters.
167
- - If the same layout-shape `VALIDATION_ERROR` repeats twice, stop guessing and re-read `builder_tool_contract(app_layout_plan)` or the layout reference before trying again.
164
+ - If the same layout-shape `VALIDATION_ERROR` repeats twice, stop guessing and re-read `builder_tool_contract(app_layout_apply)` or the layout reference before trying again.
168
165
  - Do not guess role ids or member ids. Resolve them from the directory first.
169
166
  - `app_schema_apply` does not treat package attachment as success criteria; if package ownership matters, verify `tag_ids_after` and call `package_attach_app` explicitly.
170
167
  - `package_attach_app` is the source of truth for package ownership; do not assume app creation or publish implicitly attaches the app.
@@ -184,7 +181,7 @@ For additive work on existing systems:
184
181
  - If multiple views share the same name, do not guess which one to update. Read `view_key` from `app_read_views_summary` and pass it explicitly in `upsert_views[]`.
185
182
  - In final user-facing summaries, distinguish clearly between:
186
183
  - contract is visible / canonical shape is known
187
- - plan succeeded
184
+ - apply precheck succeeded
188
185
  - apply landed and readback verified it
189
186
  - base template/skeleton applied
190
187
  - business-specific rules completed
@@ -203,10 +200,6 @@ For additive work on existing systems:
203
200
  - Read layout summary: `app_read_layout_summary`
204
201
  - Read views summary: `app_read_views_summary`
205
202
  - Read flow summary: `app_read_flow_summary`
206
- - Plan schema patch: `app_schema_plan`
207
- - Plan layout patch: `app_layout_plan`
208
- - Plan workflow patch: `app_flow_plan`
209
- - Plan view patch: `app_views_plan`
210
203
  - Search members for workflow assignees: `member_search`
211
204
  - Search roles for workflow assignees: `role_search`
212
205
  - Create reusable workflow role: `role_create`
@@ -214,6 +207,8 @@ For additive work on existing systems:
214
207
  - Merge or replace layout: `app_layout_apply`
215
208
  - Replace workflow: `app_flow_apply`
216
209
  - Upsert/remove views: `app_views_apply`
210
+ - Upsert/remove/reorder QingBI charts: `chart_apply`
211
+ - Create or replace-update portal pages: `portal_apply`
217
212
  - Attach one app to a package: `package_attach_app`
218
213
  - Release your own stale edit lock: `app_release_edit_lock_if_mine`
219
214
  - Publish and verify: `app_publish_verify` when you need a separate verification pass beyond the default auto-publish behavior in apply tools
@@ -20,10 +20,9 @@ If creating a brand new package would help, ask the user to confirm package crea
20
20
 
21
21
  1. `package_resolve`
22
22
  2. `app_resolve`
23
- 3. `app_schema_plan`
24
- 4. `app_schema_apply`
25
- 5. `package_attach_app`
26
- 6. `app_publish_verify` only when the user asks for explicit final verification
23
+ 3. `app_schema_apply`
24
+ 4. `package_attach_app`
25
+ 5. `app_publish_verify` only when the user asks for explicit final verification
27
26
 
28
27
  ## Multi-app systems are different
29
28
 
@@ -38,7 +37,7 @@ then do not treat that as one app.
38
37
  Use this pattern instead:
39
38
 
40
39
  1. `package_resolve` or `package_create`
41
- 2. for each app name, run `app_schema_plan -> app_schema_apply -> package_attach_app`
40
+ 2. for each app name, run `app_schema_apply -> package_attach_app`
42
41
  3. once the apps exist, add `relation` fields between them
43
42
 
44
43
  ## Example
@@ -67,16 +66,17 @@ Resolve the package:
67
66
  }
68
67
  ```
69
68
 
70
- Plan schema for a new app:
69
+ Apply schema for a new app:
71
70
 
72
71
  ```json
73
72
  {
74
- "tool_name": "app_schema_plan",
73
+ "tool_name": "app_schema_apply",
75
74
  "arguments": {
76
75
  "profile": "default",
77
76
  "app_name": "客户订单",
78
77
  "package_tag_id": 1218950,
79
78
  "create_if_missing": true,
79
+ "publish": true,
80
80
  "add_fields": [
81
81
  {"name": "订单编号", "type": "text", "required": true},
82
82
  {"name": "客户名称", "type": "text", "required": true},
@@ -88,26 +88,6 @@ Plan schema for a new app:
88
88
  }
89
89
  }
90
90
  ```
91
-
92
- Apply schema. This publishes by default:
93
-
94
- ```json
95
- {
96
- "tool_name": "app_schema_apply",
97
- "arguments": {
98
- "profile": "default",
99
- "app_name": "客户订单",
100
- "package_tag_id": 1218950,
101
- "create_if_missing": true,
102
- "publish": true,
103
- "add_fields": [
104
- {"name": "订单编号", "type": "text", "required": true},
105
- {"name": "客户名称", "type": "text", "required": true},
106
- {"name": "订单金额", "type": "amount"},
107
- {"name": "状态", "type": "single_select", "options": ["草稿", "进行中", "已完成"], "required": true}
108
- ],
109
- "update_fields": [],
110
- "remove_fields": []
111
91
  }
112
92
  }
113
93
  ```
@@ -6,7 +6,7 @@ Use this when the workflow needs real assignees or node-level editable field per
6
6
 
7
7
  - Approval, fill, and copy nodes must declare at least one assignee.
8
8
  - Prefer roles over explicit members.
9
- - Resolve directory actors before calling `app_flow_plan` or `app_flow_apply`.
9
+ - Resolve directory actors before calling `app_flow_apply`.
10
10
  - Use canonical keys only:
11
11
  - `assignees.role_names`
12
12
  - `assignees.role_ids`
@@ -22,8 +22,7 @@ Use this when the workflow needs real assignees or node-level editable field per
22
22
  3. `role_search`
23
23
  4. `member_search` when the user explicitly names people
24
24
  5. `role_create` when no reusable role exists and the user wants role-based routing
25
- 6. `app_flow_plan`
26
- 7. `app_flow_apply`
25
+ 6. `app_flow_apply`
27
26
 
28
27
  ## Examples
29
28
 
@@ -31,7 +30,7 @@ Use this when the workflow needs real assignees or node-level editable field per
31
30
 
32
31
  ```json
33
32
  {
34
- "tool_name": "app_flow_plan",
33
+ "tool_name": "app_flow_apply",
35
34
  "arguments": {
36
35
  "profile": "default",
37
36
  "app_key": "APP_123",
@@ -54,7 +53,7 @@ Use this when the workflow needs real assignees or node-level editable field per
54
53
 
55
54
  ```json
56
55
  {
57
- "tool_name": "app_flow_plan",
56
+ "tool_name": "app_flow_apply",
58
57
  "arguments": {
59
58
  "profile": "default",
60
59
  "app_key": "APP_123",
@@ -40,7 +40,7 @@
40
40
  - Resolve assignees with `role_search` / `member_search` before flow apply
41
41
  - Use `permissions.editable_fields` for node-level editable field permissions; do not guess field ids
42
42
  - Preset node ids matter. When patching `basic_approval` or `basic_fill_then_approve`, reuse `approve_1` and `fill_1` unless you are explicitly replacing the skeleton.
43
- - If `app_flow_plan` reports `FLOW_DEPENDENCY_MISSING`, fix schema first
43
+ - If `app_flow_apply` reports `FLOW_DEPENDENCY_MISSING`, fix schema first
44
44
  - Do not switch to hidden `solution_*` tools from public builder flows
45
45
 
46
46
  ## Retry discipline
@@ -49,11 +49,11 @@
49
49
  - Do not repeat create steps after `app_key` already exists
50
50
  - For backend rejects, keep the retry narrow: retry only the failed tool, not the whole chain
51
51
  - For `VALIDATION_ERROR`, do not keep guessing. Reuse `suggested_next_call`, `canonical_arguments`, `allowed_keys`, and `allowed_values` first.
52
- - For layout `VALIDATION_ERROR`, also inspect `section_allowed_keys`, `section_aliases`, and `minimal_section_example`. If the same layout-shape error repeats twice, stop free-form retries and re-read `builder_tool_contract(app_layout_plan)`.
52
+ - For layout `VALIDATION_ERROR`, also inspect `section_allowed_keys`, `section_aliases`, and `minimal_section_example`. If the same layout-shape error repeats twice, stop free-form retries and re-read `builder_tool_contract(app_layout_apply)`.
53
53
  - For flow work, do not replay internal keys from old logs or plan outputs. Public builder calls should stay on:
54
54
  - `assignees.role_ids` / `assignees.member_uids` / `assignees.member_emails`
55
55
  - `permissions.editable_fields`
56
- - For view work, treat `columns` as the only canonical public key. `app_read_views_summary` and `app_views_plan/apply` should all be read and written in that shape.
56
+ - For view work, treat `columns` as the only canonical public key. `app_read_views_summary` and `app_views_apply` should all be read and written in that shape.
57
57
  - For layout work, treat `title + rows` as the only canonical public section shape. `fields`, `field_ids`, and `columns` may appear in legacy/internal shapes, but they are not the preferred public write shape.
58
58
  - A created view is not enough to claim a filter succeeded. When `app_views_apply` returns `partial_success`, `views_verified=false`, or `details.filter_mismatches`, treat the view as present but the filter as unverified.
59
59
  - If duplicate view names exist, do not retry by name. Read the exact `view_key` and target that one.
@@ -6,23 +6,20 @@ Use these when you need a quick reminder of the standard v2 builder sequences.
6
6
 
7
7
  1. `package_resolve`
8
8
  2. `app_resolve`
9
- 3. `app_schema_plan`
10
- 4. `app_schema_apply`
11
- 5. `package_attach_app`
12
- 6. `app_publish_verify` only if the user asks for explicit live verification
9
+ 3. `app_schema_apply`
10
+ 4. `package_attach_app`
11
+ 5. `app_publish_verify` only if the user asks for explicit live verification
13
12
 
14
13
  ## Update fields on an existing app
15
14
 
16
15
  1. `app_resolve`
17
16
  2. `app_read_fields`
18
- 3. `app_schema_plan`
19
- 4. `app_schema_apply`
17
+ 3. `app_schema_apply`
20
18
 
21
19
  ## Rework layout
22
20
 
23
21
  1. `app_read_layout_summary`
24
- 2. `app_layout_plan`
25
- 3. `app_layout_apply`
22
+ 2. `app_layout_apply`
26
23
 
27
24
  Prefer `mode=merge`. Use `mode=replace` only when every field placement is intentional.
28
25
 
@@ -32,18 +29,16 @@ Prefer `mode=merge`. Use `mode=replace` only when every field placement is inten
32
29
  2. `app_read_flow_summary`
33
30
  3. `role_search` or `member_search`
34
31
  4. `role_create` if the business wants a reusable role and no good exact role exists
35
- 5. `app_flow_plan`
36
- 6. `app_flow_apply`
32
+ 5. `app_flow_apply`
37
33
 
38
- If `app_flow_plan` reports `FLOW_DEPENDENCY_MISSING`, fix schema first.
34
+ If `app_flow_apply` reports `FLOW_DEPENDENCY_MISSING`, fix schema first.
39
35
  If it reports `FLOW_ASSIGNEE_REQUIRED`, resolve roles or members first and retry with canonical `assignees.*`.
40
36
 
41
37
  ## Add or update views
42
38
 
43
39
  1. `app_read_fields`
44
40
  2. `app_read_views_summary`
45
- 3. `app_views_plan`
46
- 4. `app_views_apply`
41
+ 3. `app_views_apply`
47
42
 
48
43
  For both workflow and view work, prefer `suggested_next_call` over re-guessing arguments after a validation failure.
49
44
 
@@ -4,9 +4,9 @@ Use the smallest v2 builder tool chain that can finish the task.
4
4
 
5
5
  ## Default path
6
6
 
7
- `resolve -> summary read -> plan -> apply -> attach -> publish_verify`
7
+ `resolve -> summary read -> apply -> attach -> publish_verify`
8
8
 
9
- Use `plan` before `apply` unless the patch is trivial and already normalized.
9
+ Public builder `apply` tools already perform server-side planning, normalization, and dependency checks internally. Do not route normal public builder work through explicit `*_plan` tools.
10
10
 
11
11
  ## Hierarchy first
12
12
 
@@ -37,17 +37,6 @@ If the user asks for multiple forms/modules that relate to each other, this is a
37
37
  - `app_read_views_summary`: current view names, types, columns, group-by
38
38
  - `app_read_flow_summary`: workflow enabled state, nodes, transitions
39
39
 
40
- ## Plan tools
41
-
42
- Use these when the patch is non-trivial or the model is likely to drift.
43
-
44
- - `app_schema_plan`: normalize field patches before add/update/remove
45
- - `app_layout_plan`: preview merge/replace layout changes or layout presets
46
- - `app_flow_plan`: validate workflow nodes, transitions, and dependencies
47
- - `app_views_plan`: normalize view aliases and validate referenced fields
48
-
49
- Use `builder_tool_contract` before guessing keys, aliases, presets, or enum values.
50
-
51
40
  ## Apply tools
52
41
 
53
42
  These execute normalized patches and publish by default unless `publish=false`.
@@ -56,6 +45,8 @@ These execute normalized patches and publish by default unless `publish=false`.
56
45
  - `app_layout_apply`: merge or replace layout
57
46
  - `app_flow_apply`: replace workflow
58
47
  - `app_views_apply`: upsert or remove views
48
+ - `chart_apply`: upsert/remove/reorder QingBI charts; charts are immediate-live and do not publish
49
+ - `portal_apply`: create or replace-update portal pages; sections are replace-only and omission deletes old sections
59
50
 
60
51
  ## Explicit post-apply tools
61
52
 
@@ -65,19 +56,23 @@ These execute normalized patches and publish by default unless `publish=false`.
65
56
  ## Decision shortcuts
66
57
 
67
58
  - Create one app inside an existing package:
68
- `package_resolve -> app_resolve -> app_schema_plan -> app_schema_apply -> package_attach_app`
59
+ `package_resolve -> app_resolve -> app_schema_apply -> package_attach_app`
69
60
  - Create a brand new package, then create one app in it:
70
- `package_create -> package_resolve -> app_schema_plan -> app_schema_apply -> package_attach_app`
61
+ `package_create -> package_resolve -> app_schema_apply -> package_attach_app`
71
62
  - Create a brand new multi-app system/package:
72
- `package_create/resolve -> per-app app_schema_plan/apply -> package_attach_app per app -> relation field patches`
63
+ `package_create/resolve -> per-app app_schema_apply -> package_attach_app per app -> relation field patches`
73
64
  - Update fields on an existing app:
74
- `app_resolve -> app_read_fields -> app_schema_plan -> app_schema_apply`
65
+ `app_resolve -> app_read_fields -> app_schema_apply`
75
66
  - Tidy layout:
76
- `app_read_fields -> app_read_layout_summary -> builder_tool_contract (if shape is unclear) -> app_layout_plan -> app_layout_apply`
67
+ `app_read_fields -> app_read_layout_summary -> builder_tool_contract (if shape is unclear) -> app_layout_apply`
77
68
  - Add workflow:
78
- `builder_tool_contract -> app_read_fields -> app_read_flow_summary -> role_search/member_search -> app_flow_plan -> app_flow_apply -> app_read_flow_summary`
69
+ `builder_tool_contract -> app_read_fields -> app_read_flow_summary -> role_search/member_search -> app_flow_apply -> app_read_flow_summary`
79
70
  - Add views:
80
- `builder_tool_contract -> app_read_fields -> app_read_views_summary -> app_views_plan -> app_views_apply -> app_read_views_summary`
71
+ `builder_tool_contract -> app_read_fields -> app_read_views_summary -> app_views_apply -> app_read_views_summary`
72
+ - Add QingBI charts:
73
+ `builder_tool_contract -> app_read_fields -> chart_apply`
74
+ - Create or update a portal:
75
+ `builder_tool_contract -> portal_apply`
81
76
 
82
77
  ## Avoid
83
78
 
@@ -4,7 +4,7 @@ Use this when the app already exists and the task is only about workflow.
4
4
 
5
5
  ## Minimal sequence
6
6
 
7
- 1. `builder_tool_contract(tool_name="app_flow_plan")`
7
+ 1. `builder_tool_contract(tool_name="app_flow_apply")`
8
8
  2. `app_read_fields`
9
9
  3. `app_read_flow_summary`
10
10
  4. `role_search` or `member_search`
@@ -16,9 +16,8 @@ Use this when the app already exists and the task is only about workflow.
16
16
  - `basic_fill_then_approve` -> patch `fill_1` and `approve_1`
17
17
  Do not add a second approval/fill node with a new id unless you are intentionally replacing the skeleton.
18
18
  The MCP now auto-aligns the simplest single-node preset overrides, but still prefer explicit preset ids so the merged graph stays predictable.
19
- 9. `app_flow_plan`
20
- 10. `app_flow_apply`
21
- 11. `app_read_flow_summary` when apply returns `partial_success` or the user asked for verification
19
+ 9. `app_flow_apply`
20
+ 10. `app_read_flow_summary` when apply returns `partial_success` or the user asked for verification
22
21
 
23
22
  If you are unsure about presets or node shapes, call `builder_tool_contract(tool_name="app_flow_apply")` before guessing.
24
23
 
@@ -29,15 +28,16 @@ Canonical preset mapping:
29
28
  - “默认审批/基础审批/普通审批” -> `basic_approval`
30
29
  - “先填报再审批/提交后审批” -> `basic_fill_then_approve`
31
30
 
32
- Plan a simple approval flow with a role assignee and node-level editable fields:
31
+ Apply a simple approval flow with a role assignee and node-level editable fields:
33
32
 
34
33
  ```json
35
34
  {
36
- "tool_name": "app_flow_plan",
35
+ "tool_name": "app_flow_apply",
37
36
  "arguments": {
38
37
  "profile": "default",
39
38
  "app_key": "APP_123",
40
39
  "preset": "basic_approval",
40
+ "publish": true,
41
41
  "nodes": [
42
42
  {
43
43
  "id": "approve_1",
@@ -72,7 +72,7 @@ Canonical branch example:
72
72
 
73
73
  ```json
74
74
  {
75
- "tool_name": "app_flow_plan",
75
+ "tool_name": "app_flow_apply",
76
76
  "arguments": {
77
77
  "profile": "default",
78
78
  "app_key": "APP_123",
@@ -115,41 +115,7 @@ Canonical branch example:
115
115
  }
116
116
  }
117
117
  ```
118
-
119
- Only after that should you use explicit nodes:
120
-
121
- ```json
122
- {
123
- "tool_name": "app_flow_apply",
124
- "arguments": {
125
- "profile": "default",
126
- "app_key": "APP_123",
127
- "mode": "replace",
128
- "publish": true,
129
- "nodes": [
130
- {"id": "start", "type": "start", "name": "发起"},
131
- {
132
- "id": "approve_1",
133
- "type": "approve",
134
- "name": "部门审批",
135
- "assignees": {
136
- "role_names": ["项目经理"]
137
- },
138
- "permissions": {
139
- "editable_fields": ["状态", "审批意见"]
140
- }
141
- },
142
- {"id": "end", "type": "end", "name": "结束"}
143
- ],
144
- "transitions": [
145
- {"from": "start", "to": "approve_1"},
146
- {"from": "approve_1", "to": "end"}
147
- ]
148
- }
149
- }
150
- ```
151
-
152
- After `app_flow_plan` succeeds, prefer reusing its `suggested_next_call.arguments` directly. Do not rewrite the result into internal fields such as `role_entries` or `editable_que_ids`.
118
+ After `app_flow_apply` returns blocking issues or canonical arguments, prefer reusing its `suggested_next_call.arguments` directly. Do not rewrite the result into internal fields such as `role_entries` or `editable_que_ids`.
153
119
  When you patch a preset, patch the preset node itself. Do not leave the preset approval node unassigned while adding a second custom approval node.
154
120
 
155
121
  ## Common failures
@@ -170,7 +136,7 @@ Preferred fix order:
170
136
  2. `member_search` only if the user explicitly named members
171
137
  3. `role_create` if the business needs a reusable role
172
138
  4. patch the preset node id itself with canonical `assignees.*`
173
- 5. retry `app_flow_plan` or `app_flow_apply`
139
+ 5. retry `app_flow_apply`
174
140
 
175
141
  ### `FLOW_DEPENDENCY_MISSING`
176
142
 
@@ -181,7 +147,7 @@ Preferred recovery:
181
147
  1. use the returned `suggested_next_call`
182
148
  2. apply the minimal schema patch
183
149
  3. rerun `app_read_fields`
184
- 4. rerun `app_flow_plan`
150
+ 4. rerun `app_flow_apply`
185
151
 
186
152
  ### `INVALID_FLOW_EDGE`
187
153
 
@@ -202,7 +168,7 @@ The app has no explicit status field recognized by the internal workflow compile
202
168
 
203
169
  ### `FLOW_STAGE_CONTEXT_MISSING`
204
170
 
205
- Internal flow stage context was missing or invalid. Re-run `app_flow_plan`, then retry `app_flow_apply`. Do not switch to hidden `solution_*` tools.
171
+ Internal flow stage context was missing or invalid. Re-run `app_flow_apply` with the normalized arguments, and do not switch to hidden `solution_*` tools.
206
172
 
207
173
  ### `VALIDATION_ERROR`
208
174
 
@@ -7,34 +7,11 @@ Use this when fields already exist and the task is only about form grouping or o
7
7
  1. `app_read_fields`
8
8
  2. `app_read_layout_summary`
9
9
  3. `builder_tool_contract` when the section shape is not already obvious
10
- 4. `app_layout_plan`
11
- 5. `app_layout_apply`
10
+ 4. `app_layout_apply`
12
11
 
13
12
  ## Example
14
13
 
15
- Plan a custom layout with the canonical public section shape:
16
-
17
- ```json
18
- {
19
- "tool_name": "app_layout_plan",
20
- "arguments": {
21
- "profile": "default",
22
- "app_key": "APP_123",
23
- "mode": "merge",
24
- "sections": [
25
- {
26
- "title": "基础信息",
27
- "rows": [
28
- ["客户名称", "订单金额"],
29
- ["状态", "跟进日期"]
30
- ]
31
- }
32
- ]
33
- }
34
- }
35
- ```
36
-
37
- Apply the layout. This publishes by default:
14
+ Apply a custom layout with the canonical public section shape:
38
15
 
39
16
  ```json
40
17
  {
@@ -79,7 +56,7 @@ Re-read with `app_read_layout_summary`. Check `current_field_names`, `request_id
79
56
 
80
57
  Do not keep guessing section keys. Reuse `suggested_next_call`, `canonical_arguments`, `section_allowed_keys`, and `minimal_section_example`.
81
58
 
82
- If the same shape error repeats twice, stop free-form retries and re-read `builder_tool_contract(app_layout_plan)`.
59
+ If the same shape error repeats twice, stop free-form retries and re-read `builder_tool_contract(app_layout_apply)`.
83
60
 
84
61
  ## Notes
85
62
 
@@ -6,8 +6,7 @@ Use this when the app already exists and the task is only about fields.
6
6
 
7
7
  1. `app_resolve`
8
8
  2. `app_read_fields`
9
- 3. `app_schema_plan`
10
- 4. `app_schema_apply`
9
+ 3. `app_schema_apply`
11
10
 
12
11
  ## Example
13
12
 
@@ -23,27 +22,6 @@ Read current fields first:
23
22
  }
24
23
  ```
25
24
 
26
- Plan the patch:
27
-
28
- ```json
29
- {
30
- "tool_name": "app_schema_plan",
31
- "arguments": {
32
- "profile": "default",
33
- "app_key": "APP_123",
34
- "add_fields": [
35
- {"name": "跟进日期", "type": "date"}
36
- ],
37
- "update_fields": [
38
- {"selector": {"name": "金额"}, "set": {"name": "订单金额", "required": true}}
39
- ],
40
- "remove_fields": [
41
- {"name": "旧字段"}
42
- ]
43
- }
44
- }
45
- ```
46
-
47
25
  Apply the patch:
48
26
 
49
27
  ```json