@qingflow-tech/qingflow-app-builder-mcp 1.0.4 → 1.0.5

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.
@@ -33,7 +33,7 @@ def build_user_server() -> FastMCP:
33
33
 
34
34
  If `app_key` is unknown, use `app_list` or `app_search` first.
35
35
  If the app is known but the data range is not, use `app_get` first and choose from `accessible_views`.
36
- If an accessible view has `analysis_supported=false`, do not use it for `record_list` or `record_analyze`. `boardView` and `ganttView` are special UI views, not list/analyze targets.
36
+ If an accessible view has `analysis_supported=false`, do not use it for `record_access` or `record_list`. `boardView` and `ganttView` are special UI views, not data-access targets.
37
37
  `view_get(view_id=...)` also returns `export_capability`; it only means there is a supported export route, not that export permission has been verified.
38
38
 
39
39
  ## Shared Helper
@@ -49,7 +49,7 @@ If an accessible view has `analysis_supported=false`, do not use it for `record_
49
49
  Call `record_insert_schema_get` before `record_insert`.
50
50
  Call `record_update_schema_get` before `record_update`.
51
51
  Call `record_code_block_schema_get` before `record_code_block_run`.
52
- Call `app_get` first when the data range is unclear, then use `record_browse_schema_get(view_id=...)` before `record_list`, `record_get`, or `record_analyze`.
52
+ Call `app_get` first when the data range is unclear, then use `record_browse_schema_get(view_id=...)` before `record_access`, `record_list`, or `record_get`.
53
53
  Call `record_import_schema_get` when the import field mapping is unclear before template download or verify.
54
54
 
55
55
  - All `field_id` values must come from the schema response.
@@ -60,7 +60,9 @@ Call `record_import_schema_get` when the import field mapping is unclear before
60
60
  `record_insert_schema_get` returns the current user's insert-ready applicant schema; read `required_fields`, `optional_fields`, `runtime_linked_required_fields`, and `payload_template`.
61
61
  Inside `optional_fields`, any field with `may_become_required=true` is still writable, but may become required when linked visibility or option-driven runtime rules activate.
62
62
  `record_update_schema_get` returns the current record's overall update-ready writable field set across matched accessible views; read `writable_fields` and `payload_template`.
63
- `record_browse_schema_get(view_id=...)` returns browse-schema fields for the selected accessible view.
63
+ `record_browse_schema_get(view_id=...)` returns the same readable fields shown in the selected Qingflow table view header.
64
+ `record_access.fields` / CSV columns and `record_list.columns / where / order_by / query_fields` use that exact same view schema; a missing field means it is not readable in that view.
65
+ `searchQueIds` is a backend full-text search scope, not an output-column/projection mechanism.
64
66
  `record_code_block_schema_get` returns code-block-ready schema for exact code block field selection.
65
67
  `record_import_schema_get` returns import-ready column metadata.
66
68
 
@@ -70,16 +72,19 @@ Inside `optional_fields`, any field with `may_become_required=true` is still wri
70
72
 
71
73
  ## Analytics Path
72
74
 
73
- `app_get -> record_browse_schema_get(view_id=...) -> record_analyze`
75
+ `app_get -> record_browse_schema_get(view_id=...) -> record_access -> Python`
74
76
 
75
77
  Prefer `view_id` entries from `accessible_views` where `analysis_supported=true`.
76
78
 
77
- Use this DSL shape:
79
+ Use `record_access` to write local CSV shard files, then use Python to compute counts, rankings, ratios, trends, and final conclusions. `record_access` does not return bulk `items`; read `files[].local_path`. CSV columns are readable and field-id anchored, such as `项目状态__field_343283094`, and `fields[]` is the compact metadata source.
80
+ For analysis-style tasks, prefer an explicit time range or business filter. If `record_access.status == "needs_scope"`, do not treat it as a failure; ask for a time/business scope or retry with a user-provided period using `scope.suggested_time_fields` / `scope.recommended_where_examples`. If `record_access.status == "partial"`, read the returned files only as a limited subset and do not give a final full-population conclusion.
81
+ Use `chart_get` only when the user provides a report URL / chart_id or explicitly asks to read an existing report. Do not use QingBI as the default analysis route.
78
82
 
79
- - `dimensions`: `{{field_id, alias, bucket}}`
80
- - `metrics`: `{{op, field_id, alias}}`
81
- - `filters`: `{{field_id, op, value}}`
82
- - `sort`: `{{by, order}}`
83
+ Use this data-access DSL shape:
84
+
85
+ - `columns`: `[{{field_id}}]`
86
+ - `where`: `[{{field_id, op, value}}]`
87
+ - `order_by`: `[{{field_id, direction}}]`
83
88
 
84
89
  Important key rules:
85
90
 
@@ -89,6 +94,10 @@ Important key rules:
89
94
  - Do **not** use `aggregation`
90
95
  - Do **not** use `operator`
91
96
 
97
+ `record_list` is for browsing and sample checks, not final analysis conclusions.
98
+ For fuzzy single-record lookup, use `record_list(query=..., query_fields=[{{field_id}}])` to find candidates, read `lookup.next_action`, and only call `record_get` after one candidate is clear.
99
+ `record_list.query_fields` maps to backend full-text search scope (`searchQueIds`); `record_list.columns` only controls displayed fields.
100
+
92
101
  Analysis answers must include concrete numbers. When applicable, include percentages based on the returned totals.
93
102
 
94
103
  ## Record CRUD Path
@@ -102,6 +111,7 @@ Analysis answers must include concrete numbers. When applicable, include percent
102
111
  `portal_get -> view_get -> record_list`
103
112
 
104
113
  - Use `columns` as `[{{field_id}}]`
114
+ - Use `query` plus optional `query_fields` when the user provides fuzzy record-identifying text
105
115
  - Use `where` items as `{{field_id, op, value}}`
106
116
  - Use `order_by` items as `{{field_id, direction}}`
107
117
  - Legacy forms such as bare integer `field_id`, `fieldId`, `operator`, `values`, or `order` may still parse, but they are compatibility-only and not the canonical DSL
@@ -115,7 +125,10 @@ Analysis answers must include concrete numbers. When applicable, include percent
115
125
  - `linkage.kind=logic_visibility` means linked visibility or option-driven rules are involved; `linkage.kind=reference_fill` means reference/default matching logic is involved; `linkage.kind=formula_fill` means formula/default auto-fill logic is involved.
116
126
  - `record_update_schema_get` exposes the overall writable field set for the record, but not every field combination is guaranteed; `record_update` still needs one single matched accessible view that can cover the payload.
117
127
  - `record_delete` deletes by `record_id` or `record_ids`.
118
- - When readback shape matters after insert or update, prefer `record_get(..., output_profile="normalized")` or `record_list(..., output_profile="normalized")`.
128
+ - `record_get` is the single-record frontend detail context tool. It returns detail-page visible fields, one-level relation targets, first-page data/workflow logs, associated views/reports, local readable image assets, local downloadable file assets, unavailable context, and `semantic_context`.
129
+ - Read record images from `record_get.media_assets.items[].local_path` when `readable_by_agent=true`; read attachments/documents/tables from `record_get.file_assets.items[].local_path` and `extraction.text_path` when present. `record_get` follows the frontend storage cookie redirect path for Qingflow attachments, and remote file URLs should not be treated as directly readable.
130
+ - `record_get.columns` are focus hints only; they do not project the detail fields. Read facts from top-level `fields[]`.
131
+ - When readback shape matters after insert or update, prefer `record_get` for human/detail-page context, or `record_list(..., output_profile="normalized")` for batch-shaped normalized rows.
119
132
 
120
133
  - Read relation targets from `record_insert_schema_get` / `record_update_schema_get` relation metadata before preparing relation writes.
121
134
  - Member and department fields may be written with natural strings directly on `record_insert` / `record_update`; only fall back to `record_member_candidates` or `record_department_candidates` when the user wants explicit candidate browsing or the write returns ambiguity that needs confirmation.
@@ -146,9 +159,12 @@ Use `record_code_block_run` when the user wants to execute a form code-block fie
146
159
 
147
160
  ## Export Path
148
161
 
162
+ Use export only when the user explicitly asks to export/download/generate an Excel or export file.
163
+
149
164
  `view_get -> record_export_start -> record_export_status_get -> record_export_get`
150
165
 
151
166
  - `record_export_direct` is the one-shot path that starts export, waits, downloads locally, and still returns remote download links.
167
+ - Do not use `record_export_direct` as the default analysis path; use `record_access -> Python` instead.
152
168
  - Export v1 supports record views only and follows the same public `view_id` semantics as `record_list`.
153
169
  - `record_export_start` / `record_export_direct` support frontend-like row selection:
154
170
  - omit `record_ids` to export all rows in the selected view