Skip to main content
Glama

delete_document

DestructiveIdempotent

Delete a report published with add_document, removing its file and Kavita entry after the next scan. Only reports can be deleted; books from other libraries are never removed.

Instructions

Delete a report published with add_document: its file and, after Kavita's next scan, its Kavita entry. Only reports can be deleted, never books from other libraries.

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": {
      "series_id": "<series_id>",
      "confirm": "<confirm>"
    },
    "name": "delete_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesMust be true: deleting removes the book file
scan_nowNoAsk Kavita to scan the Reports library now (seconds) instead of waiting for its folder watcher (about 6 minutes). Needs an admin Kavita key.
series_idYesKavita series ID (from list_library, search or add_document)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description earns credit for adding genuinely new behavior: the Kavita entry disappears only after the next scan, not immediately, and the blast radius is limited to reports. It stops short of stating whether the deletion is permanent or recoverable (no undo/trash), which matters most 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.

Conciseness5/5

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

A single tightly packed sentence with the destructive effect front-loaded and the scope restriction trailing as a guardrail. Every clause carries information: what is deleted, when the entry vanishes, and what is off-limits.

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

Completeness4/5

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

For a destructive three-parameter tool with no output schema, the description plus annotations plus a fully documented schema cover the essentials: effect, timing, and scope. The main residual gap is failure/irreversibility behavior, which an agent calling a delete tool would benefit from knowing.

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

Parameters3/5

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

Schema description coverage is 100%, so confirm, scan_now and series_id are already fully documented in the schema, and the description adds no parameter-level meaning beyond alluding to the delayed scan. Baseline 3 is appropriate when the schema carries the parameter burden.

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 names a specific verb and resource ('Delete a report published with add_document') and immediately enumerates what is removed: the file and, later, the Kavita entry. It also scopes the tool negatively ('Only reports can be deleted, never books from other libraries'), which separates it from any general deletion expectation an agent might have.

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?

Usage context is explicit: this is the tool for artifacts created via add_document, and the restriction to reports (not other libraries' books) tells the agent when not to reach for it. No alternative tool is named, but the sibling set contains no other delete tool, so there is little ambiguity left to resolve.

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