Skip to main content
Glama

wpnav_list_users

Retrieve and filter WordPress user accounts by role, search term, or pagination to manage site access and permissions.

Instructions

List WordPress users with optional filtering. Returns user ID, username, email, roles, and display name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination (default: 1)
per_pageNoNumber of users to return (default: 10, max: 100)
rolesNoFilter by role: administrator, editor, author, contributor, subscriber
searchNoSearch term to filter users by username, email, or display name

Implementation Reference

  • Handler function that validates pagination and search parameters, constructs WP REST API query for /wp/v2/users, fetches the users list, and returns formatted JSON response.
    handler: async (args, context) => { const { page, per_page } = validatePagination(args); const qs = buildQueryString({ page, per_page, roles: args.roles, search: args.search }); const users = await context.wpRequest(`/wp/v2/users?${qs}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(users, null, 2)) }], }; },
  • Input schema defining parameters for pagination, role filtering, and search in wpnav_list_users tool.
    inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number for pagination (default: 1)' }, per_page: { type: 'number', description: 'Number of users to return (default: 10, max: 100)' }, roles: { type: 'string', description: 'Filter by role: administrator, editor, author, contributor, subscriber' }, search: { type: 'string', description: 'Search term to filter users by username, email, or display name' }, }, required: [], },
  • Tool registration call that defines name, schema, handler, and category (ToolCategory.USERS) for wpnav_list_users.
    toolRegistry.register({ definition: { name: 'wpnav_list_users', description: 'List WordPress users with optional filtering. Returns user ID, username, email, roles, and display name.', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number for pagination (default: 1)' }, per_page: { type: 'number', description: 'Number of users to return (default: 10, max: 100)' }, roles: { type: 'string', description: 'Filter by role: administrator, editor, author, contributor, subscriber' }, search: { type: 'string', description: 'Search term to filter users by username, email, or display name' }, }, required: [], }, }, handler: async (args, context) => { const { page, per_page } = validatePagination(args); const qs = buildQueryString({ page, per_page, roles: args.roles, search: args.search }); const users = await context.wpRequest(`/wp/v2/users?${qs}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(users, null, 2)) }], }; }, category: ToolCategory.USERS, });

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/littlebearapps/wp-navigator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server