Skip to main content
Glama

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, )

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