Skip to main content
Glama

Edit work package comment

edit_work_package_comment
Idempotent

Rewrite an existing work-package comment to fix typos, correct statements, or extend notes; returns the updated journal entry and rejects non-comment activity entries.

Instructions

Rewrite the text of an existing work-package comment.

Use this to fix a typo, correct a wrong statement, or extend a note you just posted. Returns the updated journal entry (activity id, author, markdown text, internal flag, timestamps) in the same shape list_work_package_comments returns.

Pitfalls. Only comment entries are editable: the journal also holds field-change entries ("Status changed from New to In progress"), which OpenProject records automatically and refuses to alter — this tool rejects those locally, before any write. Editing needs the edit-work-package-comments permission (or edit-own for your own comments); a 403 means the account may read the thread but not rewrite it. The edit replaces the text entirely and OpenProject keeps no API-visible history of the previous version, so do not use it to "undo" — post a correcting comment when the record matters. Editing does not notify anyone.

Cross-references: read the thread and get activity ids with list_work_package_comments; post a new comment with add_work_package_comment; change fields (status, assignee, dates) with update_work_package instead of describing them in prose.

Input Schema

NameRequiredDescriptionDefault
commentYesThe replacement body in markdown. It replaces the whole comment — there is no append mode, so read the current text first if you mean to add to it. @-mentions need OpenProject's mention syntax; plain names notify nobody.
activity_idYesId of the journal entry to rewrite. It comes from list_work_package_comments (the 'id' of an entry with kind='comment') or from add_work_package_comment's result. It is an activity id, not a work package id.

Output Schema

NameRequiredDescriptionDefault
idNo
kindYes
authorNo
commentNo
detailsNo
versionNo
internalNo
truncatedNo
created_atNo
updated_atNo
work_packageNo
comment_lengthNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed54 schema fields changedv0.4.0
    • removedOutput schema / description
      Removed value: -"One journal entry: a comment, a set of field changes, or both.\n\nOpenProject aggregates a comment and the edits saved with it into a single\njournal entry, so ``kind='comment'`` entries can still carry ``details``."
    • changedOutput schema / properties / author / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "A reference to another resource. Canonical output shape.",
      -    "properties": {
      -      "id": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Resource id."
      -      },
      -      "name": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Human-readable name."
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": [
      +          "integer",
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "name": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / author / default
      Removed value: -null
    • removedOutput schema / properties / author / description
      Removed value: -"User who wrote the entry."
    • removedOutput schema / properties / comment / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / comment / default
      Removed value: -null
    • removedOutput schema / properties / comment / description
      Removed value: -"Comment body as markdown (raw); html is dropped. Cut to max_comment_chars when 'truncated' is true."
    • addedOutput schema / properties / comment / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / comment_length / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / comment_length / default
      Removed value: -null
    • removedOutput schema / properties / comment_length / description
      Removed value: -"Character length of the untruncated comment; set only when truncated."
    • addedOutput schema / properties / comment_length / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • removedOutput schema / properties / created_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / created_at / default
      Removed value: -null
    • removedOutput schema / properties / created_at / description
      Removed value: -"ISO 8601 UTC timestamp."
    • addedOutput schema / properties / created_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / details / description
      Removed value: -"Field changes recorded with this entry; always a list, empty for a comment-only entry."
    • removedOutput schema / properties / details / items / description
      Removed value: -"One field change inside a journal entry, parsed into its parts."
    • removedOutput schema / properties / details / items / properties / field / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / details / items / properties / field / default
      Removed value: -null
    • removedOutput schema / properties / details / items / properties / field / description
      Removed value: -"Changed field as OpenProject labels it, e.g. 'Status', 'Start date'."
    • addedOutput schema / properties / details / items / properties / field / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / details / items / properties / from / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / details / items / properties / from / default
      Removed value: -null
    • removedOutput schema / properties / details / items / properties / from / description
      Removed value: -"Previous value; null when the field was set for the first time."
    • addedOutput schema / properties / details / items / properties / from / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / details / items / properties / text / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / details / items / properties / text / default
      Removed value: -null
    • removedOutput schema / properties / details / items / properties / text / description
      Removed value: -"The change as OpenProject phrases it, kept verbatim for anything the parser could not split (attachment adds, diff-only notes)."
    • addedOutput schema / properties / details / items / properties / text / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / details / items / properties / to / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / details / items / properties / to / default
      Removed value: -null
    • removedOutput schema / properties / details / items / properties / to / description
      Removed value: -"New value; null when the field was cleared."
    • addedOutput schema / properties / details / items / properties / to / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / id / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / id / default
      Removed value: -null
    • removedOutput schema / properties / id / description
      Removed value: -"Activity id. Pass it back as list_work_package_comments(activity_id=...) to read a truncated comment in full."
    • addedOutput schema / properties / id / type
      Added value: +[
      +  "integer",
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / internal / default
      Removed value: -false
    • removedOutput schema / properties / internal / description
      Removed value: -"True for internal (project-member-only) comments; OpenProject >= 16."
    • removedOutput schema / properties / kind / description
      Removed value: -"'comment' when the entry carries comment text, 'field_change' otherwise."
    • removedOutput schema / properties / truncated / default
      Removed value: -false
    • removedOutput schema / properties / truncated / description
      Removed value: -"True when the comment was cut to max_comment_chars."
    • removedOutput schema / properties / updated_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / updated_at / default
      Removed value: -null
    • removedOutput schema / properties / updated_at / description
      Removed value: -"ISO 8601 UTC timestamp of the last edit."
    • addedOutput schema / properties / updated_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / version / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / version / default
      Removed value: -null
    • removedOutput schema / properties / version / description
      Removed value: -"Journal version number of this entry within the work package."
    • addedOutput schema / properties / version / type
      Added value: +[
      +  "integer",
      +  "null"
      +]
    • changedOutput schema / properties / work_package / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "A reference to another resource. Canonical output shape.",
      -    "properties": {
      -      "id": {
      -        "anyOf": [
      -          {
      -            "type": "integer"
      -          },
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Resource id."
      -      },
      -      "name": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Human-readable name."
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "id": {
      +        "type": [
      +          "integer",
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "name": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / work_package / default
      Removed value: -null
    • removedOutput schema / properties / work_package / description
      Removed value: -"Work package the entry belongs to."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond annotations: only comment journal entries are editable, field-change entries are rejected locally before any write, permission requirements produce 403s, the edit replaces all text with no API-visible history, and no notifications are sent. These are exactly the mutation risks an agent needs.

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 purpose, then useful pitfalls and cross-references. It is somewhat long, but nearly every sentence carries operational value; minor redundancy with the schema prevents a 5.

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?

Given a write operation with an output schema, permissions concerns, local rejection behavior, and alternatives, the description covers all the key decision and safety information an agent needs to invoke it correctly.

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%, so both parameters are already well documented. The description reinforces replacement semantics and activity-id sourcing, but does not add meaning beyond the schema's own parameter descriptions.

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 precise verb and resource: rewrite the text of an existing work-package comment. It distinguishes the tool from add_work_package_comment, list_work_package_comments, and update_work_package both in the opening line and cross-references.

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 names when to use it (fix typo, correct statement, extend a note) and when not to use it (field-change entries, undo via rewrite, field updates that belong in update_work_package). It also provides the read/add/update alternatives by name.

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