delete_relation
Remove connections between work packages in OpenProject by specifying the relation ID to delete, helping maintain accurate task relationships.
Instructions
Remove a relation between work packages.
Args:
relation_id: Relation ID to delete
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| relation_id | Yes |
Implementation Reference
- src/openproject_mcp/server.py:364-371 (handler)MCP tool handler for 'delete_relation', registered with @mcp.tool() decorator, delegates execution to the relations helper module.@mcp.tool() async def delete_relation(relation_id: int): """Remove a relation between work packages. Args: relation_id: Relation ID to delete """ return await relations.delete_relation(relation_id=relation_id)
- Core helper function implementing the deletion of a relation using OpenProjectClient API.async def delete_relation(relation_id: int) -> dict[str, Any]: """Remove a relation between work packages. Args: relation_id: Relation ID to delete Returns: Success confirmation """ client = OpenProjectClient() try: result = await client.delete(f"relations/{relation_id}") return result finally: await client.close()