Skip to main content
Glama

删除文档(软删除)

gwl_delete_document
DestructiveIdempotent

Move a document to the recycle bin for recoverable soft deletion, requiring author or authorized access; permanent deletion is not available.

Instructions

把文档移入回收站(软删除,可用 gwl_restore_document 恢复)。 仅作者或被授权者,否则 403;已经是回收站状态则 404。 不可恢复的永久删除接口本服务刻意不提供。

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": {
      "doc_id": "<doc_id>"
    },
    "name": "gwl_delete_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idYes文档 id(路径参数)。

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructive=true, readOnly=false, idempotent=true; the description goes further by specifying the destruction is reversible (moved to trash), the authorization requirement with its 403 code, the 404 behavior on repeated calls, and the deliberate absence of an irreversible delete endpoint. That is exactly the extra context annotations cannot convey.

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?

Three compact sentences that front-load the core action (move to trash) before the recovery path, permissions, and error codes. No filler or repetition of the title.

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 single-parameter mutation tool with an output schema and full annotations, the description covers the essential unknowns: reversibility, authorization, error outcomes, and the intentional lack of permanent deletion. Nothing an agent needs before calling is missing.

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?

Only one parameter, and the schema itself describes doc_id as an integer path parameter at 100% coverage. The description adds no further semantics about the id, so the baseline 3 for schema-complete parameters applies.

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?

Specific verb + resource: "把文档移入回收站(软删除)" states exactly what happens and how it differs from permanent deletion. It explicitly names the sibling gwl_restore_document as the undo path, so an agent can distinguish this from restore without reading 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?

States the prerequisites (only the author or an authorized user, otherwise 403), the guard condition (already in trash returns 404), the undo alternative (gwl_restore_document), and the non-existence of a permanent-delete tool. When-to-use and when-it-fails are both spelled out.

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