You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(mcp): reject CREATE VIEW ENTITY instead of leaving it out of sync
A view entity created over MCP showed "View Entity is out of sync with the OQL
Query" in Studio Pro (CE6770). Root cause: a synced view entity needs each
attribute's value to be an OqlViewValue, but PED's Attribute schema exposes no
`value`, a `set` on the nested value is refused ("only primitive or reference
properties"), and the sync (syncViewEntity) is reachable only through the
LLM-backed `oql_generate` tool — which regenerates the query from a natural-
language intent rather than writing the user's OQL verbatim (and is slow/may need
Maia config). PED's deterministic write tools therefore cannot produce a synced
view entity.
Rather than write the OQL + entity and leave a broken, error-flagged entity in
the model, reject up front. CreateViewEntitySourceDocument is the executor's first
view-entity backend call (before the companion entity), so the rejection leaves
nothing half-created. Gated on capabilities.yaml/view_entities (flipped to
available:false with the reason); verified live that it rejects with an actionable
error and creates no source doc or entity.
Removed view entities from 01-mcp-domain-model-examples.mdl (now ~20 statements,
all of which run clean over MCP) and from the MCP docs; the cost-doc tally is
softened to "~60 calls" and no longer pinned to an exact, drifting statement count.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: mdl/backend/mcp/capabilities.yaml
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -51,9 +51,9 @@ features:
51
51
available: true
52
52
note: "CREATE / CREATE OR REPLACE / DROP / ALTER (full, any nesting depth)"
53
53
- key: view_entities
54
-
feature: "View entities"
55
-
available: true
56
-
note: "CREATE"
54
+
feature: "View entities — CREATE"
55
+
available: false
56
+
note: "PED syncs a view entity's attributes to its OQL only via the LLM-backed oql_generate tool; its deterministic write tools leave attributes as StoredValue, out of sync with the query (CE6770). mxcli writes user OQL verbatim and does not invoke the generator, so it does not author view entities over MCP"
0 commit comments