Skip to content

Beautiful Open-Source Form Builder

feat: finalize official OpenAI plugin package (#1266)

Julien Nahumec1e059e4cca
diff --git a/api/app/Mcp/Tools/CreateFormDraftTool.php b/api/app/Mcp/Tools/CreateFormDraftTool.php
index 05b30319b..57cce40ad 100644
--- a/api/app/Mcp/Tools/CreateFormDraftTool.php
+++ b/api/app/Mcp/Tools/CreateFormDraftTool.php
@@ -10,10 +10,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('create_form_draft')]
#[Description('Create a private server-side OpnForm draft that expires after seven days. Works without login. Returns a capability token once; keep it private and use it with get_form_draft and patch_form_draft. The form remains an unpublished draft.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class CreateFormDraftTool extends GuestDraftMcpTool
{
diff --git a/api/app/Mcp/Tools/CreateFormTool.php b/api/app/Mcp/Tools/CreateFormTool.php
index a1acf18cf..32e5f23ea 100644
--- a/api/app/Mcp/Tools/CreateFormTool.php
+++ b/api/app/Mcp/Tools/CreateFormTool.php
@@ -9,10 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('create_form')]
#[Description('Create a form in an accessible writable workspace from the canonical definition. It is always saved as an unpublished draft. If the account has exactly one workspace, workspace_id may be omitted.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class CreateFormTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/ExportSubmissionsTool.php b/api/app/Mcp/Tools/ExportSubmissionsTool.php
index 0ab3c13b8..08afc2e36 100644
--- a/api/app/Mcp/Tools/ExportSubmissionsTool.php
+++ b/api/app/Mcp/Tools/ExportSubmissionsTool.php
@@ -9,10 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('export_submissions')]
#[Description('Queue a private CSV export for all submissions in an accessible form, or up to 1,000 selected submission IDs. Poll get_submission_export for its temporary download URL.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class ExportSubmissionsTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetAccountContextTool.php b/api/app/Mcp/Tools/GetAccountContextTool.php
index 3f3e18da5..3cc57d966 100644
--- a/api/app/Mcp/Tools/GetAccountContextTool.php
+++ b/api/app/Mcp/Tools/GetAccountContextTool.php
@@ -8,12 +8,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_account_context')]
#[Description('Confirm the connected OpnForm account and summarize its accessible workspaces. Use this before account-scoped work when the current context is unclear.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetAccountContextTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetFormDraftTool.php b/api/app/Mcp/Tools/GetFormDraftTool.php
index e2d70a964..5d9cb1162 100644
--- a/api/app/Mcp/Tools/GetFormDraftTool.php
+++ b/api/app/Mcp/Tools/GetFormDraftTool.php
@@ -9,12 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_form_draft')]
#[Description('Fetch the current canonical definition and version of a private guest draft. Use this after a version conflict or whenever the current state is uncertain.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetFormDraftTool extends GuestDraftMcpTool
{
diff --git a/api/app/Mcp/Tools/GetFormTool.php b/api/app/Mcp/Tools/GetFormTool.php
index e658469a7..fc984c3e7 100644
--- a/api/app/Mcp/Tools/GetFormTool.php
+++ b/api/app/Mcp/Tools/GetFormTool.php
@@ -9,12 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_form')]
#[Description('Fetch an accessible form as the canonical agent form definition. Use its revision value when calling update_form, publish_form, or trash_form.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetFormTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetSubmissionExportTool.php b/api/app/Mcp/Tools/GetSubmissionExportTool.php
index 76f1a6895..4378deca0 100644
--- a/api/app/Mcp/Tools/GetSubmissionExportTool.php
+++ b/api/app/Mcp/Tools/GetSubmissionExportTool.php
@@ -9,12 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_submission_export')]
#[Description('Check a queued submission export. When completed, returns a temporary private CSV download URL and its expiration time.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetSubmissionExportTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetSubmissionStatsTool.php b/api/app/Mcp/Tools/GetSubmissionStatsTool.php
index ac09e3e36..f7671a03d 100644
--- a/api/app/Mcp/Tools/GetSubmissionStatsTool.php
+++ b/api/app/Mcp/Tools/GetSubmissionStatsTool.php
@@ -10,12 +10,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_submission_stats')]
#[Description('Analyze submissions for an accessible form using the same bounded field summaries available in OpnForm. Returns all-time views/completion overview plus a status/date-filtered summary.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetSubmissionStatsTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetSubmissionTool.php b/api/app/Mcp/Tools/GetSubmissionTool.php
index 38e464812..03f1dc5f7 100644
--- a/api/app/Mcp/Tools/GetSubmissionTool.php
+++ b/api/app/Mcp/Tools/GetSubmissionTool.php
@@ -9,12 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_submission')]
#[Description('Read one submission from an accessible form, with response values labeled by form field. This tool never changes the submission.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetSubmissionTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/GetWorkspaceTool.php b/api/app/Mcp/Tools/GetWorkspaceTool.php
index 833f4d67b..a1d7790d3 100644
--- a/api/app/Mcp/Tools/GetWorkspaceTool.php
+++ b/api/app/Mcp/Tools/GetWorkspaceTool.php
@@ -9,12 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('get_workspace')]
#[Description('Read one accessible OpnForm workspace and the connected account role. This integration never changes workspace settings or members.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class GetWorkspaceTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/ListFormsTool.php b/api/app/Mcp/Tools/ListFormsTool.php
index 323def33b..733d10b95 100644
--- a/api/app/Mcp/Tools/ListFormsTool.php
+++ b/api/app/Mcp/Tools/ListFormsTool.php
@@ -11,12 +11,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('list_forms')]
#[Description('List forms accessible to the connected account. Filter by workspace, title, or visibility; results are paginated and exclude trashed forms.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class ListFormsTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/ListSubmissionsTool.php b/api/app/Mcp/Tools/ListSubmissionsTool.php
index 729f31618..ae327e31a 100644
--- a/api/app/Mcp/Tools/ListSubmissionsTool.php
+++ b/api/app/Mcp/Tools/ListSubmissionsTool.php
@@ -10,12 +10,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('list_submissions')]
#[Description('List and search submissions for an accessible form. Search matches response values, not field names. Filter by completed/partial status and date; results are paginated.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class ListSubmissionsTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/ListWorkspacesTool.php b/api/app/Mcp/Tools/ListWorkspacesTool.php
index 3e32c13b7..6bc177416 100644
--- a/api/app/Mcp/Tools/ListWorkspacesTool.php
+++ b/api/app/Mcp/Tools/ListWorkspacesTool.php
@@ -8,12 +8,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('list_workspaces')]
#[Description('List workspaces available to the connected account, including its role and whether forms can be changed. Workspace management is intentionally not available.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class ListWorkspacesTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/OpenFormDraftInEditorTool.php b/api/app/Mcp/Tools/OpenFormDraftInEditorTool.php
index fb93f645f..129539167 100644
--- a/api/app/Mcp/Tools/OpenFormDraftInEditorTool.php
+++ b/api/app/Mcp/Tools/OpenFormDraftInEditorTool.php
@@ -9,11 +9,15 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('open_form_draft_in_editor')]
#[Description('Create a reusable OpnForm editor link that remains valid until the guest draft expires.')]
-#[IsOpenWorld]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
+#[IsOpenWorld(false)]
class OpenFormDraftInEditorTool extends GuestDraftMcpTool
{
public function handle(Request $request, AgentFormDraftService $drafts): ResponseFactory
diff --git a/api/app/Mcp/Tools/PatchFormDraftTool.php b/api/app/Mcp/Tools/PatchFormDraftTool.php
index cfe55d517..6d2445375 100644
--- a/api/app/Mcp/Tools/PatchFormDraftTool.php
+++ b/api/app/Mcp/Tools/PatchFormDraftTool.php
@@ -9,10 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('patch_form_draft')]
#[Description('Apply validated semantic operations to a private draft. Requires expected_version, so concurrent agent or editor changes cannot be silently overwritten. Supported ops: set_form_values, add_block, update_block, remove_block, move_block. Before changing presentation_style, fields, layout, or media, read opnform://reference/form-fields/v1; focused mode derives one step per block and media belongs in the block image property.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class PatchFormDraftTool extends GuestDraftMcpTool
{
diff --git a/api/app/Mcp/Tools/PreviewFormDraftTool.php b/api/app/Mcp/Tools/PreviewFormDraftTool.php
index f06ff8e90..3cac212bb 100644
--- a/api/app/Mcp/Tools/PreviewFormDraftTool.php
+++ b/api/app/Mcp/Tools/PreviewFormDraftTool.php
@@ -11,12 +11,16 @@ use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
use Laravel\Mcp\Server\Attributes\RendersApp;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('preview_form_draft')]
#[Description('Render the current guest draft, return a browser preview valid for one hour, and create a reusable editor link that remains valid for the seven-day guest draft lifetime. Call this tool again whenever a fresh preview link is needed.')]
#[RendersApp(resource: FormDraftPreviewApp::class)]
-#[IsOpenWorld]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
+#[IsOpenWorld(false)]
class PreviewFormDraftTool extends GuestDraftMcpTool
{
public function handle(Request $request, AgentFormDraftService $drafts): ResponseFactory
diff --git a/api/app/Mcp/Tools/PublishFormTool.php b/api/app/Mcp/Tools/PublishFormTool.php
index 0e79907b3..42eb860b8 100644
--- a/api/app/Mcp/Tools/PublishFormTool.php
+++ b/api/app/Mcp/Tools/PublishFormTool.php
@@ -9,10 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('publish_form')]
#[Description('Publish an accessible writable form at its current revision. Call only after showing the result or preview and receiving explicit confirmation from the user.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld]
class PublishFormTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/TrashFormTool.php b/api/app/Mcp/Tools/TrashFormTool.php
index 2e1af6aca..e73babb04 100644
--- a/api/app/Mcp/Tools/TrashFormTool.php
+++ b/api/app/Mcp/Tools/TrashFormTool.php
@@ -11,9 +11,11 @@ use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('trash_form')]
#[Description('Move an accessible writable form at its current revision to soft-delete trash. Call only after explicit user confirmation. Restore and permanent deletion are intentionally not exposed.')]
+#[IsReadOnly(false)]
#[IsDestructive]
#[IsOpenWorld(false)]
class TrashFormTool extends AuthenticatedMcpTool
diff --git a/api/app/Mcp/Tools/UpdateFormTool.php b/api/app/Mcp/Tools/UpdateFormTool.php
index c24cbc607..15e3df4c9 100644
--- a/api/app/Mcp/Tools/UpdateFormTool.php
+++ b/api/app/Mcp/Tools/UpdateFormTool.php
@@ -9,10 +9,14 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
+use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('update_form')]
#[Description('Replace the editable definition of an accessible form. Requires the revision value returned by get_form to prevent silent concurrent overwrites. This tool cannot publish or trash a form.')]
+#[IsReadOnly(false)]
+#[IsDestructive(false)]
#[IsOpenWorld(false)]
class UpdateFormTool extends AuthenticatedMcpTool
{
diff --git a/api/app/Mcp/Tools/ValidateFormDefinitionTool.php b/api/app/Mcp/Tools/ValidateFormDefinitionTool.php
index 75bd0eb72..a20f792e6 100644
--- a/api/app/Mcp/Tools/ValidateFormDefinitionTool.php
+++ b/api/app/Mcp/Tools/ValidateFormDefinitionTool.php
@@ -9,6 +9,7 @@ use Laravel\Mcp\Response;
use Laravel\Mcp\ResponseFactory;
use Laravel\Mcp\Server\Attributes\Description;
use Laravel\Mcp\Server\Attributes\Name;
+use Laravel\Mcp\Server\Tools\Annotations\IsDestructive;
use Laravel\Mcp\Server\Tools\Annotations\IsIdempotent;
use Laravel\Mcp\Server\Tools\Annotations\IsOpenWorld;
use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
@@ -16,6 +17,7 @@ use Laravel\Mcp\Server\Tools\Annotations\IsReadOnly;
#[Name('validate_form_definition')]
#[Description('Normalize and validate an OpnForm agent form definition without storing it. Returns the canonical definition with defaults, stable block IDs, sanitized content, and normalized aliases.')]
#[IsReadOnly]
+#[IsDestructive(false)]
#[IsIdempotent]
#[IsOpenWorld(false)]
class ValidateFormDefinitionTool extends GuestMcpTool
diff --git a/api/tests/Feature/Mcp/AgentPluginPackageTest.php b/api/tests/Feature/Mcp/AgentPluginPackageTest.php
index bd6dbb011..6e5435868 100644
--- a/api/tests/Feature/Mcp/AgentPluginPackageTest.php
+++ b/api/tests/Feature/Mcp/AgentPluginPackageTest.php
@@ -44,6 +44,7 @@ it('ships a valid native OpenAI plugin wrapper for the hosted MCP server', funct
$portable = readOpnformPluginJson('plugin.json');
$portableMcp = readOpnformPluginJson('mcp.json');
$native = readOpnformPluginJson('.codex-plugin/plugin.json');
+ $nativeApps = readOpnformPluginJson('.app.json');
$nativeMcp = readOpnformPluginJson('.mcp.json');
$nativePluginFields = [
'id', 'name', 'version', 'description', 'skills', 'apps', 'mcpServers',
@@ -58,7 +59,7 @@ it('ships a valid native OpenAI plugin wrapper for the hosted MCP server', funct
expect($native)
->toHaveKeys([
- 'name', 'version', 'description', 'author', 'skills', 'mcpServers', 'interface',
+ 'name', 'version', 'description', 'author', 'skills', 'apps', 'mcpServers', 'interface',
])
->and($native['name'])->toBe($portable['name'])
->and($native['version'])->toBe($portable['version'])
@@ -68,8 +69,8 @@ it('ships a valid native OpenAI plugin wrapper for the hosted MCP server', funct
->and($native['repository'])->toBe($portable['repository'])
->and(array_diff(array_keys($native), $nativePluginFields))->toBe([])
->and($native['skills'])->toBe('./skills/')
+ ->and($native['apps'])->toBe('./.app.json')
->and($native['mcpServers'])->toBe('./.mcp.json')
- ->and($native)->not->toHaveKey('apps')
->and($native['interface'])->toHaveKeys([
'displayName', 'shortDescription', 'longDescription', 'developerName',
'category', 'capabilities', 'websiteURL', 'privacyPolicyURL',
@@ -84,7 +85,13 @@ it('ships a valid native OpenAI plugin wrapper for the hosted MCP server', funct
'auth' => 'oauth',
])
->and(array_diff(array_keys($nativeMcp), ['mcpServers']))->toBe([])
- ->and(opnformPluginPath('.app.json'))->not->toBeFile();
+ ->and($nativeApps)->toBe([
+ 'apps' => [
+ 'opnform' => [
+ 'id' => 'plugin_asdk_app_6a86dddc8f6c8191b0cc91f3a2a76d19',
+ ],
+ ],
+ ]);
foreach ($native['interface']['defaultPrompt'] as $prompt) {
expect($prompt)->toBeString()
@@ -96,6 +103,7 @@ it('keeps every native manifest path relative to and inside the plugin package',
$native = readOpnformPluginJson('.codex-plugin/plugin.json');
$paths = [
$native['skills'],
+ $native['apps'],
$native['mcpServers'],
$native['interface']['composerIcon'],
$native['interface']['logo'],
@@ -170,7 +178,7 @@ it('declares the hosted OpnForm MCP dependency in native skill metadata', functi
);
});
-it('contains valid JSON and no local endpoints or fabricated ChatGPT app IDs', function () {
+it('contains valid JSON, no local endpoints, and only the registered ChatGPT app ID', function () {
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator(opnformPluginPath(), FilesystemIterator::SKIP_DOTS),
);
@@ -179,8 +187,11 @@ it('contains valid JSON and no local endpoints or fabricated ChatGPT app IDs', f
$contents = file_get_contents($file->getPathname());
expect($contents)
- ->not->toMatch('~https?://(?:localhost|127(?:\.\d+){3}|\[?::1\]?)(?::\d+)?~i')
- ->not->toContain('plugin_asdk_app');
+ ->not->toMatch('~https?://(?:localhost|127(?:\.\d+){3}|\[?::1\]?)(?::\d+)?~i');
+
+ if ($file->getFilename() !== '.app.json') {
+ expect($contents)->not->toContain('plugin_asdk_app');
+ }
if ($file->getExtension() === 'json') {
expect(fn () => json_decode($contents, true, flags: JSON_THROW_ON_ERROR))->not->toThrow(JsonException::class);
diff --git a/api/tests/Feature/Mcp/McpFoundationTest.php b/api/tests/Feature/Mcp/McpFoundationTest.php
index 7ad54b4f7..369c1253f 100644
--- a/api/tests/Feature/Mcp/McpFoundationTest.php
+++ b/api/tests/Feature/Mcp/McpFoundationTest.php
@@ -40,6 +40,77 @@ it('exposes the OpnForm MCP endpoint and initializes the protocol', function ()
});
});
+it('advertises explicit safety annotations for every MCP tool', function () {
+ $response = $this->postJson('/mcp', [
+ 'jsonrpc' => '2.0',
+ 'id' => 1,
+ 'method' => 'tools/list',
+ 'params' => [],
+ ], [
+ 'Accept' => 'application/json, text/event-stream',
+ ])->assertOk();
+
+ $actual = collect($response->json('result.tools'))
+ ->mapWithKeys(fn (array $tool): array => [
+ $tool['name'] => collect($tool['annotations'])->only([
+ 'readOnlyHint',
+ 'destructiveHint',
+ 'openWorldHint',
+ ])->all(),
+ ])
+ ->sortKeys()
+ ->all();
+
+ $readOnly = [
+ 'get_account_context',
+ 'get_form',
+ 'get_form_draft',
+ 'get_submission',
+ 'get_submission_export',
+ 'get_submission_stats',
+ 'get_workspace',
+ 'list_forms',
+ 'list_submissions',
+ 'list_workspaces',
+ 'validate_form_definition',
+ ];
+ $writes = [
+ 'create_form',
+ 'create_form_draft',
+ 'export_submissions',
+ 'open_form_draft_in_editor',
+ 'patch_form_draft',
+ 'preview_form_draft',
+ 'update_form',
+ ];
+
+ $expected = collect($readOnly)
+ ->mapWithKeys(fn (string $name): array => [$name => [
+ 'readOnlyHint' => true,
+ 'destructiveHint' => false,
+ 'openWorldHint' => false,
+ ]])
+ ->merge(collect($writes)->mapWithKeys(fn (string $name): array => [$name => [
+ 'readOnlyHint' => false,
+ 'destructiveHint' => false,
+ 'openWorldHint' => false,
+ ]]))
+ ->put('publish_form', [
+ 'readOnlyHint' => false,
+ 'destructiveHint' => false,
+ 'openWorldHint' => true,
+ ])
+ ->put('trash_form', [
+ 'readOnlyHint' => false,
+ 'destructiveHint' => true,
+ 'openWorldHint' => false,
+ ])
+ ->sortKeys()
+ ->all();
+
+ expect($actual)->toBe($expected);
+});
+
it('registers a permissive dedicated rate limiter for MCP traffic', function () {
$limits = RateLimiter::limiter('mcp')(request());
diff --git a/plugins/opnform/.app.json b/plugins/opnform/.app.json
new file mode 100644
index 000000000..446d0523b
--- /dev/null
+++ b/plugins/opnform/.app.json
@@ -0,0 +1,7 @@
+{
+ "apps": {
+ "opnform": {
+ "id": "plugin_asdk_app_6a86dddc8f6c8191b0cc91f3a2a76d19"
+ }
+ }
+}
diff --git a/plugins/opnform/.codex-plugin/plugin.json b/plugins/opnform/.codex-plugin/plugin.json
index 9c3e155f7..c224aab60 100644
--- a/plugins/opnform/.codex-plugin/plugin.json
+++ b/plugins/opnform/.codex-plugin/plugin.json
@@ -17,6 +17,7 @@
"no-code"
],
"skills": "./skills/",
+ "apps": "./.app.json",
"mcpServers": "./.mcp.json",
"interface": {
"displayName": "OpnForm",
@@ -38,7 +39,7 @@
"Update my form, then ask me before publishing it."
],
"brandColor": "#2563EB",
- "composerIcon": "./assets/logo.svg",
- "logo": "./assets/logo.svg"
+ "composerIcon": "./assets/logo.png",
+ "logo": "./assets/logo.png"
}
}
diff --git a/plugins/opnform/README.md b/plugins/opnform/README.md
index 36781a7ff..c12d3dd82 100644
--- a/plugins/opnform/README.md
+++ b/plugins/opnform/README.md
@@ -5,22 +5,15 @@ This directory is the installable OpnForm plugin package. It contains both the p
## Package formats
- `plugin.json`, `mcp.json`, and `skills/opnform/SKILL.md` are the portable [agent-plugins.org](https://agent-plugins.org) package.
-- `.codex-plugin/plugin.json` and `.mcp.json` let Codex load the hosted OpnForm MCP server directly.
+- `.codex-plugin/plugin.json`, `.app.json`, and `.mcp.json` connect the native OpenAI plugin to the registered ChatGPT app and let Codex load the hosted MCP server directly.
Both integrations use `https://api.opnform.com/mcp`. They contain no credentials or environment-specific endpoint.
-## Remaining ChatGPT publication step
+## Registered ChatGPT app
-ChatGPT public distribution uses a registered MCP connection rather than the direct Codex MCP declaration. Before submitting the plugin to the public directory:
+The production MCP connection is registered in ChatGPT Developer Mode as `OpnForm MCP`. The real app ID is stored in `.app.json`; do not replace it with a placeholder or an ID from a local development connection.
-1. Enable Developer mode in ChatGPT.
-2. Register `https://api.opnform.com/mcp` from the ChatGPT Plugins page.
-3. Copy the technical app ID that ChatGPT creates.
-4. Add `.app.json` with that real registered app mapping.
-5. Add `"apps": "./.app.json"` to `.codex-plugin/plugin.json`.
-6. Re-run the package validators and test the installed plugin in a new conversation.
-
-Do not add `.app.json` before the real registered app ID is available. A fabricated identifier makes the package look publishable while leaving the ChatGPT integration unusable.
+Public directory submission still uses the production MCP URL directly. The registered app mapping is the compatibility wrapper used by the installable ChatGPT/Codex package.
## Local installation
diff --git a/plugins/opnform/assets/logo.png b/plugins/opnform/assets/logo.png
new file mode 100644
index 000000000..cc6c989f5
Binary files /dev/null and b/plugins/opnform/assets/logo.png differ
diff --git a/plugins/opnform/assets/logo.svg b/plugins/opnform/assets/logo.svg
index 00a0be906..936102f6a 100644
--- a/plugins/opnform/assets/logo.svg
+++ b/plugins/opnform/assets/logo.svg
@@ -1,7 +1,8 @@
-<svg fill="none" height="120" viewBox="0 0 120 120" width="120" xmlns="http://www.w3.org/2000/svg">
+<svg fill="none" height="150" viewBox="-15 -15 150 150" width="150" xmlns="http://www.w3.org/2000/svg">
<linearGradient id="opnform-gradient" gradientUnits="userSpaceOnUse" x1="60" x2="60" y1="2" y2="118.352">
<stop offset="0" stop-color="#2563eb"/>
<stop offset="1" stop-color="#60a5fa"/>
</linearGradient>
+ <rect fill="#fff" height="150" width="150" x="-15" y="-15"/>
<path clip-rule="evenodd" d="m80.6502 118.352c22.9638-8.418 39.3498-30.4712 39.3498-56.352 0-33.1371-26.8629-60-60-60s-60 26.8629-60 60c0 25.8808 16.3862 47.934 39.3498 56.352l16.631-38.9411c-7.4746-1.9924-12.9808-8.8086-12.9808-16.9109 0-9.665 7.835-17.5 17.5-17.5s17.5 7.835 17.5 17.5c0 8.4269-5.9563 15.4627-13.8885 17.1269z" fill="url(#opnform-gradient)" fill-rule="evenodd"/>
</svg>