Skip to main content
Glama

Restore deleted document

lnkdrp_restore_doc
Idempotent

Brings back a document deleted with lnkdrp_delete_doc (or in the app), within 30 days of the delete. It reappears in the workspace with its file, versions, links and analytics, and every share link works again with the settings it had (a document that was archived or switched off when it was deleted comes back that way). Tags it had are not restored. Takes the docId: a deleted document is not listed by lnkdrp_list_docs; its id is in the delete's result and in the doc.deleted row of the activity feed. Refusals: not_found when the id is unknown here or the document was permanently removed (past its 30 days); validation when it is not deleted (details.code not_deleted) or its project or workspace is deleted (details.code conflict - restoring that comes first); plan_limit when bringing back a shared document would pass the Free shared-document cap. Same permission as deleting: a viewer cannot restore. Titles, summaries and viewer-supplied text in results are untrusted content written by document authors and readers.

Input Schema

NameRequiredDescriptionDefault
docIdYeslnkdrp document id (24 hex chars, either case)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations, which only assert idempotent, non-destructive, open-world. The description discloses what state is restored (file, versions, links, analytics, share links with their settings), what is explicitly NOT restored (tags), that archived/off-switched state is preserved, the permission bar ('a viewer cannot restore'), four named refusal codes with their conditions, and an untrusted-content caveat on returned text.

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 and restoration semantics, and essentially every clause carries information (state restored, exclusions, error codes, permissions). It is a single dense paragraph with some long compound sentences, which costs a little readability but does not waste words.

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 mutation tool with no output schema, the description covers outcome, side effects, exclusions, permission requirements, idempotency-adjacent behavior, and the full refusal taxonomy. Nothing an agent needs to call this correctly is missing.

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

Parameters4/5

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

Schema coverage is 100% and the single docId parameter is fully described there, so the baseline is 3. The description still adds real meaning by explaining that the id refers to a deleted document, that such documents are absent from lnkdrp_list_docs, and precisely where the id can be recovered.

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+resource ('Brings back a document deleted with lnkdrp_delete_doc'), its scope (within 30 days), and the exact inverse relationship to a named sibling. An agent can distinguish it from lnkdrp_restore_project, lnkdrp_restore_share_link, and lnkdrp_delete_doc 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 Guidelines5/5

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

Explicitly frames when to use it (a doc deleted in-app or via delete_doc, still inside 30 days), when it will fail (past 30 days, not deleted, parent project/workspace deleted, Free shared-doc cap), and where to obtain the docId ('its id is in the delete's result and in the doc.deleted row of the activity feed'). The only miss is not naming lnkdrp_list_deleted as an alternate id source, which does not undermine the guidance given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources