Skip to main content
Glama

delete_concept

Destructive

Delete a concept file with a safety-first dry-run that previews backlinks, refuses deletion while references exist, and supports force removal or mtime conflict guard.

Instructions

⚠ DESTRUCTIVE — permanently deletes the vault .md file. Two-stage safety: Both preview and confirmed responses identify the node by permanent uid plus current slug. 1. Without confirm: true the call is a dry-run — returns a backlinks preview without deleting. 2. If any backlinks exist the call throws — refuses while other nodes still reference this slug. Pass force: true to delete anyway (the referrers become dangling). Successful deletion returns the frontmatter + body so a user who deleted by mistake can recreate the node via add_concept. Directories are left untouched. Pass expected_mtime to guard against concurrent external edits — throws if the file changed on disk since you read it. Confirmed deletes return compact postWriteMaintenance (maintenance_plan) with count-safe byPhase / bySeverity / byKind queue buckets, action score, executable proposedAction, and current-page nextExecutableAction / nextReviewAction pointers for the final graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesVault-relative slug (omit the .md extension).
forceNoDelete even when backlinks exist (referrers become dangling). Defaults to false.
confirmNoActually delete when true. Omit or false for a dry-run (backlinks preview, no delete).
expected_mtimeNoOptional conflict guard — file mtimeMs at read time. If it differs at delete time, the call throws.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
uidYes
slugYes
dryRunYes
forcedNo
changedNo
messageNo
capturedNo
filePathYes
backlinksNo
canConfirmYesTrue only when repeating the call with confirm:true can perform the previewed change without another explicit safety opt-in.
wouldChangeYesTrue only when the dry-run predicts a disk or Git change.
previewReadyYesTrue only when this response is a complete dry-run preview that an agent can review.
blockedReasonsYesMachine-readable human explanations for every condition currently blocking confirmation.
backlinksAtDeleteNo
postWriteMaintenanceNoCompact maintenance_plan summary for post-write follow-up. Bucket maps describe the remaining queue after the write.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.13.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only supply destructiveHint=true, but the description adds substantial behavioral detail: permanent file deletion, dry-run without confirm, refusal when backlinks exist, dangling referrers with force, exception on mtime mismatch, directories left untouched, and a return payload that enables recovery. Nothing in the description contradicts the annotations.

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 description is front-loaded with an explicit danger warning and organized into a numbered two-stage safety flow. It is dense and scannable; however, the lengthy postWriteMaintenance detail is likely redundant given that an output schema exists, so it could be trimmed without losing essential guidance.

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-conditional delete operation, the description covers the full call flow: prerequisites, dry-run vs. confirmed behavior, failure modes, force escalation, concurrency protection, side effects, and recovery. The output schema provides the structured return contract, so the description is complete enough for an agent to invoke the tool correctly.

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

Parameters5/5

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

Although the schema already documents all parameters, the description enriches them with conditional semantics: confirm controls whether deletion actually happens, force deliberately overrides the backlink safety check, and expected_mtime throws if the file changed. It also clarifies the dry-run default, which is not obvious from the schema alone.

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 opens with 'DESTRUCTIVE — permanently deletes the vault .md file', giving a specific verb, resource, and consequence. It clearly distinguishes deletion from sibling mutation tools like patch_concept or rename_concept by detailing the two-stage dry-run/confirm flow and the effect on backlinks.

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 strong usage context: omit confirm for a dry-run, pass force to override backlink refusals, and pass expected_mtime to guard against concurrent edits. It even points to add_concept as a recovery path)Skip does not explicitly contrast when to choose delete_concept over related siblings such as patch_concept or reclassify_concept, so it stops short of a 5.

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