Skip to main content
Glama

list_relations

Retrieve all work package relations across the instance, optionally filtered by type. Handles canonical relation directions and pagination for full coverage.

Instructions

List all relations across the instance, optionally filtered by type (e.g. 'blocks', 'follows').

type/from_id/to_id reflect how OpenProject actually stored the relation (it does not change depending on which work package's relations you're viewing), which can differ from how it was originally requested — 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). Filtering by relation_type matches the stored (canonical) type, not necessarily the type a caller originally requested when creating it. 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
relation_typeNo

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.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral disclosure burden. It does well by revealing non-obvious behavior: relation types are canonicalized at creation, filtering matches the stored canonical type, and from_id/to_id can be swapped. It also discloses the page-size cap and next_offset pagination behavior, which are important operational traits.

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?

The description is front-loaded with the core purpose and then packs each sentence with non-obvious, high-value details: canonicalization, type-match semantics, and pagination. No sentence is filler or redundant with the schema.

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 the simple schema and absence of annotations, the description covers the most important operational context: instance scope, optional filtering, canonical-type handling, and paginated listing. It could be slightly more complete by explicitly mentioning the shape of the returned relation objects, but the mention of type/from_id/to_id and next_offset provides enough for most usage.

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?

Despite having 0% schema description coverage, the description compensates well: relation_type is explained with examples and canonical-type semantics, limit is explained as capped at OPENPROJECT_MAX_PAGE_SIZE, and offset is tied to the returned next_offset. This adds strong practical meaning beyond the raw schema types.

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 a specific verb and resource: 'List all relations across the instance, optionally filtered by type.' This clearly establishes scope and function, and unlike the sibling get_work_package_relations, it signals instance-wide behavior rather than a single work package's relations.

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

Usage Guidelines3/5

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

The description provides strong context about instance-level listing and pagination, but it does not explicitly explain when to prefer this tool over alternatives or when not to use it. The distinction from get_work_package_relations is implied by 'across the instance,' but no alternative tool is named or contrasted.

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