Skip to main content
Glama

ig_delete_media

Remove Instagram posts, carousels, reels, or stories permanently using the Instagram Graph API. This irreversible action requires instagram_manage_contents permission.

Instructions

Delete an Instagram media post (posts, carousels, reels, stories). This action is irreversible. Requires instagram_manage_contents permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
media_idYesMedia ID to delete

Implementation Reference

  • The `ig_delete_media` tool is registered and implemented within `src/tools/instagram/media.ts` using the `server.tool` method. It takes a `media_id` input and performs a DELETE request to the Instagram graph API.
    // ─── ig_delete_media ─────────────────────────────────────────
    server.tool(
      "ig_delete_media",
      "Delete an Instagram media post (posts, carousels, reels, stories). This action is irreversible. Requires instagram_manage_contents permission.",
      {
        media_id: z.string().describe("Media ID to delete"),
      },
      async ({ media_id }) => {
        try {
          const { data, rateLimit } = await client.ig("DELETE", `/${media_id}`);
          return { content: [{ type: "text", text: JSON.stringify({ success: true, ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Delete media failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states the action is 'irreversible' (critical destructive behavior) and specifies the required permission 'instagram_manage_contents' (authorization requirement). This provides essential behavioral context beyond what the input schema alone would convey.

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?

The description is perfectly concise with two sentences that each earn their place. The first sentence states the purpose and scope, the second provides critical behavioral warnings and requirements. There's zero wasted language and the most important information (irreversible action) is front-loaded.

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 destructive mutation tool with no annotations and no output schema, the description does an excellent job covering the essential context: purpose, scope, irreversible nature, and permission requirements. The only minor gap is lack of information about return values or error conditions, but given the tool's straightforward nature, this is a relatively complete description.

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?

The input schema has 100% description coverage with the media_id parameter clearly documented. The description doesn't add any additional parameter semantics beyond what's in the schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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 specific action ('Delete') and resource ('Instagram media post'), with explicit scope covering multiple media types (posts, carousels, reels, stories). It distinguishes from siblings like ig_delete_comment (different resource) and ig_get_media (read vs. destructive operation).

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 provides clear context about when to use (to delete Instagram media) and mentions a prerequisite permission (instagram_manage_contents). However, it doesn't explicitly state when NOT to use this tool or name specific alternatives among the many sibling tools, such as distinguishing from ig_hide_comment or threads_delete_post.

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/mikusnuz/meta-mcp'

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