Skip to content

Author navigation over MCP/PED via generic ped_update_document path-ops (split nav out of the security 'no PED path' bundle) #699

Description

@ako

Summary

Navigation (profiles, home page, menu items) is not authorable over the MCP/PED backend today — UpdateNavigationProfile, GetNavigation, and ListNavigationDocuments all return errUnsupported (mdl/backend/mcp/unsupported_gen.go:517, 730, 1130), and capabilities.yaml lumps navigation in with security under one blanket row:

- key: security_integrations_nav
  feature: "Security (roles, access, demo users), Navigation, OData/REST, mappings, settings"
  available: false
  note: "no PED write path"

That bundling is wrong for navigation. Maia (which drives the same in-Studio-Pro MCP server PED exposes) does modify project navigation — so a write path exists. PED ships generic document tools (ped_find_document, ped_read_document, ped_update_document), and the Navigation document is a regular project document. It is almost certainly editable via ped_update_document JSON-pointer path-ops — the exact mechanism the entity-attribute-default feature already uses (domainmodel.go applyAttributeDefaults/entities/N/attributes/M/value/defaultValue).

So this is a wiring gap in mxcli, not a PED limitation. (Security/roles/access genuinely lack a PED write path and should stay blocked pending a later Studio Pro release — keep them separate.)

Goal

Author navigation over --mcp to the same extent the local MDL engine does: create or replace navigation, home page, nested menus, menu items → page references.

Proposed approach

  1. Probe (live 11.12 session): ped_find_document for the Navigation document; ped_read_document it; inspect the schema via ped_get_schema. Confirm the JSON shape of profiles → menuItemCollection → items.
  2. Map types.NavigationProfileSpec onto ped_update_document path-ops (replace the profile's menu / home page), mirroring applyAttributeDefaults. Implement GetNavigation via ped_read_document so read-modify-write works.
  3. Split capabilities.yaml: break navigation out of security_integrations_nav into its own navigation key; flip to available: true once wired. Leave security/integrations blocked.
  4. Reject honestly for any navigation construct the path-op can't express, rather than dropping it.
  5. Update docs/03-development/PED_MCP_CAPABILITIES.md.

Context

Surfaced while assessing MCP/PED parity for the ExpenseApproval project (11.12, authored by Maia): the menu Maia added (Expenses / My Tasks / Admin submenu) is the one model artifact, besides pages (blocked by #pg_patch_page) and theming (out of model scope), that mxcli's MCP backend currently can't reproduce — and unlike PED security, it should be reproducible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions