Skip to main content
Glama

update_comment

Modify existing comments on OpenProject activities by providing the activity ID, updated markdown text, and current lock version to maintain data integrity.

Instructions

Update an existing comment.

Args: activity_id: Activity ID of the comment to update comment: New comment text in markdown format lock_version: Current lock version (get from activity first)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
activity_idYes
commentYes
lock_versionYes

Implementation Reference

  • MCP tool handler and registration for 'update_comment'. This is the entry point decorated with @mcp.tool() that handles tool execution by delegating to the comments module implementation.
    @mcp.tool() async def update_comment(activity_id: int, comment: str, lock_version: int): """Update an existing comment. Args: activity_id: Activity ID of the comment to update comment: New comment text in markdown format lock_version: Current lock version (get from activity first) """ return await comments.update_comment( activity_id=activity_id, comment=comment, lock_version=lock_version, )
  • Core implementation of update_comment that performs the PATCH request to the OpenProject API to update the activity/comment.
    async def update_comment( activity_id: int, comment: str, lock_version: int ) -> dict[str, Any]: """Update an existing comment. Args: activity_id: Activity ID of the comment to update comment: New comment text in markdown format lock_version: Current lock version (get from activity first) Returns: Updated activity object """ client = OpenProjectClient() try: payload = { "comment": build_formattable(comment), "lockVersion": lock_version, } result = await client.patch(f"activities/{activity_id}", data=payload) return result finally: await client.close()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/dev-in-black/openproject-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server