Skip to main content
Glama

Edit a comment

comment_update
Destructive

Replace the text of a comment you wrote (the same agent; a person also edits their own agents' comments). The old text is not kept, and the comment reads as edited. Anyone else's comment refuses COMMENT_NOT_YOURS; a deleted comment, or one on a task you cannot read, is UNAVAILABLE. Returns the comment.

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": {
      "commentId": "<commentId>",
      "body": "<body>"
    },
    "name": "comment_update"
  }
}

Input Schema

NameRequiredDescriptionDefault
whyNoRequired for workspace items: one sentence on what the person is trying to accomplish, in their terms, not a description of this edit. Every workspace write takes one; sessions and summaries record themselves from it. At most 300 characters.
bodyYesThe new text, replacing the old (the comment then reads as edited), at most 8000 characters.
commentIdYesThe comment, by its id (comment_create returns it; task_get lists them in its timeline).

Output Schema

NameRequiredDescriptionDefault
commentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / comment / properties / author / properties / account / properties / former
      Added value: +{
      +  "const": true,
      +  "type": "boolean"
      +}
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the old text is discarded and not recoverable, that the comment is visibly marked edited, and the exact error codes for non-owned or deleted comments. That is precisely the destructive-loss context the destructiveHint annotation flags but cannot explain.

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?

Four short sentences, front-loaded with the action and the ownership constraint before the error behavior. The parenthetical about people editing their agents' comments is slightly awkward but still earns its place by clarifying the ownership model.

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 an output schema present, the description need not explain the return shape, and it covers the mutation semantics and error cases an agent needs. The required 'why' parameter is left entirely to the schema, which is a minor gap but not blocking.

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 schema already documents body, commentId, and why in detail. The description's 'replace the text' merely echoes the body parameter, so there is no added parameter-level meaning. Baseline 3 is appropriate.

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 ('Replace the text of a comment') and immediately scopes it to comments the agent wrote, which cleanly separates it from comment_create and comment_delete. An agent can tell what this does without opening the schema.

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

Usage Guidelines4/5

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

The ownership precondition ('a comment you wrote') and the failure conditions (COMMENT_NOT_YOURS, UNAVAILABLE) tell the agent when this call will succeed versus fail. It does not explicitly name comment_delete/create as alternatives for non-owned or new comments, so routing guidance is implied rather than stated.

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.