Skip to main content
Glama

postiz_delete_post_group

Delete an entire cross-post group in one API call. Use to retract all posts within a cross-post unit. Requires confirmation parameter set to true.

Instructions

Delete every post in a group (cross-post unit) via DELETE /api/posts/group/{group}. Use when you want to retract a whole cross-post in one call. Requires enableWrite + enableDelete + confirm=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
groupYes
confirmYesMust be true. Removes every post in the group.

Implementation Reference

  • The main handler factory 'createDeletePostGroupTool' that defines the tool name, parameters, and execute function. The execute function validates the delete gate, confirms the action, calls client.deletePostGroup(), and returns results with error handling for 404.
    export function createDeletePostGroupTool(
      getClient: () => PostizClient,
      config: PostizPluginConfig,
    ) {
      return {
        name: "postiz_delete_post_group",
        label: "postiz: delete post group",
        description:
          "Delete every post in a group (cross-post unit) via DELETE /api/posts/group/{group}. Use when you want to retract a whole cross-post in one call. Requires enableWrite + enableDelete + confirm=true.",
        parameters: Schema,
        execute: async (_id: string, raw: Record<string, unknown>) => {
          requireDeleteGate(config, "postiz_delete_post_group");
          const { group, confirm } = raw as { group: string; confirm: boolean };
          requireConfirm("postiz_delete_post_group", confirm);
          const client = getClient();
          try {
            const res = await client.deletePostGroup(group);
            return jsonToolResult(
              withRate(client, {
                ok: true,
                action: "delete_post_group",
                group,
                response: res,
              }),
            );
          } catch (err) {
            if (err instanceof PostizApiError && err.status === 404) {
              return jsonToolResult(
                withRate(client, {
                  ok: false,
                  action: "delete_post_group",
                  group,
                  reason: "not_found",
                  message: "Group not found. May have already been deleted.",
                }),
              );
            }
            throw err;
          }
        },
      };
    }
  • The input schema defining 'group' (string) and 'confirm' (boolean) parameters for the tool.
    const Schema = Type.Object(
      {
        group: Type.String({ description: "Group id (cross-post unit) to delete." }),
        confirm: Type.Boolean({
          description:
            "Must be true. Deletes EVERY post in the group across every integration. Already-published platform posts remain live; only Postiz records are removed.",
        }),
      },
      { additionalProperties: false },
    );
  • mcp-server.ts:232-235 (registration)
    Registration of the tool in the MCP server via bind() call, mapping group and confirm parameters.
    bind(server, createDeletePostGroupTool(getClient, config), {
      group: z.string(),
      confirm: z.boolean().describe("Must be true. Removes every post in the group."),
    });
  • index.ts:80-82 (registration)
    Registration of the tool in the agent API via api.registerTool().
    api.registerTool(
      createDeletePostGroupTool(getClient, config) as AnyAgentTool,
    );
  • The HTTP client method 'deletePostGroup' that calls DELETE /api/public/v1/posts/group/{group}.
    /** DELETE /api/public/v1/posts/group/{group} (newer Postiz builds) */
    async deletePostGroup(group: string): Promise<Record<string, unknown>> {
      if (!isSafeId(group)) {
        throw new Error(`Invalid group id: ${group}`);
      }
      return this.request<Record<string, unknown>>(
        `/api/public/v1/posts/group/${group}`,
        { method: "DELETE" },
      );
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description discloses key behaviors: the HTTP method, the API path, required permissions (enableWrite, enableDelete), and the mandatory confirm=true for deletion. This adequately informs the agent of the tool's safety profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences cover purpose, usage, permissions, and requirements. No unnecessary words. Key information is front-loaded in the first sentence.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a delete endpoint with no output schema, the description covers all essential aspects: what it does, when to use it, required permissions, and the mandatory confirm flag. It lacks mention of response format or error handling, which is acceptable for a simple deletion tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 50% (only confirm has a description). The description adds context for 'group' as a cross-post unit, but does not elaborate on its format or how to obtain it. The confirm parameter is already well-documented in the schema, so the description adds minimal value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action: 'Delete every post in a group (cross-post unit)'. It specifies the HTTP method and endpoint, and distinguishes from sibling tool postiz_delete_post by emphasizing it deletes a whole cross-post group.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says when to use: 'Use when you want to retract a whole cross-post in one call.' It does not explicitly state when not to use, but the sibling list provides an alternative for single posts, so the guidance is clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/solomonneas/postiz-mcp'

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