Goal
Expose openbuilt's app-builder surface (schemas, pages, exports) to the in-app AI Chat Companion via an IMcpToolProvider.
Suggested MVP tool set
| Tool id |
Purpose |
openbuilt.listApps |
List apps the caller is building |
openbuilt.getAppManifest |
Get one app's manifest (schemas, pages, RBAC) |
openbuilt.createSchema |
Add a schema to an app (user schema → per-app openbuilt-{slug} register) |
openbuilt.addPage |
Add a page to an app's manifest |
openbuilt.listTemplates |
List marketplace templates available to import |
openbuilt.exportToRealApp |
Trigger export of an openbuilt app to a real Nextcloud app |
Respects openbuilt's hybrid register model (system schemas in shared openbuilt, user schemas in per-app openbuilt-{slug}). openbuilt is early-stage — start with the read tools (listApps, getAppManifest, listTemplates) if the write surfaces aren't built yet.
Background
ADR-034 defines the cross-app AI Chat Companion: a floating widget shipped from @conduction/nextcloud-vue (auto-mounts via CnAppRoot) that talks to OpenRegister's orchestrator at runtime. Apps expose their own capabilities to the in-app AI by implementing OCA\OpenRegister\Mcp\IMcpToolProvider (3 methods: getAppId(), getTools(), invokeTool($toolId, $arguments)), registered in lib/AppInfo/Application.php under the DI alias OCA\OpenRegister\Mcp\IMcpToolProvider::{appId}.
ADR-035 makes a per-app provider the fleet expectation: every app with a user-actionable surface ships a provider or records an opt-out in openspec/project.md.
Reference implementation: decidesk/lib/Mcp/DecideskToolProvider.php (5 tools, full auth design) + decidesk/tests/Stubs/Mcp/IMcpToolProvider.php (stub used until openregister PR #1466 ships the real interface).
Dependency
The real IMcpToolProvider interface ships in openregister PR #1466 (ai-chat-companion-orchestrator). Until that merges, apps implement the stub (see decidesk's tests/Stubs/Mcp/IMcpToolProvider.php); the stub no-ops when the real OR interface is present.
Definition of done (MVP)
Goal
Expose openbuilt's app-builder surface (schemas, pages, exports) to the in-app AI Chat Companion via an
IMcpToolProvider.Suggested MVP tool set
openbuilt.listAppsopenbuilt.getAppManifestopenbuilt.createSchemaopenbuilt-{slug}register)openbuilt.addPageopenbuilt.listTemplatesopenbuilt.exportToRealAppRespects openbuilt's hybrid register model (system schemas in shared
openbuilt, user schemas in per-appopenbuilt-{slug}). openbuilt is early-stage — start with the read tools (listApps,getAppManifest,listTemplates) if the write surfaces aren't built yet.Background
ADR-034 defines the cross-app AI Chat Companion: a floating widget shipped from
@conduction/nextcloud-vue(auto-mounts viaCnAppRoot) that talks to OpenRegister's orchestrator at runtime. Apps expose their own capabilities to the in-app AI by implementingOCA\OpenRegister\Mcp\IMcpToolProvider(3 methods:getAppId(),getTools(),invokeTool($toolId, $arguments)), registered inlib/AppInfo/Application.phpunder the DI aliasOCA\OpenRegister\Mcp\IMcpToolProvider::{appId}.ADR-035 makes a per-app provider the fleet expectation: every app with a user-actionable surface ships a provider or records an opt-out in
openspec/project.md.Reference implementation:
decidesk/lib/Mcp/DecideskToolProvider.php(5 tools, full auth design) +decidesk/tests/Stubs/Mcp/IMcpToolProvider.php(stub used until openregister PR #1466 ships the real interface).Dependency
The real
IMcpToolProviderinterface ships in openregister PR #1466 (ai-chat-companion-orchestrator). Until that merges, apps implement the stub (see decidesk'stests/Stubs/Mcp/IMcpToolProvider.php); the stub no-ops when the real OR interface is present.Definition of done (MVP)
lib/Mcp/{AppName}ToolProvider.phpimplementsIMcpToolProviderwith the tool set belowreturn true, nocatch(\Throwable)swallowing the verdict), delegates to the app's existing services{appId}.{toolName}lib/AppInfo/Application.phpunder aliasOCA\OpenRegister\Mcp\IMcpToolProvider::{appId}tests/Stubs/Mcp/IMcpToolProvider.phppresent (copy decidesk's, adjust namespace/package)inputSchema)@conduction/nextcloud-vuewithCnAppRoot(FAB auto-renders when OR is reachable, no-renders otherwise — no install-time OR dep)### MCP coveragesection added to the proposal that lands this (per ADR-035)