Skip to main content
Glama

List users

wp_list_users
Read-onlyIdempotent

List WordPress user accounts page by page, optionally filtered by role or search term, and return matching user details plus the total count across all pages.

Instructions

List the user accounts of this site, one page at a time, optionally filtered by role or a search term. Returns users (id, login, email, name = display name, roles) and total, the number of matches across all pages. Needs list_users. One account with first and last name and registration date: wp_get_user; profile fields: wp_get_user_meta.

Input Schema

NameRequiredDescriptionDefault
pageNoPage number, starting at 1. Default 1.
roleNoOnly users with this role slug, e.g. administrator, editor, author, contributor, subscriber or a role a plugin added. Omitted: every role.
searchNoWordPress picks the fields by the term: with "@" the email, starting with http:// or https:// the URL (on a large multisite network the general fields instead), a number the login (or the exact id), otherwise login, email, URL, nicename and display name; matched anywhere in the field. Omitted: no filter.
per_pageNoUsers per page, 1 to 100 (values outside are clamped). Default 20.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare a safe, idempotent read, but the description adds genuinely new behavior: pagination semantics, the capability required ('Needs list_users'), and the actual return payload (id, login, email, name = display name, roles) plus 'total' spanning all pages. It only stops short of stating default page size or ordering, so a 4 rather than a perfect 5.

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?

Three tight sentences: purpose and scope first, return shape second, disambiguation third. No filler, and the most decision-relevant information is front-loaded.

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 listing the returned fields and the 'total' count, and it discloses the required capability. Combined with a fully documented 4-parameter schema and read-only annotations, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already spells out page, role slugs, per_page clamping and the intricate search-term matching rules in more detail than the description does. The description only restates 'filtered by role or a search term' and 'one page at a time', so the baseline 3 for full schema coverage applies.

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 ('List the user accounts of this site') plus the scope constraint ('one page at a time, optionally filtered by role or a search term'), and explicitly names wp_get_user and wp_get_user_meta as the tools for single-account and profile-field needs, so it is distinguishable from its user-related siblings.

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?

Gives explicit routing rules: this tool for enumerating accounts, wp_get_user for a single account with first/last name and registration date, wp_get_user_meta for profile fields. The alternative and the condition that selects each are named directly, leaving nothing to inference.

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