Skip to main content
Glama

wpnav_get_user

Retrieve a WordPress user's complete profile by ID, including roles, capabilities, and metadata for user management tasks.

Instructions

Get a single WordPress user by ID. Returns full user profile including roles, capabilities, and metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesWordPress user ID

Implementation Reference

  • The handler function executes the core logic of wpnav_get_user: validates the user ID input, fetches the user data via WordPress REST API `/wp/v2/users/${id}`, and returns the full user profile as clamped JSON text.
    handler: async (args, context) => { validateRequired(args, ['id']); const id = validateId(args.id, 'User'); const user = await context.wpRequest(`/wp/v2/users/${id}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(user, null, 2)) }], }; },
  • Input schema defining the tool name, description, and required 'id' parameter (number) for wpnav_get_user.
    definition: { name: 'wpnav_get_user', description: 'Get a single WordPress user by ID. Returns full user profile including roles, capabilities, and metadata.', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'WordPress user ID' }, }, required: ['id'], }, },
  • Full tool registration call for wpnav_get_user using toolRegistry.register, bundling definition (schema), handler, and category.
    toolRegistry.register({ definition: { name: 'wpnav_get_user', description: 'Get a single WordPress user by ID. Returns full user profile including roles, capabilities, and metadata.', inputSchema: { type: 'object', properties: { id: { type: 'number', description: 'WordPress user ID' }, }, required: ['id'], }, }, handler: async (args, context) => { validateRequired(args, ['id']); const id = validateId(args.id, 'User'); const user = await context.wpRequest(`/wp/v2/users/${id}`); return { content: [{ type: 'text', text: context.clampText(JSON.stringify(user, null, 2)) }], }; }, category: ToolCategory.USERS, });
  • Additional schema definition for wpnav_get_user in the tools manifest file, used likely for type generation or documentation.
    name: 'wpnav_get_user', description: 'Get a single WordPress user by ID. Returns full user profile including roles, capabilities, and metadata.', inputSchema: { type: 'object' as const, properties: { id: { type: 'number' as const, description: 'WordPress user ID', }, }, required: ['id'], }, },

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