Skip to main content
Glama

get_work_package_relations

Fetch every relation for a work package (blocks, relates to, duplicates). Provide the work package ID to get direction-aware type, from_id, and to_id, plus pagination.

Instructions

Get all relations for a work package (blocks, relates to, duplicates, etc.).

work_package_id: internal id (e.g., 952) or display_id (e.g., "PROJ-51"), not UI display number. type/from_id/to_id reflect how OpenProject actually stored the relation, which does not depend on which work package's relations you query — but can differ from how it was originally requested, since OpenProject canonicalizes some relation types at creation time (e.g. a relation requested as 'precedes' is stored as 'follows' with from_id/to_id swapped; see create_work_package_relation). Use from_id/to_id together with type, not the request you expect to have made, to determine the actual direction. limit is capped at OPENPROJECT_MAX_PAGE_SIZE (default 50); pass the returned next_offset as the next call's offset to page past the cap.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
offsetNo
work_package_idYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.3.7
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed2 schema fields changedv0.3.5
    • addedInput schema / properties / limit
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Limit"
      +}
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 1,
      +  "title": "Offset",
      +  "type": "integer"
      +}
  3. Addedv0.3.3
  4. Removedv0.3.0
  5. Changed1 schema field changedv0.2.3
    • changedOutput schema / (root)
      Previous value: -{
      -  "$defs": {
      -    "RelationSummary": {
      -      "properties": {
      -        "description": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Description"
      -        },
      -        "from_id": {
      -          "anyOf": [
      -            {
      -              "type": "integer"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "From Id"
      -        },
      -        "from_subject": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "From Subject"
      -        },
      -        "id": {
      -          "title": "Id",
      -          "type": "integer"
      -        },
      -        "to_id": {
      -          "anyOf": [
      -            {
      -              "type": "integer"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "To Id"
      -        },
      -        "to_subject": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "To Subject"
      -        },
      -        "type": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "title": "Type"
      -        }
      -      },
      -      "required": [
      -        "id",
      -        "type",
      -        "description",
      -        "from_id",
      -        "from_subject",
      -        "to_id",
      -        "to_subject"
      -      ],
      -      "title": "RelationSummary",
      -      "type": "object"
      -    }
      -  },
      -  "properties": {
      -    "count": {
      -      "title": "Count",
      -      "type": "integer"
      -    },
      -    "results": {
      -      "items": {
      -        "$ref": "#/$defs/RelationSummary"
      -      },
      -      "title": "Results",
      -      "type": "array"
      -    }
      -  },
      -  "required": [
      -    "count",
      -    "results"
      -  ],
      -  "title": "RelationListResult",
      -  "type": "object"
      -}New value: +null
  6. First observedv0.2.2

TDQS

A4.5/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It explains canonicalization of relation types (precedes stored swapped), that from_id/to_id reflect stored state not the query, and the pagination cap with next_offset. This is thorough and adds significant value.

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 reasonably concise, front-loaded with purpose, but includes somewhat dense technical explanation. Could be slightly cleaner but each sentence adds value.

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

Completeness4/5

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

Given no annotations and no output schema, the description covers important behavioral nuances (canonicalization, pagination). It might miss explicit return structure, but for a list endpoint it's acceptable. Also mentions the relation types. Complete enough.

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 has 0% description coverageerver, but the description compensates well: it explains work_package_id accepts internal id or display_id (with example), and explains limit cap and offset pagination. It doesn't explicitly explain offset parameter, but conveys its use via next_offset. Good compensation.

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 tool retrieves all relations for a work package, listing relation types (blocks, relates to, duplicates). It distinguishes from siblings like list_relations by specifying it's scoped to a specific work package. The verb 'Get' and resource 'all relations for a work package' are specific.

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

Usage Guidelines4/5

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

Provides detailed guidance on parameter usage (work_package_id accepts internal or display ID, not UI display number). Mentions the pagination mechanism with next_call offset. However, it does not compare to sibling tools like list_relations or state when to prefer one over the other, so it lacks explicit alternatives/exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/jtauschl/openproject-ce-mcp'

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