Skip to main content
Glama

从回收站恢复

gwl_restore_document

Restores a soft-deleted document from the recycle bin using its document ID and returns the restored document details.

Instructions

把软删除的文档从回收站恢复回来。 文档不在回收站 400;无权恢复 403。恢复后返回文档详情(msg=恢复成功)。

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_restore_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

A3.5/5.0
Behavior3/5

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

The annotations already declare a non-read-only, non-destructive, open-world write, and the description adds real value beyond them by documenting the two failure modes (400/403) and the post-restore return. It does not address reversibility, whether restoring consumes quota, or any side effects on revisions, so the gain is genuine but partial.

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?

Three short, front-loaded sentences: the action is first, then the error contracts, then the success behavior. Slightly wasteful to restate the return payload (msg=恢复成功) when an output schema already exists, but nothing else is padded.

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?

With one documented parameter and an output schema, the description only needs to cover preconditions and failure modes, and it does both with concrete status codes. The remaining gap is around side effects and follow-up verification, which is minor for a single-parameter restore tool.

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% and the single doc_id parameter is already documented in the schema as a path parameter with a minimum of 1. The description adds no additional meaning about the identifier, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource (恢复/recover a document) plus the scope (软删除 from 回收站/trash), which lets an agent tell it apart from gwl_delete_document and gwl_list_trash. It stops short of naming a sibling or a contrasting case explicitly, so it lands just under a top score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Preconditions are implied by the error contracts (400 if the document is not in the trash, 403 if permission is missing), which tells the agent the necessary prior state. However, it never states when to call this rather than alternatives such as gwl_restore_document_revision, nor how to verify the document is actually in the trash first.

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