Skip to main content
Glama

Delete document

delete

Permanently remove a specification document from SpecMgr by id and type, removing flat markdown files or feature folders. Returns the removed path.

Instructions

Permanently delete an existing document from disk across the whole-body domains (type is one of req, uc, tsk, qa, prb, gol, rsk, dec, sop, feat, vcr, sysrs; adr is not supported). Resolves the document by id, takes the domain lock, and removes it: the single *.md file for every flat domain (every whole-body domain except feat), or the entire <base>/<id>/ folder for feat. Returns the deleted path as a string. An invalid id (path-injection attempt or wrong format) is a ValueError raised before any file access; a missing document is the domain's own XNotFoundError; an I/O failure is a DeleteError. This is the sole delete entry point -- the former per-domain delete_<d> tools are removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
typeYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.36.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the domain lock acquisition, destructive permanence, the differing removal semantics for flat vs. feat domains, and three distinct error classes (ValueError raised before any file access, XNotFoundError, DeleteError). That is unusually rich behavioral context for a mutation tool.

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?

Dense but front-loaded: the destructive action and scope come first, then resolution mechanics, then error taxonomy. Every clause carries information, though the parenthetical enum recital partially duplicates the schema enum and could be trimmed.

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 two-parameter tool with no annotations, the description covers what gets destroyed, how lookup and locking work, the return value, and all failure modes. With an output schema present, it need not expand further on response shape.

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?

Schema description coverage is 0%, so the description must compensate, and it does: it enumerates the accepted type values, explicitly excludes `adr`, and explains that `id` is resolved with validation against path-injection and wrong formats before file access. Both parameters gain meaning beyond the bare enum and string type.

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?

States a specific verb and resource ('Permanently delete an existing document') plus the domains it applies to and the exact filesystem effect (single .md file vs. whole <base>/<id>/ folder). An agent can distinguish this from the many create_/get_/list_/parse_ siblings 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 Guidelines4/5

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

Explicitly frames itself as 'the sole delete entry point -- the former per-domain delete_<d> tools are removed', which resolves routing against siblings. There is no when-not-to-use guidance, but since no alternative delete path exists there is nothing to disambiguate further.

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