Skip to main content
Glama

Create work package relation

create_work_package_relation

Link two work packages with a relation type (follows, blocks, duplicates) to record dependencies. Returns the created relation with its id, type, and work package details.

Instructions

Link two work packages (blocks, follows, duplicates, relates, ...).

Use this to record a dependency the schedule or the reader needs to know about: "ship the client layer follows design sign-off", "this duplicates #4321". Returns the created relation with its id, type, reverse_type, both work packages, lag and description.

Pitfalls. OpenProject stores one canonical direction per pair, so the passive spellings are rewritten on save: creating precedes from A to B comes back as B follows A, with from_work_package and to_work_package swapped. That is the same fact, not an error — read type and reverse_type from the result rather than assuming what you sent. Only one relation may exist between two work packages: a second one answers 409 conflict, and changing it means update_work_package_relation on the existing id. A relation that would close a scheduling cycle is rejected with a validation error. Creating a follows relation can move dates, since OpenProject reschedules the successor.

Cross-references: get_work_package(include=['relations']) lists what a work package is already linked to and produces relation ids; update_work_package_relation edits one; delete_work_package_relation removes it; parent/child hierarchy goes through update_work_package(parent_id=...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lagNoWorking days to keep between the two work packages. Valid only on 'follows' and 'precedes'; passing it with any other type is refused here before the request is sent.
typeYesHow from_id relates to to_id. 'follows' schedules from_id after to_id, 'precedes' before it; 'blocks'/'blocked' express dependency without scheduling; 'duplicates'/'duplicated', 'includes'/'partof', 'requires'/'required' come in mirrored pairs; 'relates' is the neutral link. Parent/child hierarchy is NOT a relation — set it with update_work_package(parent_id=...).
to_idYesThe other work package. It must be visible to the account and different from from_id.
from_idYesWork package the relation is read from — 'type' describes what this one does to the other. Ids come from search_work_packages or list_work_packages.
descriptionNoOptional note explaining why the two work packages are linked.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoRelation id. Pass it to update_work_package_relation or delete_work_package_relation — it is not a work package id.
lagNoWorking days kept between the predecessor and the successor. Only follows/precedes relations carry one; null everywhere else.
typeNoRelation type as OpenProject stored it, read from the 'from' work package (e.g. 'follows' means 'from' is scheduled after 'to').
descriptionNoFree-text note stored on the relation; null when unset.
reverse_typeNoThe same relation read from the 'to' work package: 'follows' <-> 'precedes', 'blocks' <-> 'blocked', 'relates' <-> 'relates'.
to_work_packageNoWork package the relation points to.
from_work_packageNoWork package the relation starts at.
Behavior5/5

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

Reveals critical server-side behaviors: canonical direction rewriting, 409 on duplicate relations, rescheduling on 'follows', and cycle rejection. This goes far beyond the annotations' basic readOnly/destructive hints and gives the agent essential insight into side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Though relatively long, the description is tightly organized into purpose, return value, pitfalls, and cross-references. Key information is front-loaded in the first sentence, and every paragraph adds necessary operational context without redundancy.

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

Completeness5/5

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

Covers return shape, error conditions (409, validation errors), side effects (date rescheduling), and alternatives. With an output schema present and thorough parameter descriptions, nothing essential is missing for correct tool selection and invocation.

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?

Schema descriptions already cover all 5 parameters thoroughly, including enum meanings and lag constraints. The description adds important nuances like direction canonicalization and the single-relation rule, which affect how parameters are interpreted and what to expect in the response.

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 opens with 'Link two work packages' and lists the relation types, making the tool's specific verb and resource unmistakable. It clearly distinguishes itself from sibling tools by focusing on creating a relation, versus updating or deleting one.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Use this to record a dependency' and provides real examples. Pitfalls state when not to use it (409 conflict, use update on existing id) and cross-references list alternatives for listing, editing, deleting relations, and for parent-child hierarchy.

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/kar-thik/openproject-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server