Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

create_comment

Add comments to OpenProject work packages using markdown formatting, with options for internal visibility to document progress and facilitate team communication.

Instructions

Add a comment to a work package.

Args:
    work_package_id: Work package ID
    comment: Comment text in markdown format
    internal: Whether the comment is internal (default: False)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_package_idYes
commentYes
internalNo

Implementation Reference

  • Core handler function that executes the logic to create a comment by posting to the OpenProject API endpoint for work package activities.
    async def create_comment(
        work_package_id: int, comment: str, internal: bool = False
    ) -> dict[str, Any]:
        """Add a comment to a work package.
    
        Args:
            work_package_id: Work package ID
            comment: Comment text in markdown format
            internal: Whether the comment is internal (default: False)
    
        Returns:
            Created activity object containing the comment
        """
        client = OpenProjectClient()
    
        try:
            payload = {
                "comment": build_formattable(comment),
            }
    
            # Internal comments might be handled differently depending on OpenProject version
            # Adding it to the payload if requested
            if internal:
                payload["internal"] = internal
    
            result = await client.post(
                f"work_packages/{work_package_id}/activities", data=payload
            )
            return result
        finally:
            await client.close()
  • MCP tool registration and entry point using @mcp.tool() decorator, which delegates to the core handler in comments module.
    @mcp.tool()
    async def create_comment(work_package_id: int, comment: str, internal: bool = False):
        """Add a comment to a work package.
    
        Args:
            work_package_id: Work package ID
            comment: Comment text in markdown format
            internal: Whether the comment is internal (default: False)
        """
        return await comments.create_comment(
            work_package_id=work_package_id,
            comment=comment,
            internal=internal,
        )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the action ('Add a comment') which implies a write operation, but doesn't disclose permission requirements, whether comments are editable/deletable, rate limits, or what happens on success/failure. The description provides minimal behavioral context beyond the basic operation.

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 efficiently structured with a clear purpose statement followed by parameter explanations. Every sentence serves a purpose, and there's no redundant information. The formatting with 'Args:' section helps readability. It could be slightly more front-loaded with key behavioral information.

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?

For a write operation tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what the tool returns, error conditions, authentication requirements, or how the comment integrates with the work package system. The agent lacks crucial context for proper invocation and error handling.

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

Parameters4/5

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

The description provides meaningful semantic context for all three parameters beyond what the schema offers (0% coverage). It clarifies that 'comment' accepts 'markdown format' and that 'internal' has a 'default: False' value, which adds crucial usage information not present in the bare schema. However, it doesn't explain what 'internal' means in practical terms.

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 action ('Add a comment') and target resource ('to a work package'), making the purpose immediately understandable. It distinguishes from siblings like 'update_comment' by focusing on creation rather than modification. However, it doesn't specify if this creates a new comment thread or adds to an existing one, preventing 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 like 'update_comment' or how it relates to other comment-related operations. There's no mention of prerequisites, constraints, or typical use cases beyond the basic action. The agent must infer usage from the tool name alone.

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