Skip to main content
Glama

Delete an Image Source or Its Images

delete_image_source
Destructive

PERMANENTLY delete an image source together with every image built from it, or — when image_ids are given — only those images while keeping the source. IRREVERSIBLE.

Two-step: call without confirm to get a preview, show it to the user, and only after they approve this exact deletion call again with the same image_ids and confirm set to the preview's confirm_token.

An image a container is currently running on cannot be deleted; the preview lists such containers as a blocker. Stack builds do not use image sources, so this tool never touches a stack's images — use delete_stack for those.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source": "<source>"
    },
    "name": "delete_image_source"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesImage source: name, identifier, resource path ('image-source:...'), or 24-char hex ID. With confirm, the hex ID from the preview.
confirmNoThe confirm_token from the preview; performs the deletion it described. Omit to preview.
contextNoWhy are you calling this tool? Briefly describe the user's goal.
image_idsNoDelete only these images (24-char hex IDs from list_image_sources) and keep the source. Omit to delete the source and all its images.
wait_secondsNoconfirm only: max seconds to wait for the delete job(s) (default 60). 0 returns after they are accepted.
conversation_idNoConversation tracking id. Omit on your first tool call; every result then includes a conversation_id line — pass that exact value on all later calls in this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / confirm / description
      Previous value: -"Set true ONLY after the user has explicitly approved this exact deletion from the preview."New value: +"The confirm_token from the preview; performs the deletion it described. Omit to preview."
    • changedInput schema / properties / confirm / type
      Previous value: -"boolean"New value: +"string"
    • changedInput schema / properties / source / description
      Previous value: -"Image source: name, identifier, resource path ('image-source:...'), or 24-char hex ID. With confirm:true it MUST be the hex ID from the preview."New value: +"Image source: name, identifier, resource path ('image-source:...'), or 24-char hex ID. With confirm, the hex ID from the preview."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds the parts annotations cannot express: irreversibility, the preview-then-confirm approval handshake, and the runtime-container blocker surfaced in the preview. This is exactly the extra context a destructive tool needs beyond its hints.

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?

Front-loaded with the irreversible action in the first sentence, then a short procedural paragraph, then edge-case exclusions. Every sentence carries distinct information; no filler or restatement of the title.

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

Completeness5/5

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

For a destructive, multi-mode tool with no output schema, the description covers the safety protocol, the approval workflow, failure blockers, and the sibling alternative. Nothing an agent needs in order to invoke this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns more by explaining coupling the schema leaves implicit — that the second call must reuse the same image_ids and that confirm must carry the preview's confirm_token. It does not explain wait_seconds or context, but those are adequately self-documented in 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?

Opens with a specific verb and resource in caps: 'PERMANENTLY delete an image source together with every image built from it', and immediately names the second mode ('when image_ids are given — only those images while keeping the source'). An agent can distinguish both behaviors without opening the schema.

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

Usage Guidelines5/5

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

Explicitly prescribes the two-step protocol (call without confirm to preview, show the user, then call again with the same image_ids and the preview's confirm_token) and states an exclusion rule ('An image a container is currently running on cannot be deleted'). It also routes the stack case to a named sibling: 'this tool never touches a stack's images — use delete_stack for those.'

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources