Skip to main content
Glama

Delete a comment thread

delete_comment
Destructive

Permanently removes a comment thread and all its messages; use only when the thread should disappear entirely, since this action cannot be undone.

Instructions

Permanently deletes a comment thread and all its messages (Overleaf's 'Delete' in the thread menu). Cannot be undone; prefer resolve_comment unless the thread should disappear entirely. Also works for orphaned threads (see list_comments).

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": {
      "thread_id": "<thread_id>"
    },
    "name": "delete_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
doc_idNoId of the doc the thread is anchored in (`doc_id` from list_comments). Looked up automatically if omitted.
thread_idYesThe thread id, e.g. from list_comments.
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, but the description adds real value beyond that: the deletion is permanent and irreversible, it cascades to all messages in the thread, and it handles orphaned threads. What remains unstated is the response/confirmation behavior, a minor gap for a destructive tool.

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 tight sentences with the destructive consequence and the preferred alternative front-loaded; no filler and nothing repeated from the schema.

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 tool with no output schema but full parameter documentation and a destructiveHint annotation, the description covers consequence, irreversibility, and alternatives. Only the return behavior after deletion is left unaddressed, which is acceptable given no output schema exists.

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%, so the schema already documents thread_id, doc_id, and project_id. The description only implies the orphaned-thread case via list_comments and adds no format or fallback details beyond the schema's own 'looked up automatically' note.

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?

Names a specific verb and resource ('Permanently deletes a comment thread and all its messages') and anchors it to a concrete UI action, so an agent can tell it apart from resolve_comment and delete_comment_message without opening a 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 states when not to use it ('prefer resolve_comment unless the thread should disappear entirely') and names the alternative, plus a special case (orphaned threads, see list_comments). The selection decision is fully spelled out.

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