Skip to main content
Glama

Delete document

delete

Permanently remove a specification document from disk by id and type, taking the domain lock and returning the removed path. Optionally target a single language variant.

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, txt; 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. The optional language parameter (default 'en', feat-197-i18n) selects the language variant to delete: omitted/'en' = the flat default-language document, exactly the default behavior; a non-default ISO 639-1-shaped lowercase two-letter code (e.g. 'de') = that language's variant at docs//{language}/ (found by id-scan of that subdirectory), deleting that variant file ONLY -- the EN file stays untouched. Every whole-body type except feat supports a non-default language; for feat (always English) a non-default language raises a ValueError, as does a malformed language or one with no packaged heading-mapping table -- all raised before any file access.

Input Schema

NameRequiredDescriptionDefault
idYes
typeYes
languageNoen

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.38.0
    • addedInput schema / properties / language
      Added value: +{
      +  "default": "en",
      +  "title": "Language",
      +  "type": "string"
      +}
    • changedInput schema / properties / type / enum
      Previous value: -[
      -  "req",
      -  "uc",
      -  "tsk",
      -  "qa",
      -  "prb",
      -  "gol",
      -  "rsk",
      -  "dec",
      -  "sop",
      -  "feat",
      -  "vcr",
      -  "sysrs"
      -]New value: +[
      +  "req",
      +  "uc",
      +  "tsk",
      +  "qa",
      +  "prb",
      +  "gol",
      +  "rsk",
      +  "dec",
      +  "sop",
      +  "feat",
      +  "vcr",
      +  "sysrs",
      +  "txt"
      +]
  2. 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 permanence, that a domain lock is taken, that a single file vs an entire folder (`feat`) is removed, the language-variant scoping (only that variant file, EN untouched), and the exact error taxonomy (ValueError before file access, XNotFoundError, DeleteError). This is unusually rich behavioral context for a destructive operation.

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?

Front-loaded with the core action, then organized into resolution, deletion mechanics, and error/language behavior. It is long and the language paragraph is dense, but nearly every clause adds decision-relevant information; a slight trim would sharpen it.

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?

Given a destructive, unannotated 3-parameter tool, the description covers mechanics, scope, return value, and failure modes thoroughly. The note that it 'Returns the deleted path as a string' mildly duplicates the output schema but is harmless, and nothing an agent needs to call it safely is missing.

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 coverage is 0% and the description fully compensates: it explains `id` resolution and its invalid-format/path-injection failure, expands on the `type` enum including the `adr` exclusion and `feat`'s folder semantics, and gives precise meaning for `language` (default 'en', ISO 639-1 lowercase shape, per-language subdirectory, malformed or unsupported code raises ValueError).

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 from disk'), enumerates the valid `type` values, and explicitly excludes `adr`. An agent can distinguish this from create_*/get_*/edit/update siblings without opening any 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 declares itself 'the sole delete entry point -- the former per-domain `delete_<d>` tools are removed', which routes the agent away from nonexistent alternatives. It lacks an explicit statement of when deletion is inappropriate versus e.g. `edit` or `set_status`, so it falls short of full when/when-not guidance.

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

Deploy Server

Other Tools