delete_image_project
Remove an image project from the Magic Hour MCP Server to manage media content and free up resources.
Instructions
Delete an image project.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The image project ID to delete |
Implementation Reference
- src/index.ts:631-660 (registration)Complete registration of the 'delete_image_project' tool using server.tool(). Includes the schema definition (line 637 using zod) and the handler function (lines 639-658) that calls client.v1.imageProjects.delete({ id }) to delete an image project by ID. The handler includes try-catch error handling and returns success/error messages in the MCP response format.
// ── Delete Image Project ───────────────────────────────────────────────────── server.tool( "delete_image_project", "Delete an image project.", { id: z.string().describe("The image project ID to delete"), }, async ({ id }) => { try { await client.v1.imageProjects.delete({ id }); return { content: [ { type: "text" as const, text: `Image project ${id} deleted.`, }, ], }; } catch (error: any) { return { content: [ { type: "text" as const, text: `Error: ${error.message}` }, ], isError: true, }; } } );