Skip to main content
Glama

list_relations

Read-onlyIdempotent

List all OpenProject relations across the instance, optionally filtered by stored relation type, to inspect dependencies and links between work packages.

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.

Each result's queried_perspective field is always null here; a caller-relative reading needs one anchor work package to read the relation FROM, and this instance-wide listing has none. Use get_work_package_relations instead when you need queried_perspective populated.

total is only the count of allowed relations returned on THIS page, not a full count of all matches; the search stops as soon as it has enough, so an exact total would need an extra full walk. Page until next_offset is null.

Input Schema

NameRequiredDescriptionDefault
limitNoPage size, capped at OPENPROJECT_MAX_PAGE_SIZE.
offsetNo1-based page number; pass the previous result's next_offset.
selectNoFields to return; a requested unset field comes back as null. Allowed: description, description_length, description_truncated, from_id, from_subject, id, queried_perspective, to_id, to_subject, type.
relation_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.4
  2. Removedv0.4.0
  3. Changed1 schema field changedv0.3.7
    • addedInput schema / additionalProperties
      Added value: +false
  4. 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"
      +}
  5. Addedv0.3.3
  6. Removedv0.3.0
  7. 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
  8. First observedv0.2.2

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare read/idempotent/non-destructive, yet the description still adds substantial non-obvious behavior: OpenProject canonicalizes relation types at creation, so relation_type filters on the stored type; queried_perspective is always null here; and 'total' counts only this page because the search short-circuits. These are exactly the traits an agent needs before trusting results.

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?

Purpose and the sibling alternative are front-loaded, then the nuances follow in order of consequence (canonicalization, perspective, total semantics). Dense but every paragraph carries a distinct, load-bearing caveat; only slight trimming would improve it.

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?

With no output schema, the description compensates by explaining return-value semantics: queried_perspective is always null, total is page-scoped, and pagination terminates on next_offset null. Nothing an agent needs in order to call it or interpret results is missing.

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?

With 75% schema coverage, limit/offset/select are documented in the schema, but relation_type has no schema description and the description rescues it by explaining that filtering matches the stored canonical type, not the originally requested type. That is meaningful added semantics beyond the schema.

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?

States a specific verb and resource with scope ('List all relations across the instance, optionally filtered by type') and immediately distinguishes itself from the sibling get_work_package_relations. An agent can tell what this does and what it isn't without opening any schema.

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 routes the agent: 'Use get_work_package_relations instead when you need queried_perspective populated.' It also gives the pagination rule ('Page until next_offset is null'), which tells the agent how to consume the tool correctly.

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

Deploy Server

Other Tools