Skip to main content
Glama

Read a user

wp_get_user
Read-onlyIdempotent

Retrieve a WordPress user account by ID, username, or email to fetch profile details such as display name, roles, and registration date. Use it for exact account lookups.

Instructions

Get one user account by id, login or email. Returns id, login, email, name (display name), first_name, last_name, roles and registered (site time with UTC offset). Needs list_users. No match, or none of the three given, is a not-found error; an account known only by part of its name is found with wp_list_users (search). User meta is read by wp_get_user_meta.

Input Schema

NameRequiredDescriptionDefault
idNoUser id. Takes precedence over login and email.
emailNoEmail address, exact. Used when neither id nor login is given.
loginNoUsername (user_login), exact. Used when id is not given.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.7.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/openWorld=false, and the description adds genuinely non-derivable behavior: required capability, the exact returned fields, that 'registered' is site time with UTC offset, and that no match or no identifier yields a not-found error rather than a default.

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 dense sentences with no filler: lookup keys first, return shape second, error/failure routing third. Every clause carries information an agent needs.

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?

No output schema exists, yet the description enumerates the returned fields and timezone handling, covers the error path, and points to the two relevant sibling tools. Nothing an agent needs to call this 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% and the schema already documents precedence, so the baseline applies; the description adds the consequence of supplying none of the three keys (not-found error), which the schema does not state. It does not add format details beyond that, so it sits just above baseline.

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?

Names a specific verb+resource (get one user account) and enumerates the three lookup keys, so it is immediately distinguishable from wp_list_users. The scope ('one user') is explicit, ruling out bulk retrieval.

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 partial-name lookups to wp_list_users (search) and meta reads to wp_get_user_meta, both named as siblings. It also states the prerequisite capability ('Needs list_users'), giving when-to-use and when-not-to-use in three sentences.

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