Skip to main content
Glama

content-delete-generation

Remove a generation and its artifacts from a session to manage content and maintain organization.

Instructions

Delete a generation and all its artifacts from a session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesGeneration ID to delete
sessionIdYesSession ID that owns the generation

Implementation Reference

  • The handler function for the 'content-delete-generation' tool, which performs a DELETE request to remove a generation.
    async (params) => {
      try {
        // SDK doesn't pass sessionId as query param — use underlying HTTP client
        const httpClient = (client.content as any).httpClient;
        const result = await httpClient.request(
          `/content/generations/${encodeURIComponent(params.id)}`,
          { method: "DELETE", query: { sessionId: params.sessionId } },
        );
        return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] };
      } catch (err) {
        const message = err instanceof Error ? err.message : String(err);
        return { content: [{ type: "text", text: `Error: ${message}` }], isError: true };
      }
  • Registration of the 'content-delete-generation' tool, including its schema definition.
    server.tool(
      "content-delete-generation",
      "Delete a generation and all its artifacts from a session.",
      {
        id: z.string().describe("Generation ID to delete"),
        sessionId: z.string().describe("Session ID that owns the generation"),
      },

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/ebenezer-isaac/llmconveyors-mcp'

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