Delete Asset
delete_assetRemove assets from ElmapiCMS by specifying their UUID to manage content storage and organization.
Instructions
Delete an asset by UUID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uuid | Yes | The asset UUID |
Implementation Reference
- src/tools/assets.ts:108-120 (handler)The delete_asset tool handler that accepts a UUID parameter and calls client.delete() to remove the asset from the API, returning the result as JSON.
// ── delete_asset ────────────────────────────────────────────────── server.registerTool("delete_asset", { title: "Delete Asset", description: "Delete an asset by UUID", inputSchema: { uuid: z.string().describe("The asset UUID"), }, }, async ({ uuid }) => { const result = await client.delete(`/files/${uuid}`); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }); - src/tools/assets.ts:109-114 (schema)Schema definition for delete_asset tool including title, description, and inputSchema with a single 'uuid' string parameter.
server.registerTool("delete_asset", { title: "Delete Asset", description: "Delete an asset by UUID", inputSchema: { uuid: z.string().describe("The asset UUID"), }, - src/tools/assets.ts:109-109 (registration)Registration of the delete_asset tool with the MCP server using server.registerTool().
server.registerTool("delete_asset", { - src/client.ts:134-142 (helper)The ElmapiClient.delete() method that performs the actual HTTP DELETE request to the API endpoint.
async delete(path: string, body?: unknown): Promise<unknown> { const response = await fetch(`${this.baseUrl}${path}`, { method: "DELETE", headers: this.headers(), body: body ? JSON.stringify(body) : undefined, }); return this.handleResponse(response); }