Skip to content

Open source CapCut alternative.

TypeScript

fix(chatgpt): mark import_media open-world and edit_project destructive

David Leee47b8a16ec1
diff --git a/site/src/clients/chatgpt/server/mcp.test.ts b/site/src/clients/chatgpt/server/mcp.test.ts
index ccb8c748..d7ae726f 100644
--- a/site/src/clients/chatgpt/server/mcp.test.ts
+++ b/site/src/clients/chatgpt/server/mcp.test.ts
@@ -106,9 +106,15 @@ describe("ChatGPT MCP protocol", () => {
expect(tools.find((tool) => tool.name === "import_media")?._meta).toMatchObject({
"openai/fileParams": ["files"],
});
- expect(tools.find((tool) => tool.name === "edit_project")?.annotations).toMatchObject({
+ expect(tools.find((tool) => tool.name === "import_media")?.annotations).toMatchObject({
readOnlyHint: false,
destructiveHint: false,
+ openWorldHint: true,
+ });
+ expect(tools.find((tool) => tool.name === "edit_project")?.annotations).toMatchObject({
+ readOnlyHint: false,
+ destructiveHint: true,
+ openWorldHint: false,
});
expect(
tools.find((tool) => tool.name === "render_preview")?.annotations,
diff --git a/site/src/clients/chatgpt/server/mcp.ts b/site/src/clients/chatgpt/server/mcp.ts
index 89d14ec7..0d972ae1 100644
--- a/site/src/clients/chatgpt/server/mcp.ts
+++ b/site/src/clients/chatgpt/server/mcp.ts
@@ -254,7 +254,7 @@ export function createChatgptServer(
audio_only: z.boolean().optional(),
}),
outputSchema: viewSchema,
- annotations: editAnnotations,
+ annotations: { ...editAnnotations, openWorldHint: true },
_meta: { ...editMetadata, "openai/fileParams": ["files"], ...status("Importing footage", "Footage imported") },
},
({ projectId, files, urls, audio_only }) =>
@@ -375,7 +375,7 @@ export function createChatgptServer(
label: z.string().max(80).optional().describe("What this step does, e.g. \"Cut to 30s and add captions\""),
}),
outputSchema: viewSchema,
- annotations: editAnnotations,
+ annotations: { ...editAnnotations, destructiveHint: true },
_meta: { ...editMetadata, ...status("Editing the project", "Project edited") },
},
({ projectId, commands, label }) =>