Skip to main content
Glama

List roles

list_roles
Read-onlyIdempotent

List all roles defined in an OpenProject instance, returning their IDs and names for membership creation or updates. Optionally include permissions per role.

Instructions

List the roles this instance defines, with their ids.

This is the id-producing tool for create_membership.role_ids and update_membership.role_ids (both admin-gated: hidden unless the server sets OPENPROJECT_MCP_ADMIN_TOOLS=1) — role names are never accepted there. Roles are instance-wide definitions ('Member', 'Reader', 'Project admin'); a membership binds one principal to one project with a set of them.

Returns the standard list envelope with has_more: false: the role list is small and fetched in full. Each item is {id, name}, plus permissions when include_permissions=true.

Pitfalls. Role names are configurable per instance, so do not assume 'Member' exists — read the list. Some roles are not assignable to a project membership (global and work-package roles live in the same collection); the membership form rejects those with the assignable set listed. Not every OpenProject version exposes permission arrays on this endpoint: when include_permissions=true returns none, notes says so rather than pretending the roles grant nothing.

Cross-references: create_membership / update_membership consume these ids; list_memberships shows which roles are in use; list_permissions answers what the current user may do, which is the more useful question when a call just failed with 403.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
include_permissionsNoAdd each role's full permission identifier array. Off by default because those arrays are long — a dozen roles can run to thousands of tokens. Turn it on only when the question is genuinely 'what does this role allow'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sumsNoPresent only when show_sums was requested.
itemsNoThe page of results.
notesNoDegradation markers: capped aggregations, unavailable modules, …
groupsNoPresent only when group_by was requested.
paginationYesTotal/page/page_size/has_more.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior. The description adds valuable context: the response envelope (has_more: false), item shape ({id, name}), the optional permissions array, and version-dependent behavior where permission arrays may not be exposed and notes clarifies this. It also warns about non-assignable roles in the same collection. This exceeds what annotations convey.

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 well-structured: it opens with the core purpose, then the use case for id production, followed by response format, then pitfalls, and cross-references. Every sentence adds information; no filler. It is longer than typical but earns its length by covering all critical details 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?

Given the tool's role in a permission/membership workflow, the description is complete. It explains the return envelope, the exact fields, the optional permissions behavior, version caveats, and the distinction from list_permissions. With an output schema present, it doesn't need to enumerate all return details, but it covers what an agent needs to call and interpret results correctly.

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?

The only parameter, include_permissions, has a thorough schema description covering its purpose, default, and when to enable it (coverage 100%). The tool description reinforces this by mentioning that permissions are included when true and notes the caveat about version differences. It adds context on when the parameter is useful but largely echoes the schema. Still, the extra guidance on version behavior justifies a slight boost over baseline 3.

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 exactly what the tool does: 'List the roles this instance defines, with their ids.' It clearly identifies the resource and the primary use case (producing ids for membership tools), and distinguishes it from list_permissions, which answers a different question. The description also notes that role names are not accepted, so an agent knows this is the id lookup.

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 explains when to use this tool: to obtain role ids for create_membership and update_membership, and when not to (role names are never accepted). It also cross-references list_permissions as the more useful tool after a 403, and warns that role names are configurable so one should read the list rather than assume 'Member' exists. Clear exclusions and alternatives are provided.

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