Skip to main content
Glama

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
NameRequiredDescriptionDefault
idYesThe 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,
          };
        }
      }
    );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andrianthan/magic-hour-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server