delete_work_package
Remove a work package permanently from OpenProject by specifying its ID. This action deletes the task and its associated data.
Instructions
Permanently delete a work package.
Args:
work_package_id: Work package ID to delete
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| work_package_id | Yes |
Implementation Reference
- Core implementation of delete_work_package that performs the actual API DELETE call to OpenProject.async def delete_work_package(work_package_id: int) -> dict[str, Any]: """Permanently delete a work package. Args: work_package_id: Work package ID to delete Returns: Success confirmation """ client = OpenProjectClient() try: result = await client.delete(f"work_packages/{work_package_id}") return result finally: await client.close()
- src/openproject_mcp/server.py:117-125 (registration)MCP tool registration with @mcp.tool() decorator and wrapper handler that delegates to the work_packages module.@mcp.tool() async def delete_work_package(work_package_id: int): """Permanently delete a work package. Args: work_package_id: Work package ID to delete """ return await work_packages.delete_work_package(work_package_id=work_package_id)
- src/openproject_mcp/server.py:118-125 (handler)MCP server handler function for the 'delete_work_package' tool.async def delete_work_package(work_package_id: int): """Permanently delete a work package. Args: work_package_id: Work package ID to delete """ return await work_packages.delete_work_package(work_package_id=work_package_id)