Skip to main content
Glama

Delete a commit

delete_commit
Destructive

Destructive and irreversible. Deletes a commit's data, build image, or both (by job_id). keep_data and keep_image default to false: both resources are removed and the deployment disappears from list_deployments. keep_image=true stops the release and removes its disk copy and logs, keeping the commit deployable from its image. keep_data=true removes only the build image; stop the release first, including sleeping releases. Either single-resource choice keeps the commit in the timeline. Refuses the canonical commit and both keep options together. Main volumes and their restore points are kept. Space with dependent copies is freed after the next promote cleanup; image storage is reclaimed by registry cleanup. Starting or redeploying a commit whose image was removed rebuilds it; rebuild before promoting. Requires a read-write token.

Input Schema

NameRequiredDescriptionDefault
job_idYesthe deployment job id to delete (from list_deployments); the canonical commit is refused
keep_dataNokeep the commit's disk copy and logs; defaults to false
keep_imageNokeep the build image; defaults to false

Output Schema

NameRequiredDescriptionDefault
okYes
statusNopresent, and always "pending_approval", only when this call was parked instead of run immediately because the project's (or kad-back's own) plan-mode setting requires a human to approve it first
messageYes
plan_idNopoll get_plan_status with this id for the eventual outcome
approve_atNothe kad.dev dashboard URL a human approves or rejects this plan from
expires_in_sNothe plan can no longer be approved after this many seconds

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, but the description goes well beyond them: what resources are destroyed, that the deployment disappears from list_deployments, that the commit stays in the timeline, delayed space reclamation via promote/registry cleanup, rebuild-on-next-deploy behavior, and the read-write token requirement.

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

Conciseness4/5

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

The critical 'destructive and irreversible' warning is front-loaded and nearly every sentence carries behavioral information. However, it is one dense unbroken paragraph with a couple of hard-to-parse clauses (the keep_image/stop-release sentence mixes kept and removed resources), which slows scanning of a destructive tool.

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 3-parameter tool with an output schema already present, this covers everything an agent needs: prerequisites, refusals, side effects, deferred storage reclamation, and recovery paths. No material gap remains.

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 would be 3, but the description adds genuine meaning the schema lacks — notably the counterintuitive consequence that keep_data=true removes only the build image, and that either single-resource choice preserves the commit in the timeline. It does not state defaults as clearly as the schema, but it is still additive.

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 plus a safety qualifier ('Destructive and irreversible. Deletes a commit's data, build image, or both (by job_id)'). The scope is precise enough to separate it from siblings like stop_commit, demote_commit, and rollback_commit without consulting their schemas.

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 states when to choose each mode: keep_image for keeping the commit deployable, keep_data for removing only the build image, and the prerequisite 'stop the release first, including sleeping releases'. It also names the hard exclusions ('Refuses the canonical commit and both keep options together'), which is exactly the when-not guidance an agent needs.

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