Skip to main content
Glama

wp_get_current_user

Retrieves the currently authenticated WordPress user's profile, roles, and capabilities to verify account identity and permissions.

Instructions

Retrieves the currently authenticated user with comprehensive profile information including roles, capabilities, and account details.

Usage Examples: • Get current user: wp_get_current_user • Check permissions: Use this to verify your current user's capabilities and roles • Account verification: Confirm you're authenticated with the correct account • Profile details: View registration date, email, and user metadata

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoThe ID of the WordPress site to target (from mcp-wordpress.config.json). Required if multiple sites are configured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.9.2

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It clearly indicates this is a read operation ('Retrieves') and specifies what information is returned (profile, roles, capabilities, account details). However, it doesn't mention authentication requirements, error conditions, or rate limits that would be important for a tool accessing user data.

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?

The description is well-structured with a clear purpose statement followed by bulleted usage examples. Every sentence earns its place by providing specific guidance. It could be slightly more concise by integrating the examples more tightly with the main description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with no output schema and no annotations, the description provides good coverage of purpose, usage, and return information. It explains what data is returned (profile, roles, capabilities, account details) which compensates for the missing output schema. The main gap is lack of behavioral details like authentication requirements.

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?

The schema has 100% description coverage for its single optional parameter, so the baseline is 3. The description doesn't mention parameters directly, but the usage examples imply no parameters are needed for basic use ('Get current user: wp_get_current_user'), which adds context about when the optional 'site' parameter is required (only for multi-site configurations).

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?

The description clearly states the specific action ('Retrieves') and resource ('the currently authenticated user') with detailed scope ('comprehensive profile information including roles, capabilities, and account details'). It distinguishes from sibling tools like wp_get_user (which retrieves a specific user) by focusing on the current authenticated user context.

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?

The description provides explicit usage examples that clarify when to use this tool: for getting current user info, checking permissions, account verification, and viewing profile details. It implicitly distinguishes from alternatives like wp_get_user (which requires a user ID) by focusing on the authenticated context without needing parameters.

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