Skip to main content
Glama

Restore a thread

restore_thread
Idempotent

Bring a Thread back from Trash (list_threads with state "trash" finds it) into its Folder, with the Notes that went to Trash with it; Notes trashed on their own stay there (restore_note). If its Folder is in Trash, restore_folder first (target_deleted). Needs Edit and organize; expected_revision is not compared. Answers a receipt with the new revision and url.

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": {
      "operation_id": "<operation_id>",
      "thread_id": "<thread_id>",
      "expected_revision": "<expected_revision>"
    },
    "name": "restore_thread"
  }
}

Input Schema

NameRequiredDescriptionDefault
thread_idYesA Thread's id, from list_threads, search or a read.
operation_idYesA new UUID for each write. After a lost answer, send the identical call with the same one, or check get_operation before writing again.
expected_revisionYesIts revision from list_threads, get_thread, list_folders or get_note (not a content_revision); not compared.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / expected_revision / description
      Previous value: -"The revision you last read for it."New value: +"Its revision from list_threads, get_thread, list_folders or get_note (not a content_revision); not compared."
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations cover idempotency and non-destructiveness, but the description adds material context they don't: the cascade rule (notes trashed alongside return, independently trashed notes stay), required permissions (Edit and organize), the fact that expected_revision is not enforced, and the receipt containing a new revision and url. Only minor gaps remain (e.g. no statement about what happens on a stale/unknown thread_id).

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 packed with useful caveats in a few lines, but the parenthetical references (target_deleted, list_threads with state "trash") make it read as a run-on that takes a second pass to parse.

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 three-parameter mutation with no output schema, it covers the cascade behavior, permissions, precondition ordering, and the shape of the receipt, which is enough to call it correctly. A brief note on failure modes (e.g. what a target_deleted error looks like) would make it complete.

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 coverage is 100% and the schema already explains thread_id, operation_id reuse, and that expected_revision is not compared; the description mostly repeats that last point. It adds no new format or sourcing detail beyond the schema.

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 (bring a Thread back from Trash into its Folder) and immediately scopes it against restore_note and restore_folder, so the agent can distinguish it from siblings 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?

Gives explicit when-to-use (item is in Trash, findable via list_threads with state "trash"), explicit alternatives (restore_note for notes trashed on their own), and a precondition routing to restore_folder when the parent Folder is deleted.

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.