Skip to main content
Glama
dev-in-black

OpenProject MCP Server

by dev-in-black

create_work_package

Create a new work package in OpenProject by specifying project, title, description, assignee, and other task details to organize project work.

Instructions

Create a new work package in a project.

Args:
    project_id: Project identifier or ID
    subject: Work package title (required)
    description: Work package description in markdown format
    type_id: Type ID (default: 1 for Task)
    status_id: Status ID (optional, uses project default if not provided)
    priority_id: Priority ID (optional, uses default if not provided)
    assignee_id: User ID to assign the work package to
    notify: Whether to send notifications (default: True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYes
subjectYes
descriptionNo
type_idNo
status_idNo
priority_idNo
assignee_idNo
notifyNo

Implementation Reference

  • Core implementation of the create_work_package tool: constructs payload and performs POST request to OpenProject API to create the work package.
    async def create_work_package(
        project_id: str,
        subject: str,
        description: str | None = None,
        type_id: int = 1,
        status_id: int | None = None,
        priority_id: int | None = None,
        assignee_id: int | None = None,
        notify: bool = True,
    ) -> dict[str, Any]:
        """Create a new work package in a project.
    
        Args:
            project_id: Project identifier or ID
            subject: Work package title (required)
            description: Work package description in markdown format
            type_id: Type ID (default: 1 for Task)
            status_id: Status ID (optional, uses project default if not provided)
            priority_id: Priority ID (optional, uses default if not provided)
            assignee_id: User ID to assign the work package to
            notify: Whether to send notifications (default: True)
    
        Returns:
            Created work package object with ID, subject, and all properties
        """
        client = OpenProjectClient()
    
        try:
            payload: dict[str, Any] = {
                "subject": subject,
                "_links": {
                    "type": build_link(f"/api/v3/types/{type_id}"),
                },
            }
    
            if description:
                payload["description"] = build_formattable(description)
    
            if status_id:
                payload["_links"]["status"] = build_link(f"/api/v3/statuses/{status_id}")
    
            if priority_id:
                payload["_links"]["priority"] = build_link(
                    f"/api/v3/priorities/{priority_id}"
                )
    
            if assignee_id:
                payload["_links"]["assignee"] = build_link(f"/api/v3/users/{assignee_id}")
    
            params = {"notify": str(notify).lower()}
    
            result = await client.post(
                f"projects/{project_id}/work_packages", data=payload
            )
            return result
        finally:
            await client.close()
  • Registers the create_work_package tool with the MCP server using @mcp.tool() decorator. Delegates execution to the implementation in work_packages module.
    @mcp.tool()
    async def create_work_package(
        project_id: str,
        subject: str,
        description: str | None = None,
        type_id: int = 1,
        status_id: int | None = None,
        priority_id: int | None = None,
        assignee_id: int | None = None,
        notify: bool = True,
    ):
        """Create a new work package in a project.
    
        Args:
            project_id: Project identifier or ID
            subject: Work package title (required)
            description: Work package description in markdown format
            type_id: Type ID (default: 1 for Task)
            status_id: Status ID (optional, uses project default if not provided)
            priority_id: Priority ID (optional, uses default if not provided)
            assignee_id: User ID to assign the work package to
            notify: Whether to send notifications (default: True)
        """
        return await work_packages.create_work_package(
            project_id=project_id,
            subject=subject,
            description=description,
            type_id=type_id,
            status_id=status_id,
            priority_id=priority_id,
            assignee_id=assignee_id,
            notify=notify,
        )
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. While it correctly identifies this as a creation operation, it doesn't mention permission requirements, whether the creation is reversible, what happens on failure, or any rate limits. For a mutation tool with zero annotation coverage, this represents significant gaps in behavioral understanding.

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 well-structured with a clear purpose statement followed by organized parameter documentation. While efficient, the parameter documentation section is somewhat lengthy but necessary given the parameter count. Every sentence adds value, with no redundant information.

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

Completeness3/5

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

Given the complexity (8 parameters, mutation operation) and lack of both annotations and output schema, the description does a good job with parameters but leaves gaps in behavioral context. It adequately documents what to provide but doesn't fully explain what happens during execution or what to expect in return. For a creation tool, this is minimally adequate but could be more complete.

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 description provides excellent parameter semantics beyond the 0% schema coverage. For all 8 parameters, it explains what each represents (e.g., 'Work package title (required)', 'Type ID (default: 1 for Task)', 'Whether to send notifications (default: True)'), including required/optional status, defaults, and format guidance like 'markdown format'. This fully compensates for the lack of schema 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?

The description clearly states the specific action ('Create a new work package') and resource ('in a project'), distinguishing it from sibling tools like update_work_package or delete_work_package. It provides a complete verb+resource+context statement that leaves no ambiguity about the tool's function.

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_work_package or set_parent_work_package. It doesn't mention prerequisites, dependencies, or typical usage scenarios. The only contextual information is the project context, but no comparative guidance is offered.

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