Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

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()
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that 'lock_version' should be obtained from an activity first, hinting at concurrency control, but doesn't explain what happens on update (e.g., overwrites text, requires permissions, returns success/failure, or handles errors). For a mutation tool with zero annotation coverage, this is insufficient.

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?

The description is appropriately sized and front-loaded: the purpose is stated first, followed by a structured list of parameters with brief explanations. There's no wasted text, though it could be slightly more polished (e.g., using bullet points). Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (a mutation with concurrency control), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like error handling, permissions, or what the tool returns. The parameter explanations are good, but overall context is lacking for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, so the description must fully compensate. It does so by clearly explaining all three parameters: 'activity_id' identifies the comment, 'comment' is the new text in markdown format, and 'lock_version' is the current version to prevent conflicts. This adds crucial meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Update an existing comment.' It specifies the verb ('update') and resource ('comment'), making it immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'create_comment' or 'get_activity', which would be needed for a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing comment), exclusions, or comparisons to siblings like 'create_comment' for new comments or 'get_activity' to retrieve lock versions. Usage is implied but not explicitly stated.

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

Install Server

Other Tools

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