Skip to main content
Glama

Search users, groups and placeholder users

search_principals
Read-onlyIdempotent

Find users, groups, and placeholder users to retrieve their IDs for assigning work, adding watchers, logging time, or managing memberships.

Instructions

Find users, groups and placeholder users, and get their ids.

This is the id-producing tool for every principal parameter in this server: assignee/responsible on work packages, watcher ids, the user_id of a time entry, and principal_id for create_membership (admin-gated: hidden unless the server sets OPENPROJECT_MCP_ADMIN_TOOLS=1). Names are never accepted where an id is wanted — resolve here first, and never guess a numeric id.

Use it to answer "who is Grace Hopper's account", "which groups exist", "who is a member of the demo project". Returns the standard list envelope: items of {id, name, type, email?, login?, status?} plus pagination{total,page,page_size,has_more} and notes.

Pitfalls. email, login and status are only returned for user principals the authenticated account may see — a null email means "not visible to you", not "no email". Group principals can hold memberships and be assigned work, so filter by type when you specifically need a person. Matching is substring-based, so a short query matches broadly; prefer the full name or the login. member_of_project filters by membership, not by whether the person ever touched the project.

Cross-references: get_user for one user's full detail; list_memberships for who holds which roles in a project; create_membership to grant access; list_roles for the role ids that grant needs.

Input Schema

NameRequiredDescriptionDefault
pageNo1-based page number.
typeNoRestrict to one kind of principal. 'user' = people who log in, 'group' = user groups (assignable and grantable as a unit), 'placeholder' = licence-free stand-ins. Omit to search all three.
queryNoFree text matched against name, login and email (substring, case-insensitive). Omit it to page through every visible principal.
statusNoRestrict to an account status. 'active' is the usual filter when looking for someone to assign work to; 'locked' accounts keep old assignments but take no new ones. Groups and placeholder users have no status and are excluded when this is set.
page_sizeNoPrincipals per page, 1-100.
member_of_projectNoOnly principals who are members of this project. Numeric project id or the URL identifier; an identifier costs one extra lookup. Use it before assigning work — a user who is not a member usually cannot be assigned.

Output Schema

NameRequiredDescriptionDefault
sumsNo
itemsNo
notesNo
groupsNo
paginationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed36 schema fields changedv0.4.0
    • changedOutput schema / properties / groups / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "description": "A server-side group bucket, computed over the full filtered set.",
      -      "properties": {
      -        "count": {
      -          "default": 0,
      -          "description": "Records in this group across all pages.",
      -          "type": "integer"
      -        },
      -        "sums": {
      -          "anyOf": [
      -            {
      -              "additionalProperties": {
      -                "type": "number"
      -              },
      -              "type": "object"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null,
      -          "description": "Per-group sums when show_sums was requested."
      -        },
      -        "value": {
      -          "anyOf": [
      -            {
      -              "type": "string"
      -            },
      -            {
      -              "type": "null"
      -            }
      -          ],
      -          "default": null,
      -          "description": "Group value, e.g. a status name."
      -        }
      -      },
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "properties": {
      +        "count": {
      +          "type": "integer"
      +        },
      +        "sums": {
      +          "anyOf": [
      +            {
      +              "additionalProperties": {
      +                "type": "number"
      +              },
      +              "type": "object"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "value": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • removedOutput schema / properties / groups / default
      Removed value: -null
    • removedOutput schema / properties / groups / description
      Removed value: -"Present only when group_by was requested."
    • removedOutput schema / properties / items / description
      Removed value: -"The page of results."
    • removedOutput schema / properties / items / items / description
      Removed value: -"One user, group or placeholder user."
    • removedOutput schema / properties / items / items / properties / email / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / items / items / properties / email / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / email / description
      Removed value: -"Email address; users only, and only when the caller may see it."
    • addedOutput schema / properties / items / items / properties / email / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / id / anyOf
      Removed value: -[
      -  {
      -    "type": "integer"
      -  },
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / items / items / properties / id / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / id / description
      Removed value: -"Principal id. This is the value every principal parameter wants: assignee_id, watcher ids, time-entry user_id, create_membership.principal_id."
    • addedOutput schema / properties / items / items / properties / id / type
      Added value: +[
      +  "integer",
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / login / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / items / items / properties / login / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / login / description
      Removed value: -"Login name; users only, and only when the caller may see it."
    • addedOutput schema / properties / items / items / properties / login / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / items / items / properties / name / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / name / description
      Removed value: -"Display name as OpenProject renders it."
    • addedOutput schema / properties / items / items / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / status / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedOutput schema / properties / items / items / properties / status / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / status / description
      Removed value: -"Account status, one of: active, invited, registered, locked. Users only. 'locked' accounts still appear in old assignments but cannot be assigned new work."
    • addedOutput schema / properties / items / items / properties / status / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / items / items / properties / type / default
      Removed value: -null
    • removedOutput schema / properties / items / items / properties / type / description
      Removed value: -"'user' for a person, 'group' for a user group, 'placeholder' for a placeholder user (a licence-free stand-in that can be assigned work but cannot log in)."
    • removedOutput schema / properties / notes / default
      Removed value: -null
    • removedOutput schema / properties / notes / description
      Removed value: -"Degradation markers: capped aggregations, unavailable modules, …"
    • removedOutput schema / properties / pagination / description
      Removed value: -"Total/page/page_size/has_more."
    • removedOutput schema / properties / pagination / properties / has_more / description
      Removed value: -"True when further pages exist."
    • removedOutput schema / properties / pagination / properties / page / description
      Removed value: -"1-based page number of this result."
    • removedOutput schema / properties / pagination / properties / page_size / description
      Removed value: -"Records requested per page."
    • removedOutput schema / properties / pagination / properties / total / description
      Removed value: -"Total matching records on the server."
    • removedOutput schema / properties / sums / default
      Removed value: -null
    • removedOutput schema / properties / sums / description
      Removed value: -"Present only when show_sums was requested."
  2. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld/non-destructive; the description adds substantial beyond-schema context: null email means 'not visible', group principals can hold memberships and be assigned, substring matching is broad, member_of_project filters by membership not history, and create_membership is admin-gated.

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?

Front-loads the core purpose and id-resolution mandate, then groups pitfalls and cross-references clearly. Slightly long, but each paragraph (id mandate, examples, pitfalls, cross-refs) earns its place.

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?

Despite an output schema being present, the description still sketches the envelope (items, pagination, notes), covers all six parameters' semantics, and addresses permission-based visibility. Nothing an agent needs to call it correctly 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 the schema already documents each parameter; the description nonetheless adds behavioral nuance the schema lacks—short queries match broadly, prefer full name or login, and member_of_project costs an extra lookup for URL identifiers.

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+resource (find users, groups, placeholder users, get their ids) and immediately frames itself as 'the id-producing tool' for principal parameters. This distinguishes it clearly from get_user, list_memberships and create_membership in the sibling list.

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 says when to use it (anywhere an assignee/responsible/watcher/user_id/principal_id is needed) and names alternatives with conditions ('get_user for one user's full detail; list_memberships for who holds which roles'). Also warns never to guess a numeric id.

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