Skip to main content
Glama

List project memberships

list_memberships
Read-onlyIdempotent

List memberships per project and principal, showing roles and access, to audit who can reach what, verify roles before granting or revoking access, and find all projects a user can see.

Instructions

List who has access to which project, and with which roles.

Use it before granting or revoking access ("does she already have a role here?"), to audit a project's member list, or to see which projects a principal can reach. Called with no arguments it pages through every membership the authenticated account may see, which on a large instance is a lot — filter.

Returns the standard list envelope: items of {id, project, principal {id,name,type}, roles[], created_at, updated_at} plus pagination{total,page,page_size,has_more}.

Pitfalls. The id in each row is the membership id — the handle for update_membership and delete_membership — not the principal id and not the project id; mixing them up revokes the wrong access. A person can also reach a project through a group membership, so an empty result for principal_id does not prove they have no access. Memberships say who may act, not what they may do: roles carry the permissions.

Cross-references: list_roles for role ids and their permissions; create_membership / update_membership / delete_membership to change access (admin-gated); search_principals for principal ids; list_permissions for what the current user may do.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo1-based page number.
page_sizeNoMemberships per page, 1-100.
project_idNoOnly memberships in this project. Numeric id or the URL identifier (an identifier costs one extra lookup). Combine with principal_id to check one person's roles in one project.
principal_idNoOnly memberships held by this principal — a user, group or placeholder-user id from search_principals. Use it to answer 'which projects can this person see'.

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.
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false. The description adds meaningful behavioral context: the membership id is not the principal/project id, group memberships can cause false negatives, and memberships indicate permission potential, not actual actions. It also describes pagination behavior. No contradiction with annotations.

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 longer than typical, it is tightly structured: purpose sentence, use cases, list envelope, Pitfalls paragraph, and Cross-references. Every sentence adds value, and the most important information is front-loaded. The length is justified by the tool's RBAC complexity.

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?

For a tool with 4 optional filters and complex access semantics, the description covers use cases, large-result warnings, output envelope, pitfalls, and cross-references. Existing output schema reduces the need to document return values, but the description still provides helpful context. Nothing significant 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?

Schema coverage is 100%, so baseline is 3. The description augments this by explaining practical semantics: project_id supports URL identifiers with an extra lookup cost, combining project_id and principal_id to check one person's roles, and principal_id accepts user/group/placeholder ids. It also notes the no-argument behavior and 'which projects can this person see' use case.

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 who has access to which project, and with which roles.' This clearly distinguishes it from sibling tools like list_roles and list_projects by focusing on membership objects. The title reinforces this without ambiguity.

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?

Explicit use cases are stated: 'Use it before granting or revoking access...', 'to audit a project's member list', and 'to see which projects a principal can reach.' It also names cross-reference tools (list_roles, create_membership, search_principals, list_permissions) and warns about the no-arguments behavior, providing clear alternatives and exclusions.

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